/* style.css v3.2 - Complete Styling with Breathing Animation */

:root {
    --bg-primary: #1a1b2e;
    --bg-secondary: #252143;
    --card-bg: #252143;
    --card-hover: #2d2654;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0b8;
    --text-accent: #c792ea;
    --text-neon: #e879f9;
    --border-color: #3d3567;
    --btn-gradient: linear-gradient(135deg, #c026d3, #e879f9);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    --purple-glow: rgba(232, 121, 249, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #c026d3, #e879f9, #d946ef);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    filter: drop-shadow(0 0 20px var(--purple-glow));
}

.subtitle {
    font-size: 1rem;
    color: #a0a0b8;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Navigation Tabs */
.nav-tabs-custom {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.nav-btn:hover {
    background: var(--card-hover);
    border-color: #e879f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--purple-glow);
}

.nav-btn.active {
    background: var(--btn-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px var(--purple-glow);
}

/* Main Content */
main {
    position: relative;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #e879f9;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--purple-glow);
}

h3 {
    color: #e879f9;
}

/* Breathing Animation for Spin Instruction - v3.2 */
.breathing-text {
    animation: breathing 3s ease-in-out infinite;
    text-shadow: 0 0 10px var(--purple-glow);
}

@keyframes breathing {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Forms */
.form-label {
    color: #e879f9;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: var(--card-hover);
    border-color: #e879f9;
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem var(--purple-glow);
    outline: none;
}

.form-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Radio buttons styling */
.form-check-input {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #c026d3;
    border-color: #c026d3;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem var(--purple-glow);
}

.form-check-label {
    color: var(--text-primary);
    cursor: pointer;
}

.form-check-label small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Grid Layout */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--btn-gradient);
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px var(--purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.btn-outline-info {
    border: 2px solid #22d3ee;
    color: #22d3ee;
    background: transparent;
}

.btn-outline-info:hover {
    background: #22d3ee;
    color: var(--bg-primary);
}

.btn-warning {
    background: var(--warning);
    color: var(--bg-primary);
    border: none;
}

.btn-warning:hover {
    background: #f59e0b;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--card-hover);
    border-color: #e879f9;
    color: var(--text-primary);
}

/* Team Inputs */
.team-inputs {
    margin-bottom: 1.5rem;
}

/* Standings Card */
.standings-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table {
    color: var(--text-primary) !important;
    margin-bottom: 0;
    background: var(--bg-primary);
}

.table thead {
    background: var(--bg-secondary);
}

.table thead th {
    background: var(--bg-secondary);
    color: #e879f9 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 0.5rem;
}

.table tbody {
    background: var(--bg-primary);
}

.table tbody tr {
    background: var(--bg-primary);
}

.table tbody td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    background: transparent;
    color: var(--text-primary) !important;
}

.table tbody td strong {
    color: var(--text-primary) !important;
}

.table tbody tr:hover {
    background: var(--bg-secondary) !important;
}

.table tbody tr:hover td {
    color: var(--text-primary) !important;
}

/* Fixtures Table Container */
.fixtures-table-container {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.fixtures-table {
    width: 100%;
    margin-bottom: 0;
    background: var(--bg-primary) !important;
    table-layout: fixed;
    border-collapse: collapse;
}

.fixtures-table thead {
    background: var(--bg-secondary);
}

.fixtures-table thead th {
    background: var(--bg-secondary);
    color: #e879f9 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.fixtures-table tbody {
    background: var(--bg-primary) !important;
}

.fixtures-table tbody .fixture-row {
    transition: all 0.3s ease;
    background: var(--bg-primary) !important;
}

.fixtures-table tbody .fixture-row:hover {
    background: var(--bg-secondary) !important;
}

.fixtures-table tbody .fixture-row td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    background: transparent;
    color: var(--text-primary) !important;
}

.fixtures-table tbody .fixture-row td strong {
    color: var(--text-primary) !important;
}

/* GOLDEN ROW FOR FIRST 3 MATCHES - PROPER ALIGNMENT v3.1 */
.fixture-row-golden {
    background: var(--bg-primary) !important;
    position: relative;
}

.fixture-row-golden::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(255, 237, 78, 0.12) 50%, 
        rgba(255, 215, 0, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
    border-left: 4px solid #ffd700;
    animation: goldenPulse 3s ease-in-out infinite;
}

@keyframes goldenPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    }
}

.fixture-row-golden:hover::after {
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.12) 0%, 
        rgba(255, 237, 78, 0.18) 50%, 
        rgba(255, 215, 0, 0.12) 100%);
}

.fixture-row-golden td {
    position: relative;
    z-index: 2;
    border-bottom-color: rgba(255, 215, 0, 0.3);
}

.fixture-row-golden strong {
    color: #ffed4e !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-weight: 700;
}

/* Score Inputs */
.score-input {
    width: 60px;
    text-align: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.score-input:focus {
    background: var(--card-hover);
    border-color: #e879f9;
    outline: none;
    box-shadow: 0 0 0 0.2rem var(--purple-glow);
}

.score-input::placeholder {
    color: var(--text-secondary);
}

.fixture-row-golden .score-input {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.05);
}

.fixture-row-golden .score-input:focus {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

/* Spin Wheel */
.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

#wheelCanvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px var(--purple-glow));
}

.btn-spin-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--btn-gradient);
    color: #fff;
    border: 4px solid #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--purple-glow);
    letter-spacing: 1px;
}

.btn-spin-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.btn-spin-center:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Modals */
.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 2px solid var(--border-color);
}

.modal-title {
    color: #e879f9;
    font-weight: 700;
}

.modal-footer {
    border-top: 2px solid var(--border-color);
}

.btn-close {
    filter: invert(1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer strong {
    color: #e879f9;
    text-shadow: 0 0 10px var(--purple-glow);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .nav-tabs-custom {
        gap: 0.5rem;
    }
    
    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .fixtures-table {
        font-size: 0.85rem;
    }
    
    .fixtures-table thead th,
    .fixtures-table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .score-input {
        width: 50px;
        padding: 0.3rem;
        font-size: 0.9rem;
    }
    
    #wheelCanvas {
        width: 300px;
        height: 300px;
    }
    
    .btn-spin-center {
        width: 60px;
        height: 60px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .fixtures-table thead th {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
    
    .fixtures-table tbody td {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .score-input {
        width: 45px;
        padding: 0.25rem;
        font-size: 0.85rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #e879f9;
    color: var(--bg-primary);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e879f9;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-start {
    text-align: left;
}

.text-end {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-3 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}
