:root {
    --bg-dark: #121212;
    --bg-panel: rgba(2, 11, 17, 0.72);
    --bg-card: rgba(0, 18, 30, 0.72);
    --text-light: #ffffff;
    --text-muted: #aeb8c2;
    --text-dim: #7f8c96;
    --primary: #6FD65D;
    --primary-strong: #5ec54d;
    --orange: #ffb347;
    --border-soft: rgba(255, 255, 255, 0.16);
    --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --radius-lg: 18px;
    --radius-md: 15px;
    --radius-sm: 10px;

    /* 和 serverlist_v5.css 一样的玻璃背景 */
    --cs-glass-border: rgba(255, 255, 255, 0.16);
    --cs-glass-bg: linear-gradient(135deg, rgba(0, 22, 38, 0.64), rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.36));
    --cs-inner-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.42), rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.30));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    padding-bottom: 50px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100%, 1480px);
    max-width: 1480px;
    min-width: 0;
    margin: 0 auto;
    padding: 22px 18px 34px;
}

.wr-page-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.filter-and-top5-container,
.maps-board,
.steam-warning {
    position: relative;
    border: 1px solid var(--cs-glass-border);
    border-radius: var(--radius-lg);
    background: var(--cs-glass-bg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(9px) saturate(95%);
    -webkit-backdrop-filter: blur(9px) saturate(95%);
    overflow: hidden;
}

.filter-and-top5-container::before,
.maps-board::before {
    content: none;
}

.filter-and-top5-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    padding: 18px;
}

.filter-panel,
.top5-card {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    background: var(--cs-inner-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filter-panel {
    min-width: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    width: 100%;
}

.filter-group {
    min-width: 0;
}

.filter-group h3,
.top5-title {
    margin-bottom: 12px;
    color: #eef8f1;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-tag {
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(0, 0, 0, 0.34);
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-tag:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 214, 93, 0.42);
    background: rgba(111, 214, 93, 0.16);
    color: #ffffff;
}

.filter-tag.active {
    transform: translateY(-1px);
    border-color: rgba(111, 214, 93, 0.82);
    background: linear-gradient(135deg, rgba(111, 214, 93, 0.95), rgba(79, 177, 66, 0.88));
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(111, 214, 93, 0.24);
}

.total-count-row {
    display: flex;
    justify-content: center;
}

.total-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.total-count span {
    margin: 0 4px;
    color: var(--primary);
    font-weight: 800;
}

.search-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 2px;
}

.search-bar {
    width: min(100%, 560px);
    min-width: 0;
}

.search-input-container {
    display: flex;
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 15px 10px 18px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
}

.search-input::placeholder {
    color: rgba(220, 230, 235, 0.56);
}

.search-input:focus {
    outline: none;
}

.search-input-container:focus-within {
    border-color: rgba(111, 214, 93, 0.65);
    box-shadow: 0 0 0 3px rgba(111, 214, 93, 0.11);
}

.search-icon {
    width: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    transition: filter 0.2s ease, transform 0.2s ease;
}

.search-icon:hover {
    filter: brightness(1.08);
}

.search-icon:active {
    transform: scale(0.98);
}

.top5-card {
    min-width: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-self: start;
    overflow: hidden;
}

.top5-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.top5-title {
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top5-tabs {
    display: inline-flex;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.top5-tab {
    min-height: 30px;
    padding: 5px 13px;
    border: none;
    border-radius: 999px;
    color: var(--text-muted);
    background: transparent;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease;
}

.top5-tab.active {
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
}

.top5-content {
    position: relative;
    min-height: 0;
}

.top5-list-container {
    position: static;
    width: 100%;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.top5-list-container.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.top5-list {
    list-style: none;
}

.top5-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top5-item:last-child {
    border-bottom: none;
}

.top5-rank {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.top5-rank.number-rank {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.88);
}

.fa-trophy.gold {
    color: #FFD700;
    font-size: 18px;
}

.fa-trophy.silver {
    color: #C0C0C0;
    font-size: 16px;
}

.fa-trophy.bronze {
    color: #CD7F32;
    font-size: 16px;
}

.top5-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.top5-info {
    min-width: 0;
    flex: 0 1 auto;
    max-width: 145px;
}

.top5-name {
    display: inline-block;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.25;
    vertical-align: middle;
}

.top5-name:hover {
    color: var(--primary);
}

.top5-count {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.top5-loading {
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.maps-board {
    padding: 18px;
}

.maps-board-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.maps-board-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.maps-board-header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.maps-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.map-card,
.skeleton-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: var(--cs-inner-bg);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px) saturate(60%);
    -webkit-backdrop-filter: blur(10px) saturate(60%);
}

.map-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.map-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.32);
}

.map-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 138px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.34);
}

