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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0c4a3e 0%, #1a1a2e 100%);
    min-height: 100vh;
    color: #fff;
    padding: 2rem;
}

.games-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.games-header h1 {
    font-size: 2rem;
}

.games-header h1 a {
    color: #fff;
    text-decoration: none;
}

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.search-form input::placeholder {
    color: #888;
}

.search-form input:focus {
    border-color: #44d7a8;
}

.search-form button {
    background: #44d7a8;
    color: #0c4a3e;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(68, 215, 168, 0.3);
}

.search-info {
    color: #a8e6cf;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.search-info a {
    color: #44d7a8;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s, border-color 0.2s;
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: rgba(68, 215, 168, 0.4);
}

.game-card img {
    width: 100%;
    aspect-ratio: 16 / 7.5;
    object-fit: cover;
    display: block;
}

.game-card-body {
    padding: 1rem;
}

.game-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.badge {
    background: rgba(68, 215, 168, 0.15);
    color: #a8e6cf;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.game-price {
    font-weight: 600;
    color: #44d7a8;
    font-size: 0.9rem;
}

.no-results {
    color: #888;
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.pagination a {
    background: rgba(255, 255, 255, 0.1);
    color: #44d7a8;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.pagination a:hover {
    background: rgba(255, 255, 255, 0.18);
}

.page-info {
    color: #888;
    font-size: 0.9rem;
}

/* Detail Page */
.detail {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.detail-hero {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0;
    flex-wrap: wrap;
}

.detail-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.platforms {
    display: flex;
    gap: 0.4rem;
}

.detail-description {
    padding: 1rem 1.5rem;
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Stats */
.detail-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    min-width: 90px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.2rem;
}

.stat-good { color: #44d7a8; }
.stat-mid { color: #f0c040; }
.stat-bad { color: #e06060; }

/* Info Grid */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.info-block h4 {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.info-block p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

/* Tags */
.detail-section {
    padding: 1rem 1.5rem;
}

.detail-section h4 {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #ccc;
}

.tag small {
    color: #666;
}

/* Screenshots */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.screenshot-grid img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

/* Similar Games */
.similar-loading,
.similar-empty {
    color: #888;
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Taxonomy */
.taxonomy-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.taxonomy-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.taxonomy-card:hover {
    border-color: rgba(68, 215, 168, 0.3);
}

.taxonomy-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.taxonomy-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.taxonomy-description {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* About */
.about-text {
    color: #bbb;
    line-height: 1.7;
    font-size: 0.9rem;
    padding-bottom: 1rem;
}

.about-text img {
    max-width: 100%;
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* Audience Discovery */
.audience-explainer {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.audience-explainer strong {
    color: #f0c040;
}

.audience-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.audience-summary {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.audience-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.audience-card:hover {
    border-color: rgba(68, 215, 168, 0.3);
}

.audience-card.audience-untapped {
    border-color: rgba(240, 192, 64, 0.3);
    background: rgba(240, 192, 64, 0.05);
}

.audience-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audience-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audience-untapped-badge {
    background: rgba(240, 192, 64, 0.2);
    color: #f0c040;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audience-metrics {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audience-stat {
    color: #888;
    font-size: 0.8rem;
}

.audience-stat-sim {
    color: #44d7a8;
}

.audience-games {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.audience-game-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    padding: 0.3rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.audience-game-mini:hover {
    background: rgba(255, 255, 255, 0.06);
}

.audience-game-mini img {
    width: 80px;
    aspect-ratio: 16 / 7.5;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.audience-game-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.audience-game-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audience-game-stats {
    font-size: 0.75rem;
    color: #888;
}
