/* Global Reset */
:root {
    /* Pizza Theme Palette */
    /* 1. Cheese Base */
    --bg-color: #FFE8B4;
    --surface-color: #FFE8B4; /* Card background */
    
    /* 2. Crust Edge */
    --nav-bg: #D4A76A;
    --divider-color: #D4A76A;
    --title-decoration: #D4A76A;

    /* 3. Tomato Red (Auxiliary) */
    --tag-red: #E63946;
    
    /* 4. Basil Green (Auxiliary) */
    --tag-green: #40916C;
    
    /* 5. Burnt Orange (Accent/Highlight) */
    --accent-color: #FB8500;
    --hover-color: #FF9E00; 
    
    /* 6. Dark Brown (Text) */
    --text-primary: #5A3E2B;
    --text-secondary: #5A3E2B; /* Subtitles/Secondary Text */
    
    /* 7. Off-White (Text on Dark) */
    --text-light: #F8F9FA;
    
    /* 8. Neutral (Shadows, Dividers) */
    --neutral-gray: #E9ECEF;
    
    /* Derived & Gradients */
    --accent-gradient: linear-gradient(135deg, #FB8500, #E63946);
    --hover-gradient: linear-gradient(135deg, #FF9E00, #FB8500);
    
    --card-shadow: 0 10px 20px rgba(90, 62, 43, 0.1); /* Dark Brown shadow for warmth */
    --hover-shadow: 0 15px 30px rgba(90, 62, 43, 0.2);
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Layout */
    --container-width: 1280px;
    --header-height: 80px;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.site-header, .navbar {
    height: var(--header-height);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.navbar .container, .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item, .nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: rgba(248, 249, 250, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 0 0 2rem 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Ad Container */
.ad-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(212, 167, 106, 0.3); /* Crust Edge border */
}

.ad-label, .sys-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

#adv1 {
    margin-bottom: 0;
}

/* Layout Blocks */
.waterfall-layout {
    margin-bottom: 4rem;
}

.category-block {
    margin-bottom: 3rem;
}

.block-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-left: 1rem;
    border-left: 4px solid var(--divider-color);
}

/* Grid */
.games-grid.masonry-grid, .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: auto;
}

/* Cards */
.game-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(212, 167, 106, 0.2);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
    border-color: var(--accent-color);
}

.card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: saturate(0.9);
}

.game-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content, .game-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4, .game-card-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detail Page */
.breadcrumb, .sys-breadcrumb {
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb .current, .sys-breadcrumb .current {
    color: var(--accent-color);
    font-weight: 600;
}

.detail-card, .detail-panel {
    background: var(--surface-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 4rem;
    border: 1px solid rgba(212, 167, 106, 0.2);
}

.detail-panel {
    display: block; /* For compatibility with article1 structure */
}

.panel-header {
    padding: 2rem 3rem 1rem;
}
.panel-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    padding: 0 3rem 3rem;
}

.glass-panel {
    background: rgba(255, 232, 180, 0.8);
    backdrop-filter: blur(20px);
}

.detail-media {
    position: relative;
    height: 100%;
    min-height: 400px;
    border-radius: 16px;
    overflow: hidden;
}

.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-meta, .game-meta {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}
.game-meta {
    position: static;
    margin-bottom: 1rem;
}

.tag, .sys-tag {
    background: var(--tag-red);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: inline-block;
}

.tag:nth-of-type(2n), .sys-tag:nth-of-type(2n) {
    background: var(--tag-green);
}

.tag.green {
    background: var(--tag-green);
}

/* Extra Pizza Theme Elements */
.sidebar {
    background: var(--tag-green);
    color: var(--text-light);
}

.decoration {
    color: var(--tag-green);
}

/* Detail Content */
.detail-content, .detail-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.detail-info {
    padding: 0;
}

.detail-header h1, .panel-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.action-bar, .action-area {
    display: flex;
    gap: 1rem;
}

.btn-gradient, .btn-cyber {
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--text-light);
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(90, 62, 43, 0.3);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-gradient:hover, .btn-cyber:hover {
    transform: translateY(-3px);
    background: var(--hover-color);
    box-shadow: 0 15px 30px rgba(90, 62, 43, 0.4);
}

.related-section {
    margin: 4rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--nav-bg);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: none;
    color: var(--text-light);
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.footer-links a {
    color: rgba(248, 249, 250, 0.8);
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .hero-title { font-size: 1.8rem; }
    .detail-card, .panel-body { grid-template-columns: 1fr; }
    .detail-media { min-height: 250px; }
    .detail-content, .panel-body { padding: 2rem; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        gap: 1rem;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    .games-grid.masonry-grid { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 1rem; }
}

/* Play Indicator */
.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-color);
    color: var(--text-light);
    border: 2px solid var(--text-light);
    font-family: var(--font-heading);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.game-card:hover .play-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.game-card:hover .card-image img {
    opacity: 1;
    filter: brightness(0.8);
    transform: scale(1.05);
}

/* Legacy Support Cleanup */
.scan-line, .header-decoration, .ui-overlay, .status-dot {
    display: none;
}
