/* === Подключение шрифтов === */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&display=swap');

/* === Базовые стили === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #6464c0;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* ============================================ */
/* ШАПКА                                       */
/* ============================================ */
.site-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: #6464c0;
}

.back-link {
    display: inline-block;
    color: #ffd700;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.site-subtitle {
    font-size: 0.95rem;
    color: #d0d0f0;
    margin-top: 5px;
}

/* ============================================ */
/* ГЛАВНАЯ СТРАНИЦА — КАТЕГОРИИ                */
/* ============================================ */
.homepage-root {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    min-height: 160px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1.2),
                box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.category-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
    border-radius: 16px;
}

.category-card .card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.category-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.category-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.category-count {
    font-size: 0.85rem;
    color: #e0e0e0;
}

/* ============================================ */
/* СТРАНИЦА РЕЙТИНГА — СПИСОК ИГР (ПК)         */
/* ============================================ */
.game-list {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-row {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100px;
    transition: transform 0.2s;
}

.game-row:hover {
    transform: translateY(-2px);
}

.game-row.no-scores {
    opacity: 0.5;
}

.game-row.no-scores:hover {
    opacity: 0.75;
}

/* Номер */
.rank {
    width: 5%;
    min-width: 45px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 2.3rem;
    background: #5050a0;
    color: #ccc;
    flex-shrink: 0;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
}

.rank-silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #1a1a2e;
}

.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.rank-no-score {
    background: #3a3a5a;
    color: #666;
    font-size: 1.5rem;
}

/* GOTY */
.goty-badge {
    width: 40px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: linear-gradient(135deg, #2a2a4a, #1a1a3a);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    flex-shrink: 0;
}

.goty-placeholder {
    width: 40px;
    flex-shrink: 0;
}

.goty-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.goty-year {
    font-size: 0.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

/* Оценки */
.rating-item {
    width: 10%;
    min-width: 60px;
    height: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    padding: 8px 4px 4px 4px;
    transition: transform 0.15s;
}

.rating-item:hover {
    transform: scale(1.06);
}

.rating-value {
    font-size: 2.4rem;
    line-height: 1;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    margin-top: auto;
    margin-bottom: auto;
}

.rating-platform-icon {
    width: 100%;
    max-width: 85px;
    height: auto;
    max-height: 16px;
    object-fit: contain;
    opacity: 0.95;
    margin-top: auto;
    padding: 0 2px;
}

.rating-link {
    text-decoration: none;
    display: block;
    flex-shrink: 0;
}

.rating-link:hover .rating-item {
    transform: scale(1.06);
}

.rating-empty-icon {
    width: 60%;
    max-width: 50px;
    height: auto;
    opacity: 0.6;
    margin-top: auto;
    margin-bottom: auto;
}

/* Цвета */
.green {
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

.orange {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.red {
    background: linear-gradient(135deg, #f44336, #c62828);
}

.dark-text {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3) !important;
}

/* Логотип (ПК) */
.logo-container {
    width: 30%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    flex-shrink: 0;
}

.game-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.game-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.game-name-text {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #ccc;
}

/* Постер (ПК) */
.game-card-link {
    width: 50%;
    height: 100%;
    display: block;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
}

.game-card {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 10px;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
    border-radius: 10px;
}

/* Средняя оценка (ПК) */
.average-badge {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 2.2rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.2);
    z-index: 2;
    border: 2px solid rgba(255,255,255,0.2);
    font-family: 'Oswald', sans-serif;
    letter-spacing: -1px;
}

.average-value {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* ============================================ */
/* СТРАНИЦА ИГРЫ                               */
/* ============================================ */
.site-header-detail {
    position: relative;
    padding: 60px 20px 40px;
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.3) 100%);
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-logo {
    max-width: 500px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.detail-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 3px 10px rgba(0,0,0,0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.detail-root {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
}

.detail-container {
    width: 100%;
    max-width: 1200px;
}

.detail-scores {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.detail-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.detail-score-link {
    text-decoration: none;
    color: inherit;
}

.detail-score-link:hover .score-circle {
    transform: scale(1.1);
}

.score-circle {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.15);
    transition: transform 0.2s;
}

.score-circle:hover {
    transform: scale(1.08);
}

.score-circle.average {
    width: 120px;
    height: 120px;
    border: 4px solid rgba(255,255,255,0.3);
}

.score-number {
    font-family: 'Oswald', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: -1px;
}

.score-circle.average .score-number {
    font-size: 3.2rem;
}

.score-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.score-platform-logo {
    height: 16px;
    object-fit: contain;
    opacity: 0.8;
}

.score-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ddd;
}

.score-source {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-info {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.detail-left {
    flex: 0 0 300px;
}

.detail-poster {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    margin-bottom: 25px;
}

.detail-poster img {
    width: 100%;
    display: block;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
}

.meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
}

.meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: #f0f0f0;
    line-height: 1.4;
}

.detail-right {
    flex: 1;
    min-width: 300px;
}

.detail-description {
    margin-bottom: 25px;
}

.detail-description h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: #d0d0d0;
}

.detail-tags {
    margin-bottom: 25px;
}

.detail-tags h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffd700;
    transition: background 0.2s;
}

.tag-item:hover {
    background: rgba(255, 215, 0, 0.25);
}

.external-link {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255,255,255,0.08);
    border: 2px solid #ffd700;
    border-radius: 8px;
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}

.external-link:hover {
    background: rgba(255,215,0,0.15);
    transform: translateY(-2px);
}

/* ============================================ */
/* ОБЩИЕ ЭЛЕМЕНТЫ                              */
/* ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #c0c0e0;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: #c0c0e0;
    font-size: 0.85rem;
}

/* ============================================ */
/* ПАНЕЛЬ УПРАВЛЕНИЯ (ФИЛЬТРЫ)                 */
/* ============================================ */
.controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #ffd700;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2rem;
}

