@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================================
   Reset & Base Styles - Growth & Energy Theme
   ========================================= */
:root {
    /* Colors */
    --bg-color: #FFFFFF;
    --primary-color: #0D9488;
    --secondary-color: #F1F5F9;
    --text-main: #111827;
    --text-muted: #4B5563;
    
    /* UI Elements */
    --border-color: #E2E8F0;
    --border-width: 1px;
    --card-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-title: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px; /* Slightly narrower for better reading on this theme */
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo h1 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.2s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* =========================================
   Featured Grid (Home Top)
   ========================================= */
.game-rowxp {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    margin: 24px auto;
    padding: 0 20px;
    max-width: 1200px;
    aspect-ratio: 2 / 1;
}

.game-tilexp {
    overflow: hidden;
    position: relative;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.game-tilexp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-tilexp:hover img {
    transform: scale(1.05);
}

.game-tilexp:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

@media (max-width: 768px) {
    .game-rowxp {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        aspect-ratio: auto;
        gap: 12px;
    }
    .game-tilexp:nth-child(1) {
        grid-column: 1 / 3;
        aspect-ratio: 16 / 9;
    }
    .game-tilexp {
        aspect-ratio: 1 / 1;
    }
}

/* =========================================
   Ads
   ========================================= */
#adv1, #adv2, #adv3 {
    margin: 24px auto;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 12px;
    position: relative;
}
#adv1::before, #adv2::before, #adv3::before {
    content: 'ADVERTISEMENT';
    position: absolute;
    top: -8px;
    left: 12px;
    background: #FFFFFF;
    color: var(--text-muted);
    padding: 0 6px;
    font-family: var(--font-title);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =========================================
   Main Content & Categories
   ========================================= */
.article-categories {
    padding: 3rem 0;
}

.category {
    margin-bottom: 4rem;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
}

.category:nth-child(odd), .category:nth-child(even) { transform: none; }

.category h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    transform: none;
    box-shadow: none;
}

.category-icon {
    margin-right: 12px;
    background: var(--secondary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* =========================================
   Accordion Styles
   ========================================= */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.accordion-item.active {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Header (Always Visible) */
.accordion-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #FFFFFF;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--secondary-color);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.accordion-mini-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.accordion-title {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.accordion-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Body (Expandable) */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FFFFFF;
}

.accordion-item.active .accordion-body {
    max-height: 600px;
    border-top: 1px solid var(--border-color);
}

.accordion-content-inner {
    padding: 1.5rem;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.accordion-img-container {
    flex: 0 0 240px;
    border-radius: 10px;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.accordion-img-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.accordion-item.active:hover .accordion-img-container img {
    transform: scale(1.05);
}

.accordion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.accordion-info p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn {
    align-self: flex-start;
    background: var(--primary-color);
    color: #FFFFFF;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: none;
    transition: all 0.2s;
    display: inline-block;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-btn:hover {
    transform: translateY(-2px);
    background: #0B7A6F;
}

.play-button-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* =========================================
   Detail Page Styles
   ========================================= */
.game-detail-info {
    background: #FFFFFF;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.game-detail-info h2 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-align: left;
    text-transform: none;
}

.game-detail-image {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: none;
    transform: none;
    width: 100%;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.game-detail-content {
    font-size: 1.1rem;
    color: var(--text-main);
}

.game-detail-content p {
    margin-bottom: 1.5rem;
}

/* =========================================
   Related Articles
   ========================================= */
.may-like h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-align: left;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.game-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    width: 100%;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

.game-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.game-card-content {
    padding: 1.25rem;
    text-align: left;
}

.game-card h4 {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--text-main);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
    color: #FFFFFF;
}

.footer-content p {
    font-family: var(--font-main);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #9CA3AF;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    transform: none;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        gap: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
    }
    
    .accordion-content-inner {
        flex-direction: column;
        padding: 1rem;
    }
    
    .accordion-img-container {
        width: 100%;
        flex: none;
    }
    
    .accordion-item.active .accordion-body {
        max-height: 1000px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .game-card img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}
