:root {
    --gold: #d4af37;
    --bg-dark: #050505;
    --panel-bg: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #050505;
    color: var(--gold);
    font-family: "Times New Roman", serif;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent zoom on double tap */
    touch-action: manipulation;
}

/* --- LOADER --- */
#loader-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s;
}

.logo-container {
    margin-bottom: 20px;
    animation: logoPulse 2s ease-in-out infinite;
}

.loading-logo {
    height: clamp(120px, 20vw, 200px);
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
    animation: logoGlow 1.5s ease-in-out infinite alternate;
}

.horse-track {
    animation: gallop 1s infinite;
    margin: 15px 0;
}

.running-horse {
    height: clamp(80px, 12vw, 140px);
    filter: sepia(100%) hue-rotate(5deg) saturate(200%);
}

.brand-title {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 3px;
    font-weight: bold;
    margin-top: 15px;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.loading-bar {
    width: clamp(200px, 50vw, 400px);
    height: 4px;
    background: #333;
    margin-top: 20px;
    border-radius: 2px;
}

.progress {
    height: 100%;
    width: 0%;
    background: var(--gold);
    animation: loadProgress 2.5s ease-out forwards;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6)); }
    100% { filter: drop-shadow(0 0 30px rgba(212, 175, 55, 1)); }
}

@keyframes gallop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-5deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

@keyframes loadProgress { 
    0% { width: 0%; } 
    100% { width: 100%; } 
}

/* --- MAIN LAYOUT --- */
#main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    padding-bottom: 50px;
}

/* Logo Wrapper Styling */
.logo-wrapper {
    margin-bottom: 15px;
    animation: logoFloat 3s ease-in-out infinite;
}

.main-logo-img {
    max-width: clamp(120px, 25vw, 200px);
    height: auto;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
    transition: all 0.3s ease;
}

.main-logo-img:hover {
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 1));
    transform: scale(1.05);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.main-flex {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: stretch;
    justify-content: center;
    margin-top: 30px;
    min-height: 500px;
}

/* LEFT PANEL - Language Buttons Vertical (AWESOME DESIGN) */
.left-panel {
    flex: 0 0 280px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.15), rgba(0, 0, 0, 0.95));
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.1);
    border: 3px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 3px;
    background: linear-gradient(45deg, #d4af37, #f9e38a, #d4af37, #b8960c);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.lang-btn {
    background: linear-gradient(135deg, #d4af37, #b8960c);
    color: #000;
    border: none;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* FIXED DIMENSIONS - NO SIZE CHANGE */
    min-height: 54px;
    box-sizing: border-box;
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    /* REMOVED transform to prevent size change */
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #e5c14a, #c9a517);
}

.lang-btn.active {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    /* REMOVED transform to prevent size change */
    font-weight: 900;
    /* Keep same dimensions */
    min-height: 54px;
}

/* RIGHT SIDE - Video Only (ENHANCED) */
.right-content {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding: 15px;
    box-sizing: border-box;
}

.right-content::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 15px;
    border: 3px solid transparent;
    background: linear-gradient(45deg, #d4af37, #f9e38a, #d4af37, #b8960c);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.video-container {
    width: 100%;
    max-width: 550px;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.5), 0 0 80px rgba(212, 175, 55, 0.2);
    position: relative;
    background: #000;
    border: 3px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    aspect-ratio: 9/16;
    max-height: 80vh;
}

.video-container:hover {
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.7), 0 0 100px rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.6);
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    /* Prevent download context menu on mobile */
    pointer-events: auto;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}

/* BOTTOM SECTION - Rules + Contact (AWESOME VISIBILITY) */
.bottom-section {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto 30px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
}

.rules-panel {
    width: 100%;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0.9));
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 40px rgba(212, 175, 55, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
}

.flash-news-container {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.flash-title-main {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 900;
    color: #ff4500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.8), 0 0 20px rgba(255, 69, 0, 0.5);
    animation: flashBlink 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.flash-icon {
    width: clamp(24px, 4vw, 32px);
    height: clamp(24px, 4vw, 32px);
    fill: #ff4500;
    animation: iconShake 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.8));
}

@keyframes iconShake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.flash-box {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.2), rgba(255, 0, 0, 0.15));
    border: 2px solid rgba(255, 69, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 69, 0, 0.4), inset 0 0 10px rgba(255, 69, 0, 0.1);
    animation: flashPulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.flash-news-1 {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.25), rgba(255, 0, 0, 0.2));
}

.flash-news-2 {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.25), rgba(255, 69, 0, 0.2));
}

.flash-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 900;
    color: #ff4500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.8), 0 0 20px rgba(255, 69, 0, 0.5);
    animation: flashBlink 1.5s ease-in-out infinite;
}

.flash-content {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

@keyframes flashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(255, 69, 0, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 6px 30px rgba(255, 69, 0, 0.6); }
}

@keyframes flashBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.section-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4), 0 0 25px rgba(212, 175, 55, 0.2);
    font-family: "Arial Black", "Impact", sans-serif;
}

#chooseLangTitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    background: linear-gradient(135deg, #d4af37, #f9e38a, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: 3px;
}

#termsTitle {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    background: linear-gradient(135deg, #d4af37, #f9e38a, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    margin-bottom: 25px;
}

.terms-box {
    background: rgba(0, 0, 0, 0.6);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--gold);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 2;
    color: #fff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for terms box */