.search-clear:hover {
    color: #fff;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e1e3a;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-result-item:hover {
    background: rgba(255,215,0,0.1);
    color: #fff;
}

.filter-select, .sort-select, .per-page-select {
    padding: 10px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-select:focus, .sort-select:focus, .per-page-select:focus {
    outline: none;
    border-color: #ffd700;
}

.filter-select option, .sort-select option, .per-page-select option {
    background: #1a1a2e;
    color: #fff;
}

.btn-apply {
    padding: 10px 20px;
    background: #ffd700;
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-apply:hover {
    background: #ffed4a;
}

/* ============================================ */
/* ПАГИНАЦИЯ                                   */
/* ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.page-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.page-btn.active {
    background: #ffd700;
    color: #1a1a2e;
    border-color: #ffd700;
    font-weight: 700;
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-info {
    color: #888;
    font-size: 0.85rem;
    margin: 0 10px;
}

/* ============================================ */
/* АНИМАЦИЯ ПОЯВЛЕНИЯ СТРОК                     */
/* ============================================ */
.game-row {
    opacity: 0;
    transform: translateY(30px);
}

.game-row.animated {
    animation: fadeSlideUp 0.5s ease forwards;
}

.game-row:nth-child(1).animated { animation-delay: 0.00s; }
.game-row:nth-child(2).animated { animation-delay: 0.04s; }
.game-row:nth-child(3).animated { animation-delay: 0.08s; }
.game-row:nth-child(4).animated { animation-delay: 0.12s; }
.game-row:nth-child(5).animated { animation-delay: 0.16s; }
.game-row:nth-child(6).animated { animation-delay: 0.20s; }
.game-row:nth-child(7).animated { animation-delay: 0.24s; }
.game-row:nth-child(8).animated { animation-delay: 0.28s; }
.game-row:nth-child(9).animated { animation-delay: 0.32s; }
.game-row:nth-child(10).animated { animation-delay: 0.36s; }
.game-row:nth-child(11).animated { animation-delay: 0.40s; }
.game-row:nth-child(12).animated { animation-delay: 0.44s; }
.game-row:nth-child(13).animated { animation-delay: 0.48s; }
.game-row:nth-child(14).animated { animation-delay: 0.52s; }
.game-row:nth-child(15).animated { animation-delay: 0.56s; }

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* МОБИЛЬНАЯ ВЁРСТКА (НЕ ТРОГАЕМ)              */
/* ============================================ */

@media (max-width: 900px) {
    .game-row {
        gap: 6px;
        height: 80px;
    }

    .rank {
        min-width: 35px;
        height: 55px;
        font-size: 1.5rem;
    }

    .goty-badge {
        width: 30px;
        height: 45px;
    }

    .goty-placeholder {
        width: 30px;
    }

    .goty-icon {
        width: 18px;
        height: 18px;
    }

    .rating-item {
        min-width: 45px;
        height: 60px;
        padding: 4px 2px;
    }

    .rating-value {
        font-size: 1.6rem;
    }

    .rating-platform-icon {
        max-width: 55px;
        max-height: 12px;
    }

    .logo-container {
        width: 25%;
    }

    .game-card-link {
        width: 45%;
    }

    .average-badge {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        right: 10px;
    }
}

@media (max-width: 600px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .site-header {
        padding: 12px 8px;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .site-subtitle {
        font-size: 0.7rem;
    }

    .homepage-root {
        padding: 5px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-card {
        min-height: 100px;
        padding: 15px 10px;
        border-radius: 12px;
    }

    .category-title {
        font-size: 0.8rem;
    }

    .category-icon {
        font-size: 1.5rem;
    }

    .category-count {
        font-size: 0.7rem;
    }

    .game-list {
        gap: 4px;
    }

    .game-row {
        gap: 2px;
        height: 48px;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        align-items: stretch;
    }

    .rank {
        min-width: 18px;
        width: 18px;
        height: 100%;
        font-size: 0.7rem;
        border-radius: 4px;
    }

    .goty-badge {
        width: 16px;
        height: 100%;
        border-radius: 3px;
        flex-shrink: 0;
    }

    .goty-placeholder {
        width: 16px;
        flex-shrink: 0;
    }

    .goty-icon {
        width: 9px;
        height: 9px;
    }

    .goty-year {
        font-size: 0.22rem;
    }

    .rating-item {
        min-width: 24px;
        width: 24px;
        height: 100%;
        border-radius: 4px;
        padding: 2px 1px;
        flex-shrink: 0;
    }

    .rating-value {
        font-size: 0.8rem;
    }

    .rating-platform-icon {
        max-width: 22px;
        max-height: 6px;
    }

    .mobile-only.game-card-link {
        width: auto;
        flex: 1;
        min-width: 0;
        height: 100%;
        border-radius: 5px;
    }

    .game-card {
        border-radius: 5px;
    }

    .logo-on-poster {
        position: absolute;
        left: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 40%;
        height: 70%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
    }

    .logo-on-poster .game-logo {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
    }

    .logo-on-poster .logo-wide {
        max-width: 100%;
        max-height: 50%;
        object-fit: contain;
    }

    .logo-on-poster .logo-square {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .logo-on-poster .logo-tall {
        max-width: 70%;
        max-height: 100%;
        object-fit: contain;
    }

    .logo-on-poster .game-name-text {
        font-size: 0.5rem;
        font-weight: 600;
        text-align: center;
        color: #fff;
        text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    }

    .average-badge-mobile {
        position: absolute;
        top: 50%;
        right: 4px;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        z-index: 3;
        font-family: 'Oswald', sans-serif;
    }

    .average-badge-mobile .average-value {
        color: #fff;
        text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 6px;
    }

    .search-box {
        min-width: 100%;
    }

    .search-input {
        padding: 8px 35px 8px 10px;
        font-size: 0.85rem;
    }

    .search-clear {
        font-size: 1rem;
        right: 8px;
    }

    .filter-select, .sort-select, .per-page-select {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .btn-apply {
        width: 100%;
        padding: 8px 0;
        font-size: 0.85rem;
    }

    .pagination {
        gap: 3px;
        padding: 0 5px;
    }

    .page-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }

    .page-info {
        font-size: 0.65rem;
        margin: 0 3px;
    }

    .site-header-detail {
        min-height: 150px;
        padding: 20px 10px 15px;
    }

    .detail-logo {
        max-width: 180px;
        max-height: 50px;
    }

    .detail-title {
        font-size: 1.3rem;
    }

    .detail-scores {
        gap: 8px;
    }

    .score-circle {
        width: 55px;
        height: 55px;
    }

    .score-circle.average {
        width: 65px;
        height: 65px;
    }

    .score-number {
        font-size: 1.4rem;
    }

    .score-circle.average .score-number {
        font-size: 1.6rem;
    }

    .score-platform-logo {
        height: 12px;
    }

    .score-label {
        font-size: 0.6rem;
    }

    .score-source {
        font-size: 0.5rem;
    }

    .detail-info {
        flex-direction: column;
        gap: 20px;
    }

    .detail-left {
        flex: auto;
    }

    .detail-poster {
        max-width: 150px;
    }

    .detail-description h2,
    .detail-tags h2 {
        font-size: 1.2rem;
    }

    .detail-description p {
        font-size: 0.9rem;
    }
}