.map-image img,
.map-bg-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-bg-image {
    transition: transform 0.42s ease, opacity 0.3s ease;
}

.map-card:hover .map-bg-image {
    transform: scale(1.045);
}

.map-image::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.93) 0%,
        rgba(0, 0, 0, 0.56) 38%,
        rgba(0, 0, 0, 0.18) 72%,
        transparent 100%
    );
    z-index: 1;
}

.map-preview-link {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 0.55;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-preview-link i {
    font-size: 32px;
    line-height: 1;
    color: #6FD65D;
}

.map-preview-link:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.map-preview-link:hover i {
    color: #ffffff;
}

.community-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.56));
}

.community-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.map-tags-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 62px);
}

.map-stat,
.map-tags-container .map-stat {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.image-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 2px;
    padding: 8px 12px 9px;
    color: #ffffff;
}

.map-title,
.map-creator {
    min-width: 0;
}

.map-title {
    width: 100%;
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.18;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.82);
}

.map-title a {
    display: -webkit-box;
    min-width: 0;
    max-width: calc(100% - 18px);
    flex: 0 1 auto;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
    color: var(--orange);
}

.map-title a:hover {
    color: #ffffff;
}

.copy-icon {
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.copy-icon:hover,
.map-title i.fa-copy:hover {
    color: var(--primary);
    transform: scale(1.12);
}

.map-creator {
    width: 100%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.15;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
}

.map-details {
    padding: 11px 12px 12px;
}

.record-section {
    padding-top: 0;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.record-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.record-label {
    min-width: 0;
    color: var(--text-muted);
}

.record-item > .record-label:first-child {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.record-item > .record-label:last-child,
.record-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    color: var(--text-muted);
}

.player-link {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    vertical-align: middle;
}

.player-link:hover {
    color: #ffffff;
}

.player-avatar {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.player-name-content {
    position: relative;
    display: inline-block;
    max-width: 110px;
    overflow: visible;
    white-space: nowrap;
    vertical-align: bottom;
}

.player-name-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.92);
    color: #ffffff;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-name-content:hover .player-name-tooltip {
    opacity: 1;
    visibility: visible;
}

.flag-original-size {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    vertical-align: middle;
}

.loading-indicator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 34px 0;
    color: var(--text-muted);
}

.loading-spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.10);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

.skeleton-card {
    height: 285px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer 1.45s infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.no-results i {
    display: block;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.22);
    font-size: 44px;
}

.no-results button,
#clear-filters {
    border-radius: 999px !important;
    background: var(--primary) !important;
}

.lazyload {
    background: rgba(0, 0, 0, 0.34) center no-repeat;
    background-size: 40px;
    opacity: 0.55;
}

.lazyloaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.load-more-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px 0 2px;
}

#load-more-btn {
    display: none;
    min-width: 150px;
    min-height: 42px;
    padding: 10px 22px;
    border: 1px solid rgba(111, 214, 93, 0.58);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(111, 214, 93, 0.16);
    transition: transform 0.2s ease, filter 0.2s ease;
}

#load-more-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.copy-notification,
.error-notification {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 9999;
    transform: translateX(-50%) translateY(100px);
    max-width: min(92vw, 520px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.95);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
}

.close-icon {
    opacity: 0.9;
}

.steam-warning {
    max-width: 760px;
    margin: 22px auto;
    padding: 22px;
}

