/* ===================================
   CSS RESET & GLOBAL STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --background: #f4f6f8;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #2d5016;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

header {
    background: var(--primary-color);
    color: white;
    padding: 0.72rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.08rem;
    font-weight: bold;
    color: white;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* ===================================
   AD CONTAINERS - SIDEBAR LAYOUT
   =================================== */

.page-wrapper {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

.sidebar-ad {
    position: sticky;
    top: 80px;
    width: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.ad-placeholder {
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 12px;
    border-radius: 8px;
    text-align: center;
    min-height: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder.small {
    min-height: 250px;
    height: 250px;
}

/* Hide sidebar ads on mobile */
@media (max-width: 1200px) {
    .sidebar-ad {
        display: none;
    }

    .page-wrapper {
        padding: 10px;
    }

    .main-content {
        width: 100%;
    }
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #000000;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   GAMES SECTION
   =================================== */

.games-section {
    padding: 2rem 0;
}

.games-section > h2 {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
}

.game-category {
    margin-bottom: 3rem;
}

.game-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.game-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-card h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.game-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===================================
   FEATURES SECTION
   =================================== */

.features {
    padding: 3rem 0;
    background: white;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-light);
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: white;
    transition: opacity 0.3s;
}

.footer-nav a:hover {
    opacity: 0.8;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color, #667eea);
}

.footer-section a {
    display: block;
    margin: 8px 0;
    color: var(--text-light, #ccc);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color, #667eea);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .game-card {
        padding: 1.5rem;
    }

    nav {
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    nav {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }
}
