:root {
    --primary-color: #001F3F;
    --primary-light: #003366;
    --primary-dark: #000d1a;
    --accent-color: #FFD700;
    --accent-hover: #FFC700;
    --danger-color: #DC2626;
    --danger-hover: #B91C1C;
    --dark-bg: #0a0e1a;
    --card-bg: #0f1729;
    --card-border: #1e2a47;
    --text-light: #e5e7eb;
    --error-bg: #fee2e2;
    --error-color: #dc2626;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden; /* extra safety against sideways scroll */
    height: 100%;
}

body {
    margin: 0;
    padding: 0;          /* removed padding-bottom: 70px */
    overflow-x: hidden;  /* stop sideways scroll */
    background: #f8fafc;
    min-height: 100vh;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout wrapper so footer sits at bottom */
#page-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Footer / bottom nav inside layout, not fixed */
#page-root > footer,
.bottom-nav {
    margin-top: auto;
    position: static;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (prefers-color-scheme: dark) {
    body {
        background: var(--dark-bg);
        color: var(--text-light);
    }
}

/* HEADER */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;   /* prevent sideways overflow */
    overflow-x: hidden; /* just in case */
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.3);
    backdrop-filter: blur(10px);
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.nav-left-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
}

.wrap-all-logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wrap-mobile-logo {
    display: none;
}

.wrap-logo {
    display: block;
}

.wrap-logo a,
.wrap-mobile-logo a {
    display: flex;
    align-items: center;
}

.wrap-logo img,
.wrap-mobile-logo img {
    max-height: 42px;
    max-width: 160px;
    object-fit: contain;
}

.right-side-nav {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-direction: column;
}

.right-side-nav-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gift-icon,
.searchbar-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.gift-icon:hover,
.searchbar-icon:hover {
    transform: scale(1.1);
}

.gift-icon img,
.searchbar-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.reg-button {
    display: flex;
}

.reg-button .btn {
    font-weight: 600;
    font-size: 0.8125rem;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 0.375rem 0.875rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.reg-button .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.reg-button .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.reg-button .btn-success {
    background: #87CEEB;
    color: var(--primary-color);
    border: 2px solid #87CEEB;
    box-shadow: 0 2px 6px rgba(135, 206, 235, 0.4);
}

.reg-button .btn-success:hover {
    background: #7EC8E3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.5);
}

.reg-button .btn-danger {
    background: var(--danger-color);
    color: #fff;
    border: 2px solid var(--danger-color);
}

.reg-button .btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

/* GOOGLE TRANSLATE */
.lang-switch {
    display: flex;
    align-items: center;
    /* removed transforms to avoid sideways scroll */
    /* transform: translateX(40%); */
}

#google_translate_element select {
    background: #87CEEB !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 0 2px 6px rgba(135, 206, 235, 0.4) !important;
    outline: none !important;
    min-width: 120px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

#google_translate_element select:hover {
    background: #7EC8E3 !important;
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.5) !important;
}

.goog-te-gadget-simple {
    background: transparent !important;
    border: none !important;
}

.goog-logo-link,
.goog-te-gadget span,
#goog-gt-tt,
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* BANNER STYLES */
.banner-btn {
    background: var(--danger-color);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.5);
}

/* SECTIONS - Optimized Container */
.content-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* VIP TICKET SECTION */
.vip-ticket-section {
    padding: 2rem 0;
    background: #f8fafc;
}

.section-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* LIVE SCORE + FEATURES */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (min-width: 1024px) {
    .grid-layout {
        grid-template-columns: 3fr 1fr;
    }
}

.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 160px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 1rem;
    color: #fff;
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feature-desc {
    font-size: 0.8125rem;
    opacity: 0.9;
}

@media (prefers-color-scheme: dark) {
    .vip-ticket-section {
        background: var(--dark-bg);
    }

    .section-card {
        background: var(--card-bg);
        border-color: var(--card-border);
    }

    .section-title {
        color: var(--accent-color);
    }
}

/* BOTTOM NAV - kept minimal (visual handled in footer.css) */
.bottom-nav {
    /* fallback styles only; main styles live in footer.css */
}

/* ERROR MESSAGE */
.error-message {
    background: var(--error-bg);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--error-color);
}

@media (prefers-color-scheme: dark) {
    .error-message {
        background: #451a03;
        color: #fb7185;
        border-left-color: #fb7185;
    }
}

/* RESPONSIVE OPTIMIZATIONS */
@media (max-width: 1024px) {
    .banner-headline {
        font-size: 1.5rem;
    }

    .banner-subtext {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .logo-mobile {
        display: block;
    }

    .logo-desktop {
        display: none;
    }

    .wrap-mobile-logo {
        display: block;
    }

    .wrap-logo {
        display: none;
    }

    .gift-icon,
    .searchbar-icon {
        display: none;
    }

    .right-side-nav {
        gap: 0.5rem;
    }

    .right-side-nav-row {
        gap: 0.5rem;
    }

    .reg-button .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.675rem;
    }

    .main-header {
        min-height: 58px;
    }

    .banner-headline {
        font-size: 1.25rem;
    }

    .banner-subtext {
        font-size: 0.9375rem;
    }

    .banner-btn {
        font-size: 0.9375rem;
        padding: 0.75rem 1.5rem;
    }

    .vip-ticket-section {
        padding: 1.5rem 0;
    }

    .section-card {
        padding: 1.25rem;
    }

    .grid-layout {
        padding: 1.5rem 0;
    }

    .feature-card {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .banner-headline {
        font-size: 1.125rem;
    }

    .banner-subtext {
        font-size: 0.875rem;
    }

    .banner-btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
    }

    .language-selector-wrapper {
        top: 58px;
        right: 1rem;
    }

    .lang-switch {
        /* removed translateX here too to avoid sideways scroll on mobile */
        /* transform: translateX(30%); */
    }

    #google_translate_element select {
        font-size: 0.8125rem !important;
        padding: 0.4rem 0.875rem !important;
        min-width: 110px;
    }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading optimization */
img[loading="lazy"] {
    content-visibility: auto;
}