.warning-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #ffb347;
}

.instruction {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.url-copy-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.32);
}

.url-copy-container span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-family: monospace;
}

.copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    transition: filter 0.2s ease;
}

.copy-btn:hover {
    filter: brightness(1.08);
}

.browser-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 12px;
}

.cs-upload-section {
    width: min(100%, 360px);
    max-width: 800px;
    margin: 11px auto;
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.30);
    box-shadow: 0 0 0 1px rgba(111, 214, 93, 0.16);
}

@media (max-width: 1380px) {
    .maps-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .filter-and-top5-container {
        grid-template-columns: 1fr;
    }

    .maps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .container {
        padding: 14px 10px 28px;
    }

    .wr-page-shell {
        gap: 14px;
    }

    .filter-and-top5-container,
    .maps-board {
        border-radius: 18px;
        padding: 12px;
    }

    .filter-panel,
    .top5-card {
        border-radius: 14px;
        padding: 14px;
    }

    .filter-groups {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .filter-tags {
        gap: 7px;
    }

    .filter-tag {
        min-height: 32px;
        padding: 7px 11px;
        font-size: 12px;
    }

    .top5-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .top5-title {
        width: 100%;
        white-space: normal;
    }

    .maps-board-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .maps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .map-image {
        min-height: 132px;
    }

    .map-details {
        padding: 10px;
    }

    .image-caption {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        padding: 8px 10px;
    }

    .map-creator {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .community-badge {
        width: 34px;
        height: 34px;
    }

    .map-tags-container {
        max-width: calc(100% - 54px);
    }
}

@media (max-width: 560px) {
    body {
        padding-bottom: 30px;
    }

    .container {
        padding: 10px 8px 22px;
    }

    .filter-and-top5-container,
    .maps-board,
    .steam-warning {
        border-radius: 16px;
    }

    .filter-and-top5-container {
        gap: 12px;
    }

    .filter-panel,
    .top5-card {
        padding: 12px;
    }

    .search-input-container {
        min-height: 40px;
        border-radius: 13px;
    }

    .search-icon {
        width: 46px;
        flex-basis: 46px;
    }

    .search-input {
        padding-left: 13px;
        font-size: 13px;
    }

    .total-count {
        width: 100%;
        border-radius: 12px;
    }

    .top5-tabs {
        width: 100%;
    }

    .top5-tab {
        flex: 1;
    }

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

    .map-card:hover {
        transform: none;
    }

    .map-image {
        min-height: 178px;
    }

    .record-item {
        align-items: flex-start;
        gap: 6px;
    }

    .record-item > .record-label:last-child,
    .record-value {
        max-width: 72%;
    }

    .player-name-content {
        max-width: 126px;
    }

    .load-more-wrap {
        padding-top: 16px;
    }

    #load-more-btn {
        width: 100%;
    }

    .url-copy-container {
        align-items: stretch;
        flex-direction: column;
        border-radius: 14px;
    }

    .copy-btn {
        justify-content: center;
    }
}

@media (max-width: 370px) {
    .map-image {
        min-height: 154px;
    }

    .map-title {
        font-size: 13px;
    }

    .record-item > .record-label:last-child,
    .record-value {
        max-width: 68%;
    }
}


/* =========================================================
   2026-06 fix2：修复 Top5 标题、按钮圆角、玩家名 tooltip、地图名下划线显示
   ========================================================= */
:root {
    --radius-lg: 10px;
    --radius-md: 8px;
    --radius-sm: 5px;
}

button,
.filter-tag,
.top5-tabs,
.top5-tab,
.search-input-container,
.search-input,
.search-icon,
.total-count,
.top5-count,
.map-stat,
.map-tags-container .map-stat,
#load-more-btn,
.copy-btn,
.url-copy-container {
    border-radius: 5px !important;
}

.filter-tag {
    min-height: 32px;
    padding: 7px 12px;
    box-shadow: none !important;
}

.filter-tag.active {
    box-shadow: none !important;
}

.top5-header {
    gap: 8px;
}

.top5-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 13px;
    letter-spacing: 0;
}

