:root {
    /* ธีมสีพื้นหลัง Disney Dreamlight Valley (Midnight Blue - Magic Purple) */
    --bg-dark: #0b0d1b;
    --bg-card: #16192e;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    /* สีหลัก สีกาแล็กซี ดิสนีย์เพอร์เพิล และ ทองเวทมนตร์ */
    --ddv-purple: #a855f7; 
    --ddv-gold: #f59e0b; 
    --ddv-pink: #ec4899;
    --ddv-white: #ffffff; 
    
    --magic-gradient: linear-gradient(90deg, #e879f9, #a855f7, #60a5fa); 
    --gold-gradient: linear-gradient(90deg, #fef08a, #f59e0b); 
    --white-gradient: linear-gradient(90deg, #ffffff, #dcdcdc); 
    
    /* ตั้งค่าให้ตัวแปรสีหลักเรียกใช้สีม่วงเวทมนตร์ */
    --primary-color: var(--ddv-purple);
    --primary-gradient: var(--magic-gradient);
}

/* =========================================
   Age Rating Box (กล่องแสดงเรตติ้งอายุ)
========================================= */
.age-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(22, 25, 46, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
    border-left: 5px solid #319b42; /* สีเขียวสำหรับ PEGI 3 / ESRB E */
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.age-rating img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

.age-desc h4 { 
    color: #ffffff; 
    margin-bottom: 5px; 
    font-size: 1.2rem;
}

.age-desc p { 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    white-space: pre-line;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, .logo { font-family: 'Orbitron', sans-serif; }

/* 1. Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(11, 13, 27, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}
.logo, .main-title { 
    font-weight: 900;
    color: #ffffff; 
}

/* คลาสสีขาว */
.text-df-white, .text-ddv-white {
    background: var(--white-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

/* คลาสสีม่วงเวทมนตร์ */
.text-ddv-magic, .text-df-green {
    background: var(--magic-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
    filter: drop-shadow(0 2px 10px rgba(168, 85, 247, 0.5));
}

/* คลาสสีทอง Dreamlight */
.text-ddv-gold {
    background: var(--gold-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
    filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.5));
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: #f59e0b; }

.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; }

/* 2. VDO Hero */
.hero-vdo {
    position: relative;
    width: 100%;
    height: 70vh;
    margin-top: 70px;
    background: #000;
    overflow: hidden;
}
.vdo-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.vdo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11,13,27,0.2) 0%, var(--bg-dark) 100%);
}

/* Layout หลัก */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}
.section-block { margin-bottom: 60px; }
.section-block h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    border-left: 5px solid var(--ddv-gold);
    padding-left: 15px;
}

/* 3. Details */
.main-title { 
    font-size: 3.2rem; 
    margin-bottom: 15px; 
    color: #ffffff;
    font-weight: 900;
    text-transform: uppercase;
}

.main-title span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.game-desc-text { 
    font-size: 1.1rem; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
    white-space: pre-line;
}

/* Game Meta */
.game-meta {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--ddv-purple);
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.game-meta p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
}

.game-meta p strong {
    color: #ffffff;
    min-width: 140px;
    flex-shrink: 0;
}

#game-dev, #game-pub {
    color: var(--ddv-gold);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

#game-lang {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* แท็ก (Hashtags) */
.hashtags { 
    display: flex; 
    gap: 10px; 
    margin-top: 25px; 
    flex-wrap: wrap; 
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
}
.tag { 
    background: rgba(168, 85, 247, 0.15); 
    color: #e879f9; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.9rem; 
    border: 1px solid rgba(168, 85, 247, 0.35);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(168, 85, 247, 0.35);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* 4. System Requirements */
.sysreq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.req-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-top: 3px solid var(--ddv-purple);
}
.req-card h3 { margin-bottom: 15px; color: var(--ddv-gold); }
.req-card ul { list-style: none; }
.req-card ul li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.req-card ul li strong { color: var(--text-main); }

/* 5. Controllers */
.controller-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.controller-item {
    background: linear-gradient(145deg, #16192e, #202442);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.controller-item i {
    color: var(--ddv-gold);
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.5));
}
.controller-item:hover {
    transform: translateY(-5px);
    border-color: var(--ddv-gold);
    background: linear-gradient(145deg, #202442, #2a3059);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

/* 6. Download Buttons */
.download-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.btn-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 240px;
}

/* Steam */
.btn-steam { 
    background: linear-gradient(135deg, #1b2838, #2a475e); 
    color: white; 
    border: 1px solid #66c0f4; 
    box-shadow: 0 4px 15px rgba(102, 192, 244, 0.15);
}
.btn-steam:hover { 
    background: linear-gradient(135deg, #2a475e, #66c0f4); 
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 192, 244, 0.3);
}

/* Xbox Store */
.btn-xbox { 
    background: linear-gradient(135deg, #0e5c0e, #107c10); 
    color: white; 
    border: 1px solid #1f9f1f; 
    box-shadow: 0 4px 15px rgba(16, 124, 16, 0.15);
}
.btn-xbox:hover { 
    background: linear-gradient(135deg, #107c10, #23b323); 
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(16, 124, 16, 0.3);
}

/* Epic Games */
.btn-epic { 
    background: linear-gradient(135deg, #2a2e38, #3f4555); 
    color: white; 
    border: 1px solid #717c96; 
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}
.btn-epic:hover { 
    background: linear-gradient(135deg, #3f4555, #5a6378); 
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

/* Nintendo Switch (Red) */
.btn-switch {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: white;
    border: 1px solid #f87171;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}
.btn-switch:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* PlayStation (Blue) */
.btn-ps {
    background: linear-gradient(135deg, #003087, #0070d1);
    color: white;
    border: 1px solid #60a5fa;
    box-shadow: 0 4px 15px rgba(0, 112, 209, 0.2);
}
.btn-ps:hover {
    background: linear-gradient(135deg, #0070d1, #3b82f6);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* 7. Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}
.gallery-grid img:hover { 
    transform: scale(1.03); 
    border-color: var(--ddv-gold);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

footer { text-align: center; padding: 30px; color: var(--text-muted); border-top: 1px solid rgba(168, 85, 247, 0.2); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 13, 27, 0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.5);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.close-lightbox:hover { color: var(--ddv-gold); }

.prev-lightbox, .next-lightbox {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(22, 25, 46, 0.7);
    color: white;
    border: 1px solid rgba(168, 85, 247, 0.4);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 2001;
}

.prev-lightbox:hover, .next-lightbox:hover {
    background: var(--magic-gradient);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.prev-lightbox { left: 40px; }
.next-lightbox { right: 40px; }

/* Mobile & Responsive */
@media (max-width: 900px) {
    .sysreq-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-right {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background: rgba(11, 13, 27, 0.98); 
        padding: 20px 0 30px 0;
        border-top: 1px solid rgba(168, 85, 247, 0.4); 
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-right.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 20px;
    }

    .mobile-menu-btn { 
        display: block; 
        cursor: pointer;
    }

    .gallery-grid { grid-template-columns: 1fr; }
    .hero-vdo { height: 50vh; }
    .download-buttons { flex-direction: column; }
}