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

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #0d1f0d 0%, #1a2e1a 50%, #0f3d0f 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Background Titles */
.bg-titles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.03;
}

.bg-title-row {
    display: flex;
    white-space: nowrap;
    animation: scrollLeft 60s linear infinite;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    padding: 0.5rem 0;
}

.bg-title-row:nth-child(even) {
    animation: scrollRight 50s linear infinite;
}

.bg-title-row:nth-child(3n) {
    font-size: 1.5rem;
    animation-duration: 70s;
}

.bg-title-row:nth-child(4n) {
    font-size: 2.5rem;
    animation-duration: 45s;
}

.bg-title-row span {
    margin-right: 3rem;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Ensure content is above background */
header, .controls, .chaos-map, footer, .modal {
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.lang-selector {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: #4ade80;
    border-color: #4ade80;
    color: #000;
}

@media (max-width: 600px) {
    .header-top {
        flex-direction: column;
        gap: 0.5rem;
    }

    .lang-selector {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a, #a3e635);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.stats {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: transparent;
}

/* Trending filter button */
.filter-btn-trending {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: #fff !important;
}

.filter-btn-trending:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
}

.filter-btn-trending.active {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.6);
}

/* Chaos Map Container */
.chaos-map {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Game Card */
.game-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4ade80, #22c55e, #16a34a, #a3e635, #4ade80);
    background-size: 400% 400%;
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientBorder 3s ease infinite;
}

.game-card:hover::before {
    opacity: 1;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-card:hover {
    transform: scale(1.5);
    z-index: 100;
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.6),
        0 0 40px rgba(34, 197, 94, 0.4),
        0 0 60px rgba(34, 197, 94, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Glow color varies by rank */
.game-card.size-xl:hover {
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.7),
        0 0 50px rgba(255, 215, 0, 0.5),
        0 0 75px rgba(255, 215, 0, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.5);
}

.game-card.size-lg:hover {
    box-shadow:
        0 0 20px rgba(74, 222, 128, 0.6),
        0 0 40px rgba(74, 222, 128, 0.4),
        0 0 60px rgba(74, 222, 128, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.5);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .overlay {
    opacity: 1;
}

.game-card .title {
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card .summary {
    font-size: 0.6rem;
    color: #ccc;
    margin-top: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide summary on smaller cards */
.game-card.size-sm .summary,
.game-card.size-xs .summary {
    display: none;
}

.game-card .score {
    font-size: 0.65rem;
    color: #4ade80;
    margin-top: 2px;
}

/* Size Classes based on score */
.game-card.size-xl {
    width: 200px;
    height: 280px;
}

.game-card.size-lg {
    width: 160px;
    height: 224px;
}

.game-card.size-md {
    width: 130px;
    height: 182px;
}

.game-card.size-sm {
    width: 100px;
    height: 140px;
}

.game-card.size-xs {
    width: 80px;
    height: 112px;
}

/* Score Badge */
.score-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Rank Badge */
.rank-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

.rank-badge.top3 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

/* Twitch Badge */
.twitch-badge {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #9146ff, #6441a5);
    color: #fff;
    font-size: 0.55rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* Trending game highlight */
.game-card.trending {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5);
}

.game-card.trending:hover {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.8), 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Other Maps Navigation */
.other-maps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.other-maps-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.other-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.other-map-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.other-map-link.anime {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.2));
    border-color: rgba(99, 102, 241, 0.4);
}
.other-map-link.anime:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(79, 70, 229, 0.4));
}

.other-map-link.game {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.2));
    border-color: rgba(74, 222, 128, 0.4);
}
.other-map-link.game.current {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.5), rgba(34, 197, 94, 0.5));
    border-color: rgba(74, 222, 128, 0.8);
    cursor: default;
}

.other-map-link.youtube {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border-color: rgba(239, 68, 68, 0.4);
}
.other-map-link.youtube:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.4));
}

.other-map-link.vtuber {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.2), rgba(147, 51, 234, 0.2));
    border-color: rgba(192, 132, 252, 0.4);
}
.other-map-link.vtuber:hover {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.4), rgba(147, 51, 234, 0.4));
}

.other-map-link.mobile {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.4);
}

.other-map-link.manga {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border-color: rgba(251, 191, 36, 0.4);
}

