:root {
    --gold: #f8cc6a;
    --bg-dark: #2a2a2a;
    --panel-bg: rgba(255, 255, 255, 0.08);
}

body {
    background: var(--bg-dark);
    color: var(--gold);
    font-family: "Arial", serif;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- 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;
}
.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);
}
.running-horse {
    height: clamp(100px, 15vw, 180px);
}
.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 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;
}

/* PC LAYOUT */
@media (min-width: 900px) {
    #main-content {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 40px;
        align-items: start;
        text-align: left;
    }
    .main-logo, .subtitle, .footer {
        grid-column: 1 / -1;
        text-align: center;
    }
    .video-container {
        max-width: 400px;
        margin: 0 auto;
    }
    .right-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.main-logo {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--gold);
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.subtitle {
    color: #888;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
}

/* --- VIDEO --- */
.video-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto 25px auto;
    aspect-ratio: 9/16;
    background: #111;
    border: 2px solid var(--gold);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.15);
}
video { width: 100%; height: 100%; object-fit: cover; }
.video-overlay { position: absolute; top:0; left:0; width:100%; height:100%; cursor: pointer; }

/* --- BUTTONS & GRID --- */
.section-title {
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    padding: 10px;
    margin: 20px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.lang-btn {
    background: linear-gradient(180deg, #222, #000);
    border: 1px solid #775a00;
    color: var(--gold);
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}
.lang-btn:hover { background: #333; transform: translateY(-2px); }
.lang-btn.active { background: var(--gold); color: #000; font-weight: bold; box-shadow: 0 0 15px var(--gold); }

/* --- TERMS BOX --- */
.terms-box {
    background: var(--panel-bg);
    border: 1px solid #775a00;
    border-radius: 8px;
    padding: 20px;
    height: 250px;
    overflow-y: auto;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ddd;
    box-shadow: inset 0 0 20px #000;
}

/* --- CONTACT SECTION --- */
.contact-box {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}
.contact-link {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, #1a1a1a, #000);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 15px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}
.contact-link:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}
.wa-icon { width: 28px; height: 28px; fill: #25D366; margin-right: 8px; }

/* --- POPUP (FIXED & RESPONSIVE) --- */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.popup-content {
    background: #050505;
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 30px 20px;
    
    /* FIXED: Changed from 90% to 85% so the X button fits on screen */
    width: 85%; 
    max-width: 400px;
    
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
}

.popup-title {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 15px;
}

.close-popup-btn {
    position: absolute;
    top: -15px;
    
    /* FIXED: Changed from -15px to -10px to pull it inside screen */
    right: -10px; 
    
    width: 40px;
    height: 40px;
    background: #000;
    border: 2px solid var(--gold);
    color: var(--gold);
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1; /* FIXED: Ensures X is centered */
    cursor: pointer;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    z-index: 10;
}
.close-popup-btn:hover { background: var(--gold); color: #000; transform: rotate(90deg); }

.popup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.popup-lang-btn {
    background: linear-gradient(180deg, #222, #000);
    border: 1px solid #775a00;
    color: var(--gold);
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}
.popup-lang-btn:hover { background: #333; transform: scale(1.05); }

.footer { margin-top: 40px; font-size: 0.8rem; color: #555; text-align: center; width: 100%; }


/* Container hides the text that extends beyond the viewport */
.scrolling-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background: #111;
  padding: 15px 0;
  box-sizing: border-box;

}

/* Flex layout strings the content blocks into a single continuous strip */
.scrolling-track {
  display: flex;
  width: max-content;
  animation: scroll-left 15s linear infinite;
}

/* Base text styling */
.scrolling-text {
  font-family: sans-serif;
  font-size: 1.2rem;
  color: #00ffcc;
  padding-right: 50px; /* Space between the original and duplicate content block */
}

/* Pause the scrolling motion when a user hovers over the container */
.scrolling-container:hover .scrolling-track {
  animation-play-state: paused;
}

/* Keyframe moves exactly half of the flex width (one full instance of text) */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
