:root {
    --primary-color: #2a2a2a;
    --secondary-color: #4CAF50;
    --text-color: #333;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --review-background: #f8f8f8;
    --nav-height: 60px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #1a1a1a;
        --text-color: #ffffff;
        --background-color: #121212;
        --card-background: #1e1e1e;
        --review-background: #252525;
    }

    body {
        color: var(--text-color);
    }

    /* Game detail page specific styles */
    .game-report {
        /* Game page headers */
        .game-header h1 {
            color: var(--text-color) !important;
        }

        .pros h2,
        .cons h2,
        .game-videos h2,
        .reviews h2 {
            color: var(--text-color) !important;
        }

        /* Review cards */
        .review-card {
            h3 {
                color: var(--text-color) !important;
            }
            .score {
                color: var(--secondary-color);
            }
            p {
                color: var(--text-color);
            }
        }
    }

    /* List items in pros/cons */
    .pros li,
    .cons li {
        color: var(--text-color);
    }

    /* Keep index page headers white */
    .hero h1,
    .hero p {
        color: white;
    }

    /* Navigation */
    .main-nav .logo {
        color: white;
    }

    .tag {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-color);
    }

    /* Multiplayer status */
    .multiplayer-status {
        color: var(--text-color);
    }
}

.main-nav {
    background: var(--primary-color);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
}

.hero {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: calc(var(--nav-height) + 4rem) 2rem 4rem;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: 3rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 1rem 0 0;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

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

.game-card {
    position: relative;
    width: 100%;
    padding-top: 150%; /* 3:2 aspect ratio */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.game-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

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

.game-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(
        to top, 
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.7) 50%,
        rgba(0,0,0,0) 100%
    );
    color: white;
    border-radius: 15px;
}

.game-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.game-card-score {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--secondary-color);
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: white;
}

.game-card .tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.game-report {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 1rem 2rem;
}

.game-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-icon img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

.game-title {
    flex: 1;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.game-title h1 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.store-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-direction: row;
}

.steam-link {
    background: #171a21;
    color: white;
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    transition: opacity 0.2s;
    white-space: nowrap;
    height: 32px;
    display: inline-flex;
    align-items: center;
}

.steam-link:hover {
    opacity: 0.9;
}

.steam-link.price-standard,
.steam-link.price-budget,
.steam-link.price-premium {
    margin-right: 0;
    height: 32px;
    display: inline-flex;
    align-items: center;
}

.steam-link.price-standard {
    background: #FFA726;
}

.steam-link.price-budget {
    background: #4CAF50;
}

.steam-link.price-premium {
    background: #EF5350;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: #e0e0e0;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.multiplayer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.multiplayer-status.multiplayer .status-dot {
    background-color: #4CAF50;
}

.multiplayer-status.co-op .status-dot {
    background-color: #FFC107;
}

.multiplayer-status.single .status-dot {
    background-color: #f44336;
}

.score-container {
    margin-top: 1rem;
}

.score-bar {
    height: 30px;
    background-color: #ddd;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.score-fill {
    height: 100%;
    background-color: var(--secondary-color);
    color: white;
    text-align: right;
    padding-right: 1rem;
    line-height: 30px;
    transition: width 1s ease-in-out;
}

.score-details {
    display: flex;
    gap: 2rem;
}

.score-details p {
    margin: 0;
    font-weight: 500;
}

.pros-cons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.pros, .cons {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pros h2, .cons h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.pros ul, .cons ul {
    padding-left: 1.5rem;
}

.pros li, .cons li {
    margin-bottom: 0.5rem;
}

.reviews {
    background: var(--card-background);
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reviews h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.review-card {
    background: var(--review-background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.2);
}

.review-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.review-card .score {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.review-card p {
    margin: 0;
    font-style: italic;
}

.search-controls {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

#search-input {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    width: 300px;
    max-width: 100%;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

#sort-select {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    #search-input,
    #sort-select {
        background: rgba(30, 30, 30, 0.9);
        color: var(--text-color);
    }
    
    #search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .game-icon img {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .title-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .store-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 0.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .steam-link {
        width: 100%;
        justify-content: center;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .steam-link.price-standard {
        order: -1;
        margin-top: 0;
    }

    .steam-link:not(.price-standard) {
        margin-top: 0.5rem;
    }

    .search-controls {
        flex-direction: column;
        padding: 0 1rem;
        max-width: 400px;
    }

    #search-input {
        width: 87%;
        align-items: center;
    }

    #sort-select {
        width: 100%;
    }

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

    .pros-cons {
        flex-direction: column;
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }

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

/* Add styles for video section */
.game-videos {
    margin-top: 2rem;
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-price {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 1rem 0;
    color: white;
}

.price-budget {
    background-color: #4CAF50;  /* Green for budget prices */
}

.price-standard {
    background-color: #FFA726;  /* Orange for standard prices */
}

.price-premium {
    background-color: #EF5350;  /* Red for premium prices */
}

@media (max-width: 768px) {
    .game-price {
        font-size: 1.1rem;
        padding: 0.4rem 0.8rem;
        margin: 0.5rem 0;
    }
}