.top5-tabs {
    display: inline-flex;
    flex-shrink: 0;
    gap: 5px;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.top5-tab {
    min-height: 30px;
    padding: 5px 10px;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: rgba(0, 0, 0, 0.30) !important;
    box-shadow: none !important;
    color: var(--text-muted);
}

.top5-tab.active {
    border-color: rgba(111, 214, 93, 0.76) !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.top5-info {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.top5-name {
    max-width: 100%;
}

.map-card {
    overflow: visible;
}

.map-image {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.map-details,
.record-section,
.record-item,
.record-value,
.player-link,
.player-name-content {
    overflow: visible !important;
}

.record-value {
    position: relative;
    max-width: 72%;
}

.player-name-content {
    max-width: 118px;
    text-overflow: ellipsis;
}

.player-name-tooltip {
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: min(280px, 70vw);
    padding: 6px 10px;
    border-radius: 5px !important;
    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
    z-index: 3000;
}

.player-name-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.92) transparent transparent transparent;
}

.map-title {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.map-title a {
    min-width: 0;
    max-width: calc(100% - 18px);
    flex: 0 1 auto;
}

.copy-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    margin-left: 0;
}

.map-preview-link,
.map-preview-link:hover {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 820px) {
    .top5-title {
        white-space: normal !important;
    }

    .top5-header {
        align-items: flex-start;
    }

    .record-value {
        max-width: 76%;
    }
}

@media (max-width: 560px) {
    .top5-header {
        flex-direction: column;
    }

    .top5-tabs {
        width: 100%;
    }

    .top5-tab {
        flex: 1;
    }

    .player-name-content {
        max-width: 126px;
    }
}

/* 给 Top5 多一点宽度，避免标题被挤成省略号 */
@media (min-width: 1121px) {
    .filter-and-top5-container {
        grid-template-columns: minmax(0, 1fr) 390px;
    }
}


/* =========================================================
   2026-08 地图播放 / 下载按钮 + 下载检测弹窗
   ========================================================= */

.map-action-buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translate(-50%, -50%);
}

.map-action-btn,
.map-preview-link.map-action-btn,
.map-download-btn.map-action-btn {
    position: relative !important;
    inset: auto !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px;
    min-height: 25px;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 5px !important;
    background: rgb(9 13 17 / 0%) !important;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(8px);

    opacity: .82;
    color: #dce3e8;
    cursor: pointer;
    transition:
        opacity .18s ease,
        transform .22s cubic-bezier(.22, 1, .36, 1),
        border-color .18s ease,
        background .18s ease,
        color .18s ease !important;
}

.map-action-btn i,
.map-preview-link.map-action-btn i {
    margin: 0;
    font-size: 14px !important;
    line-height: 1;
    color: currentColor !important;
}

.map-preview-link.map-action-btn {
    color: #79da68;
}

.map-download-btn.map-action-btn {
    color: #ffbd67;
}

.map-action-btn:hover,
.map-preview-link.map-action-btn:hover,
.map-download-btn.map-action-btn:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.045) !important;
/*    background: rgba(18, 24, 29, .92) !important;*/
    border-color: rgba(255, 255, 255, .30) !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, .40),
        inset 0 1px 0 rgba(255, 255, 255, .09) !important;
}

.map-preview-link.map-action-btn:hover {
    color: #9bed8f;
    border-color: rgba(111, 214, 93, .50) !important;
}

.map-download-btn.map-action-btn:hover {
    color: #ffd294;
    border-color: rgba(255, 179, 71, .52) !important;
}

.map-action-btn:active,
.map-preview-link.map-action-btn:active,
.map-download-btn.map-action-btn:active {
    transform: translateY(0) scale(.97) !important;
}

/* 覆盖旧的大播放按钮布局 */
.map-image > .map-preview-link:not(.map-action-btn) {
    display: none !important;
}


/* 下载检测弹窗 */
.map-download-dialog[hidden] {
    display: none !important;
}

