/* =============================================
   AFIK SPRING BREAK'26 — TOURNAMENT STYLES
   Shared design system for cup.html & admin.html
   ============================================= */

/* ---------- CSS Variables ---------- */
:root {
    --green-deep: #022F1D;
    --green-dark: #00150D;
    --green-mid: #0A4A30;
    --green-light: #0D6B45;
    --gold: #8F7843;
    --gold-light: #C4A95B;
    --gold-bright: #E8D48B;
    --gold-glow: #FFE8A0;
    --ice-white: #F0F7FF;
    --ice-blue: #B8E0F7;
    --white: #FFFFFF;
    --text-light: rgba(255,255,255,0.7);
    --red: #E74C3C;
    --red-soft: rgba(231,76,60,0.15);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--green-dark);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: rgba(0, 21, 13, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(143,120,67,0.08);
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 0.7rem 2.5rem;
    background: rgba(0, 21, 13, 0.95);
    border-bottom-color: rgba(143,120,67,0.15);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.nav-logo img {
    width: 32px;
    height: 32px;
}

.nav-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.nav-logo-text span {
    color: var(--gold-light);
    font-size: 0.65rem;
    font-weight: 600;
    display: block;
    letter-spacing: 0.15em;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-light);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-links a.active {
    color: var(--gold-bright);
}

.nav-links a.active::after {
    width: 100%;
    background: var(--gold-bright);
}

.nav-cta-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--green-dark) !important;
    padding: 0.55rem 1.4rem;
    border-radius: 100px;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
}

.nav-cta-btn::after { display: none !important; }

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(143,120,67,0.3);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ---------- Section Headings ---------- */
.section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--green-dark);
    box-shadow: 0 4px 20px rgba(143,120,67,0.25);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(143,120,67,0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(143,120,67,0.3);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(231,76,60,0.3);
}

.btn-danger:hover {
    background: rgba(231,76,60,0.25);
}

/* ---------- Match Card ---------- */
.match-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(143,120,67,0.12);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.match-card:hover {
    border-color: rgba(143,120,67,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.match-card.live {
    border-color: rgba(232,212,139,0.4);
    background: rgba(143,120,67,0.06);
    animation: livePulse 2s ease-in-out infinite;
}

.match-card.completed {
    opacity: 0.7;
}

.match-card.completed:hover {
    opacity: 1;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,212,139,0.1); }
    50% { box-shadow: 0 0 25px 4px rgba(232,212,139,0.12); }
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.match-team-home {
    justify-content: flex-end;
    text-align: right;
}

.match-team-away {
    justify-content: flex-start;
}

.match-team-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    flex-shrink: 0;
}

.match-team-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.match-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 100px;
}

.match-time {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.1em;
}

.score-display {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.score-display.has-score {
    background: linear-gradient(180deg, #f5ecd0 0%, #c4a95b 40%, #e8d48b 50%, #c4a95b 60%, #8f7843 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-separator {
    color: rgba(143,120,67,0.4);
    margin: 0 0.2rem;
    -webkit-text-fill-color: rgba(143,120,67,0.4);
}

.match-vs {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.match-period {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-bright);
}

.match-division-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    opacity: 0.6;
}

.match-timer {
    font-family: 'Outfit', monospace;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold-bright);
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

/* ---------- Status Badge ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.8rem;
    border-radius: 100px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-live {
    background: rgba(232,212,139,0.15);
    border: 1px solid rgba(232,212,139,0.4);
    color: var(--gold-bright);
}

.status-live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold-bright);
    border-radius: 50%;
    animation: liveDot 1.5s ease-in-out infinite;
}

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

.status-completed {
    background: rgba(13,107,69,0.2);
    border: 1px solid rgba(13,107,69,0.4);
    color: var(--green-light);
}

.status-upcoming {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-light);
}

/* ---------- Standings Table ---------- */
.standings-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(143,120,67,0.1);
    background: rgba(255,255,255,0.02);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.standings-table th {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    padding: 1rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid rgba(143,120,67,0.15);
    white-space: nowrap;
}

.standings-table th:nth-child(2) {
    text-align: left;
}

.standings-table td {
    padding: 0.85rem 0.8rem;
    font-size: 0.88rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s ease;
}

.standings-table td:nth-child(2) {
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.standings-table tbody tr:hover td {
    background: rgba(143,120,67,0.04);
}

.standings-table tbody tr:first-child td {
    background: rgba(143,120,67,0.06);
}

.standings-table .pos-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--gold-light);
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.standings-table .team-cell img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.standings-table .pts-cell {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    color: var(--gold-bright);
}

/* ---------- Division Header ---------- */
.division-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.division-header::before,
.division-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(143,120,67,0.2), transparent);
}

.division-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold);
    white-space: nowrap;
}

/* ---------- Superfinal Card ---------- */
.superfinal-card {
    background: linear-gradient(135deg, rgba(143,120,67,0.08), rgba(143,120,67,0.02));
    border: 1px solid rgba(143,120,67,0.25);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.superfinal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(232,212,139,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.superfinal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #f5ecd0 0%, #c4a95b 25%, #e8d48b 45%, #fff8e0 50%, #c4a95b 55%, #8f7843 75%, #6b5a32 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.superfinal-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.superfinal-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.superfinal-team img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    padding: 8px;
}

.superfinal-team-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
}

.superfinal-team-div {
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.superfinal-score {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(180deg, #f5ecd0, #c4a95b, #8f7843);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.superfinal-pending {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
}

/* ---------- Tabs ---------- */
.tab-bar {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(143,120,67,0.08);
    width: fit-content;
}

.tab-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.tab-btn.active {
    background: rgba(143,120,67,0.15);
    color: var(--gold-bright);
    border: 1px solid rgba(143,120,67,0.2);
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 25%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-match {
    height: 90px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.skeleton-table {
    height: 300px;
    border-radius: 16px;
}

/* ---------- Toast Notification ---------- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--green-mid);
    border: 1px solid rgba(143,120,67,0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
}

.toast.success {
    border-color: rgba(13,107,69,0.4);
}

.toast.error {
    border-color: rgba(231,76,60,0.4);
}

/* ---------- Footer ---------- */
.cup-footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(143,120,67,0.08);
    color: var(--text-light);
    font-size: 0.8rem;
}

.cup-footer a {
    color: var(--gold-light);
    transition: color 0.2s ease;
}

.cup-footer a:hover {
    color: var(--gold-bright);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 21, 13, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.3rem;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .section-title {
        font-size: 2rem;
    }

    .match-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.2rem 1.5rem;
        text-align: center;
    }

    .match-team {
        justify-content: center !important;
        text-align: center;
    }

    .match-team-home {
        flex-direction: row;
    }

    .container {
        padding: 0 1.2rem;
    }

    .tab-bar {
        width: 100%;
        overflow-x: auto;
    }

    .superfinal-title {
        font-size: 1.8rem;
    }

    .superfinal-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .match-team-name {
        font-size: 0.85rem;
    }

    .score-display {
        font-size: 1.5rem;
    }
}
