/* Modern SEO & UI Enhancements for 2048 Doge - Single Page Edition */
:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --doge-gold: #ffb100;
    --doge-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --nav-height: 70px;
}

* {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

body.dark-theme {
    background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
    color: #e0e0e0;
    margin: 0;
    padding-top: var(--nav-height);
}

/* Navbar & Burger Menu */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--doge-gold);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(15, 15, 26, 0.95);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1001;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 0;
    top: 100%; /* Align to bottom of nav */
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
}

/* Bridge the gap to prevent closing on hover-away */
.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-content a {
    color: #ccc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background: var(--glass-bg);
    color: var(--doge-gold);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn i {
    font-size: 0.8rem;
    vertical-align: middle;
}

.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #ccc;
    border-radius: 3px;
    transition: 0.3s;
}

@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: rgba(15, 15, 26, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .burger {
        display: flex;
    }
}

/* Sections */
section {
    padding: 80px 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.section-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--doge-shadow);
}

h2 {
    color: var(--doge-gold);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.game-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffb100, #ffed4b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(255, 177, 0, 0.2);
}

.game-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    max-width: 800px;
    margin: 40px auto;
}

.game-container iframe {
    border-radius: 16px;
    width: 100%;
    height: 850px; /* Increased for full visibility */
    background: #000;
}

/* Sidebar Ads */
.sidebar-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    z-index: 100;
}

.sidebar-ad.left { left: 20px; }
.sidebar-ad.right { right: 20px; }

@media (max-width: 1400px) {
    .sidebar-ad { display: none; }
}

/* Legal Content Styles */
.legal-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #bbb;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 15px;
}

.legal-content::-webkit-scrollbar { width: 6px; }
.legal-content::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--glass-border);
    color: #666;
}