.map-download-dialog {
    position: fixed;
    inset: 0;
    z-index: 1000005;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    transition: opacity .18s ease;
}

.map-download-dialog.show {
    opacity: 1;
}

.map-download-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .64);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.map-download-dialog-card {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 36px));
    overflow: auto;
    padding: 17px;

    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background:
        radial-gradient(circle at 15% 0%, rgba(111, 214, 93, .07), transparent 34%),
        rgba(15, 20, 24, .97);
    box-shadow: 0 28px 76px rgba(0, 0, 0, .58);

    transform: translateY(10px) scale(.985);
    transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}

.map-download-dialog.show .map-download-dialog-card {
    transform: translateY(0) scale(1);
}

.map-download-dialog-close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .035);
    color: #aeb7bf;
    font-size: 18px;
    line-height: 1;
}

.map-download-dialog-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.map-download-dialog-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-right: 34px;
    margin-bottom: 14px;
}

.map-download-dialog-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 179, 71, .24);
    border-radius: 9px;
    background: rgba(255, 179, 71, .07);
    color: #ffbd67;
}

.map-download-dialog-head h3 {
    margin: 0;
    color: #e7ecef;
    font-size: 14px;
    line-height: 1.2;
}

.map-download-dialog-mapname {
    margin-top: 3px;
    overflow: hidden;
    color: #88939d;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.map-download-loading,
.map-download-empty {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #8f99a2;
    font-size: 11px;
    text-align: center;
}

.map-download-empty i {
    color: #cf9a6d;
}

.map-download-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(255, 255, 255, .10);
    border-top-color: #ffb347;
    border-radius: 50%;
    animation: spin .72s linear infinite;
}

.map-download-source-list {
    display: grid;
    gap: 7px;
}

.map-download-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;

    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    color: inherit;
    text-decoration: none !important;

    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.map-download-source:hover {
    border-color: rgba(255, 179, 71, .28);
    background: rgba(255, 179, 71, .045);
    transform: translateY(-1px);
}

.map-download-source.is-primary {
    border-color: rgba(111, 214, 93, .22);
    background: rgba(111, 214, 93, .035);
}

.map-download-source-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.map-download-format {
    min-width: 36px;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .065);
    color: #cbd3d9;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.map-download-source-copy {
    min-width: 0;
}

.map-download-source-copy strong,
.map-download-source-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-download-source-copy strong {
    color: #dce2e6;
    font-size: 11px;
}

.map-download-source-copy small {
    margin-top: 2px;
    color: #69747e;
    font-size: 9px;
}

.map-download-source-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffbd67;
}

.map-download-source-action em {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(111, 214, 93, .09);
    color: #83d978;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
}

.map-download-source-action i {
    font-size: 12px;
}

@media (max-width: 560px) {
    .map-action-buttons {
        gap: 7px;
    }

    .map-action-btn,
    .map-preview-link.map-action-btn,
    .map-download-btn.map-action-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        min-height: 36px;
    }

    .map-download-dialog {
        padding: 10px;
    }

    .map-download-dialog-card {
        width: calc(100vw - 20px);
        padding: 14px;
    }
}


/* =========================================================
   v2：下载来源显示“国内地址 / 国外地址”，不显示推荐
   ========================================================= */
.map-download-source.is-primary {
    border-color: rgba(255,255,255,.09) !important;
    background: rgba(255,255,255,.025) !important;
}

.map-download-region {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.map-download-region.is-domestic {
    border: 1px solid rgba(111,214,93,.20);
    background: rgba(111,214,93,.08);
    color: #85dc79;
}

.map-download-region.is-overseas {
    border: 1px solid rgba(115,191,232,.18);
    background: rgba(115,191,232,.07);
    color: #8ac9ec;
}

/* =========================================================
   2026-09 v3：桌面恢复 5 列，保留地图名两行 + 紧凑作者布局
   ========================================================= */
@media (min-width: 1381px) {
    .maps-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 14px;
    }
}

/* 中等桌面仍保持 4 列，避免卡片过窄 */
@media (min-width: 1121px) and (max-width: 1380px) {
    .maps-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

