: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;
}

/* --- 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;
}

.horse-track {
    animation: gallop 1s infinite;
}

.running-horse {
    height: clamp(100px, 15vw, 180px);
    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 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;
}

/* PC LAYOUT */
@media (min-width: 900px) {
    #main-content {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 40px;
        align-items: start;
        text-align: left;
        padding-top: 50px;
    }
    .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 #d4af37;
}

/* --- 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;
}

.terms-box b {
    color: var(--gold);
}

/* --- 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 --- */
.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%;
    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;
}

.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;
}

.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;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .main-logo {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .right-panel {
        padding: 15px;
    }

    .section-title {
        font-size: 18px;
    }

    .lang-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .popup-content {
        padding: 30px 20px;
    }

    .contact-link {
        font-size: 16px;
        padding: 12px;
    }

    .terms-box {
        height: 200px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 24px;
    }

    .horse-track {
        width: 150px;
        height: 150px;
    }

    .main-logo {
        font-size: 24px;
    }

    .video-container {
        max-width: 100%;
    }
}