.other-map-link.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.2) !important;
    border-color: rgba(100, 100, 100, 0.3) !important;
}
.other-map-link.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .other-maps {
        gap: 0.4rem;
        padding: 0.6rem 0.5rem;
    }
    .other-maps-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.3rem;
    }
    .other-map-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .chaos-map {
        padding: 1rem;
        gap: 8px;
        align-items: flex-end;
    }

    .game-card.size-xl {
        width: 140px;
        height: 196px;
    }

    .game-card.size-lg {
        width: 110px;
        height: 154px;
    }

    .game-card.size-md {
        width: 85px;
        height: 119px;
    }

    .game-card.size-sm {
        width: 65px;
        height: 91px;
    }

    .game-card.size-xs {
        width: 50px;
        height: 70px;
    }

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

    .game-card:hover::before {
        opacity: 0;
    }

    .game-card .overlay {
        opacity: 1;
        background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.9));
    }

    .game-card .title {
        font-size: 0.6rem;
    }

    .game-card .score {
        font-size: 0.5rem;
    }

    .score-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .rank-badge {
        font-size: 0.5rem;
        padding: 1px 4px;
    }

    .bg-titles {
        display: none;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .game-card.size-xl {
        width: 100px;
        height: 140px;
    }

    .game-card.size-lg {
        width: 85px;
        height: 119px;
    }

    .game-card.size-md,
    .game-card.size-sm,
    .game-card.size-xs {
        width: 70px;
        height: 98px;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Detail Panel
   ========================================== */

.detail-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
    backdrop-filter: blur(5px);
}

.detail-panel-overlay.hidden {
    display: none;
}

.detail-panel {
    background: linear-gradient(135deg, #0d1f0d 0%, #1a2e1a 100%);
    color: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
    z-index: 10;
}

.detail-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.detail-image-container {
    margin: -24px -24px 16px -24px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.detail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.detail-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    padding-right: 40px;
}

.detail-title-sub {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

.detail-release {
    color: #4ade80;
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Strength Parameters & Radar Chart */
.detail-strengths {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.detail-strengths:empty {
    display: none;
}

.radar-container {
    flex-shrink: 0;
}

.radar-chart {
    display: block;
}

.stat-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.stat-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.stat-label {
    width: 50px;
    color: #aaa;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat-percent {
    width: 40px;
    text-align: right;
    color: #4ade80;
    font-weight: bold;
}

@media (max-width: 480px) {
    .detail-strengths {
        flex-direction: column;
        gap: 12px;
    }

    .radar-container {
        display: flex;
        justify-content: center;
    }

    .stat-legend-item {
        font-size: 0.8rem;
    }

    .stat-label {
        width: 45px;
    }
}

/* Summary */
.detail-summary {
    line-height: 1.7;
    color: #ddd;
    margin-bottom: 16px;
}

.detail-summary:empty {
    display: none;
}

/* Appeal Points */
.detail-appeal {
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #4ade80;
    margin-bottom: 8px;
}

.appeal-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.8;
    color: #ddd;
}

.appeal-list li {
    margin-bottom: 4px;
}

/* Recommended For */
.detail-recommended {
    margin-bottom: 16px;
}

.recommended-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recommended-tag {
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #a7f3d0;
}

/* Genre Tags */
.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.detail-genres:empty {
    display: none;
}

.detail-genre-tag {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Platform Tags */
.detail-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-platforms:empty {
    display: none;
}

.detail-platform-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #ccc;
}

/* Section */
.detail-section {
    margin-bottom: 20px;
}

.detail-section:empty {
    display: none;
}

.detail-section h3 {
    font-size: 1rem;
    margin: 0 0 8px 0;
    color: #fff;
}

.detail-section p {
    margin: 0;
    color: #ccc;
    line-height: 1.5;
}

/* Store Links */
.detail-links {
    margin-top: 20px;
}

.detail-links h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.detail-link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-link-btn {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    color: #fff;
}

.detail-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.detail-link-btn.steam {
    background: linear-gradient(135deg, #1b2838, #2a475e);
}

.detail-link-btn.playstation {
    background: linear-gradient(135deg, #003791, #0070d1);
}

.detail-link-btn.xbox {
    background: linear-gradient(135deg, #107c10, #0e6e0e);
}

.detail-link-btn.nintendo {
    background: linear-gradient(135deg, #e60012, #c4000f);
}

.detail-link-btn.epic {
    background: linear-gradient(135deg, #313131, #1a1a1a);
}

.detail-link-btn.gog {
    background: linear-gradient(135deg, #86328a, #5c2860);
}

/* Share Buttons */
.detail-share {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-share h3 {
    font-size: 1rem;
    color: #999;
    margin-bottom: 12px;
}

.detail-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.share-icon {
    font-size: 1.1rem;
}

.share-btn-x {
    background: #000 !important;
    border: 1px solid #333;
}

.share-btn-line {
    background: #06c755 !important;
}

.share-btn-facebook {
    background: #1877f2 !important;
}

.share-btn-reddit {
    background: #ff4500 !important;
}

.share-btn-copy {
    background: #555 !important;
}

.share-btn-copy.copied {
    background: #22c55e !important;
}

@media (max-width: 480px) {
    .detail-share-buttons {
        justify-content: center;
    }

    .share-btn {
        flex: 1;
        min-width: 70px;
        justify-content: center;
        padding: 12px 10px;
    }
}

/* Score Display */
.detail-scores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 20px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.3rem;
}

.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4ade80;
}

/* Close Button (Bottom) */
.detail-close-btn-bottom {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.detail-close-btn-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

@media (max-width: 480px) {
    .detail-panel-overlay {
        padding: 0;
    }

    .detail-panel {
        padding: 16px;
        padding-bottom: 24px;
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
    }

    .detail-header h2 {
        font-size: 1.3rem;
    }

    .detail-link-btn {
        flex: 1 1 100%;
        text-align: center;
    }

    .detail-scores {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-close-btn-bottom {
        padding: 18px;
        font-size: 1.2rem;
    }
}