.terms-box::-webkit-scrollbar {
    width: 8px;
}

.terms-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.terms-box::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.terms-box::-webkit-scrollbar-thumb:hover {
    background: #f9e38a;
}

.terms-box b {
    color: var(--gold);
    font-weight: 700;
}

.contact-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    text-decoration: none;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    border: 2px solid rgba(37, 211, 102, 0.3);
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    min-height: 56px;
}

.contact-link:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #2fe870, #15a08a);
}

.wa-icon {
    width: 24px;
    height: 24px;
    fill: #25D366;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    #main-content {
        padding: 15px;
    }

    .main-flex {
        flex-direction: column;
        min-height: auto;
        gap: 20px;
    }

    /* LEFT PANEL - Full width on mobile */
    .left-panel {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Language buttons in 2 columns on mobile */
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lang-btn {
        padding: 14px 16px;
        font-size: 0.95rem;
        min-height: 50px;
    }

    /* RIGHT PANEL - Video full width */
    .right-content {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0;
    }

    .video-container {
        max-width: 100%;
        border-radius: 12px;
    }

    /* BOTTOM SECTION */
    .bottom-section {
        margin-top: 30px;
        gap: 25px;
    }

    .rules-panel {
        padding: 20px 15px;
    }

    /* Flash news stacked on mobile */
    .flash-title-main {
        font-size: 1.2rem;
        margin-bottom: 12px;
        gap: 8px;
    }

    .flash-icon {
        width: 20px;
        height: 20px;
    }

    .flash-news-container {
        flex-direction: column;
        gap: 12px;
    }

    .flash-box {
        min-height: 70px;
        padding: 15px;
    }

    .flash-title {
        font-size: 1.2rem;
    }

    .flash-content {
        font-size: 1rem;
    }

    .terms-box {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .contact-box {
        gap: 15px;
    }

    .contact-link {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* TABLET BREAKPOINT */
@media (min-width: 769px) and (max-width: 899px) {
    .main-flex {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .left-panel {
        flex: 0 0 45%;
    }

    .right-content {
        flex: 1 1 50%;
    }

    .lang-btn {
        padding: 15px 18px;
        font-size: 1rem;
    }
}

/* MOBILE - SMALL SCREENS */
@media (max-width: 480px) {
    #main-content {
        padding: 10px;
    }

    .logo-wrapper {
        margin-bottom: 10px;
    }

    .main-logo-img {
        max-width: clamp(100px, 30vw, 160px);
    }

    .main-logo {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    #chooseLangTitle {
        font-size: 1.1rem;
    }

    #termsTitle {
        font-size: 1.5rem;
    }

    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lang-btn {
        padding: 12px 10px;
        font-size: 0.8rem;
        min-height: 48px;
        letter-spacing: 0.3px;
    }

    .video-container {
        border-radius: 10px;
        border: 2px solid rgba(212, 175, 55, 0.4);
    }

    .rules-panel {
        padding: 15px 12px;
    }

    .flash-title-main {
        font-size: 1.1rem;
        margin-bottom: 10px;
        gap: 6px;
    }

    .flash-icon {
        width: 18px;
        height: 18px;
    }

    .flash-news-container {
        gap: 10px;
    }

    .flash-box {
        min-height: 65px;
        padding: 12px 10px;
    }

    .flash-title {
        font-size: 1rem;
    }

    .flash-content {
        font-size: 0.9rem;
    }

    .terms-box {
        padding: 15px;
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .contact-box {
        flex-direction: column;
        gap: 12px;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
        padding: 13px 18px;
        font-size: 0.95rem;
    }

    .popup-content {
        padding: 25px 15px;
        width: 95%;
    }

    .popup-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .popup-lang-btn {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .footer {
        font-size: 0.8rem;
        padding: 20px;
    }
}

/* --- POPUP --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.popup-content {
    background: #111;
    padding: 40px;
    border-radius: 15px;
    border: 2px solid var(--gold);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
}

.close-popup-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gold);
    transition: color 0.3s;
}

.close-popup-btn:hover {
    color: #fff;
}

.popup-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: var(--gold);
    letter-spacing: 1px;
}

.popup-grid {
    display: grid;
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Scrollbar styling for popup */
.popup-grid::-webkit-scrollbar {
    width: 6px;
}

.popup-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.popup-grid::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.popup-grid::-webkit-scrollbar-thumb:hover {
    background: #f9e38a;
}

.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #f9e38a;
}

.popup-lang-btn {
    padding: 15px 20px;
    background: linear-gradient(180deg, #222, #000);
    border: 1px solid #775a00;
    color: var(--gold);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-align: left;
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    min-height: 52px;
}

.popup-lang-btn:hover {
    background: #333;
    border-color: var(--gold);
    transform: translateY(-2px);
}

.popup-lang-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    font-weight: bold;
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--gold);
    font-size: 14px;
    margin-top: 40px;
    opacity: 0.7;
}

/* Large Screens (Desktop) */
@media (min-width: 901px) {
    .main-flex {
        flex-direction: row;
        gap: 30px;
    }

    .left-panel {
        flex: 0 0 300px;
    }

    .right-content {
        flex: 1;
    }

    .video-container {
        max-width: 500px;
    }

    /* Single column on desktop */
    .lang-grid {
        grid-template-columns: 1fr;
    }
}



