/* ==================== CSS Variables ==================== */
:root {
    --primary-color: #ff6b35;
    --primary-glow: rgba(255, 107, 53, 0.5);
    --secondary-color: #4ecdc4;
    --secondary-glow: rgba(78, 205, 196, 0.5);
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.9);
    --bg-card-hover: rgba(30, 30, 45, 0.95);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --success-color: #00ff88;
    --error-color: #ff4757;
    --warning-color: #ffa502;

    /* Rarity Colors */
    --rarity-consumer: #b0c3d9;
    --rarity-industrial: #5e98d9;
    --rarity-milspec: #4b69ff;
    --rarity-restricted: #8847ff;
    --rarity-classified: #d32ce6;
    --rarity-covert: #eb4b4b;
    --rarity-gold: #e4ae39;

    --border-radius: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

/* ==================== Particles Background ==================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==================== Container ==================== */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.screen {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.5s ease;
}

.screen.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Start Screen ==================== */
.logo-container {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.5;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.title-cs {
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px var(--primary-glow);
    animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from {
        filter: drop-shadow(0 0 20px var(--primary-glow));
    }

    to {
        filter: drop-shadow(0 0 40px var(--primary-glow));
    }
}

.title-divider {
    width: 3px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--secondary-color), transparent);
}

.title-quiz {
    background: linear-gradient(135deg, var(--secondary-color), #45b7aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 15px;
    letter-spacing: 2px;
}

/* ==================== Buttons ==================== */
.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-bottom: 50px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 50px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 250px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #e55a2b);
    color: white;
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn.pulse {
    animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {

    0%,
    100% {
        box-shadow: 0 8px 30px var(--primary-glow);
    }

    50% {
        box-shadow: 0 8px 50px var(--primary-glow), 0 0 0 10px rgba(255, 107, 53, 0.1);
    }
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-icon-only {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon-only:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
}

/* ==================== Stats Preview ==================== */
.stats-preview {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 0 0 20px var(--secondary-glow);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== Game Screen ==================== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    margin-bottom: 110px;
    /* 电脑端大幅增加下边距，使其视觉上更靠上 */
    width: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.score-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--warning-color);
}

.combo-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 165, 2, 0.2));
    border-radius: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
}

.combo-display.active {
    opacity: 1;
    transform: scale(1);
}

.combo-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.combo-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Timer */
.timer-container {
    position: relative;
    width: 70px;
    height: 70px;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 6;
}

.timer-progress {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-progress.warning {
    stroke: var(--warning-color);
}

.timer-progress.danger {
    stroke: var(--error-color);
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.question-counter {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.counter-divider {
    color: var(--text-muted);
    margin: 0 3px;
}

/* ==================== Question Area ==================== */
.question-area {
    text-align: center;
    margin-bottom: 30px;
}

.skin-image-container {
    margin-bottom: 25px;
}

.image-frame {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: linear-gradient(145deg, var(--bg-card), rgba(30, 30, 45, 0.8));
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--secondary-color);
}

.corner-tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.skin-image {
    max-width: 350px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform var(--transition-normal);
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.image-loading.active {
    display: block;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.question-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==================== Options ==================== */
.options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .options-container {
        grid-template-columns: 1fr;
    }
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--secondary-color);
    transform: translateX(5px);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-btn.correct {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 200, 100, 0.1));
    border-color: var(--success-color);
    animation: correct-pulse 0.5s ease;
}

@keyframes correct-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.option-btn.wrong {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(200, 50, 60, 0.1));
    border-color: var(--error-color);
    animation: wrong-shake 0.5s ease;
}

@keyframes wrong-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.option-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ==================== Feedback Overlay ==================== */
.feedback-overlay {
    position: fixed;
    top: 70px;
    right: 30px;
    width: 360px;
    max-width: 90vw;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 80;
    pointer-events: none;
    animation: fadeIn 0.3s ease;
}

.feedback-overlay.hidden {
    display: none;
}

.feedback-content {
    position: relative;
    text-align: left;
    width: 100%;
    padding: 28px 28px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: translate(0, 0) scale(1) rotate(0deg);
}

.feedback-content.flying {
    transform: translate(var(--from-x, 0px), var(--from-y, 0px)) scale(0.65) rotate(-10deg);
    opacity: 0.85;
}

.feedback-content.settled {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
}

.feedback-content::before,
.feedback-content::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: -1;
}

.feedback-content::before {
    transform: translate(10px, 12px) rotate(2deg);
    opacity: 0.65;
}

.feedback-content::after {
    transform: translate(4px, 6px) rotate(-1.5deg);
    opacity: 0.4;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-icon {
    font-size: 3.8rem;
    margin-bottom: 12px;
    line-height: 1;
}

.feedback-icon.correct {
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.feedback-icon.wrong {
    animation: shake 0.6s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.feedback-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.feedback-text.correct {
    color: var(--success-color);
}

.feedback-text.wrong {
    color: var(--error-color);
}

.skin-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 18px 16px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-width: 84px;
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
}

.rarity-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.rarity-badge.consumer {
    background: rgba(176, 195, 217, 0.2);
    color: var(--rarity-consumer);
}

.rarity-badge.industrial {
    background: rgba(94, 152, 217, 0.2);
    color: var(--rarity-industrial);
}

.rarity-badge.milspec {
    background: rgba(75, 105, 255, 0.2);
    color: var(--rarity-milspec);
}

.rarity-badge.restricted {
    background: rgba(136, 71, 255, 0.2);
    color: var(--rarity-restricted);
}

.rarity-badge.classified {
    background: rgba(211, 44, 230, 0.2);
    color: var(--rarity-classified);
}

.rarity-badge.covert {
    background: rgba(235, 75, 75, 0.2);
    color: var(--rarity-covert);
}

.rarity-badge.gold {
    background: rgba(228, 174, 57, 0.2);
    color: var(--rarity-gold);
}

/* ==================== Result Screen ==================== */
.result-container {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.result-header {
    margin-bottom: 40px;
}

.result-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.final-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-score .score-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.score-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: score-glow 2s ease-in-out infinite alternate;
}

@keyframes score-glow {
    from {
        filter: drop-shadow(0 0 10px var(--primary-glow));
    }

    to {
        filter: drop-shadow(0 0 30px var(--primary-glow));
    }
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.result-stat .stat-icon {
    font-size: 1.5rem;
}

.result-stat .stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-stat .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.new-record {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(228, 174, 57, 0.2), rgba(255, 165, 2, 0.2));
    border: 2px solid var(--warning-color);
    border-radius: 50px;
    margin-bottom: 30px;
    animation: record-pulse 1s ease-in-out infinite;
}

@keyframes record-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.new-record.hidden {
    display: none;
}

.record-icon {
    font-size: 1.5rem;
}

.record-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warning-color);
}

.name-input-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.name-input-container.hidden {
    display: none;
}

.name-input-container input {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.name-input-container input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.name-input-container input::placeholder {
    color: var(--text-muted);
}

.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== Leaderboard Screen ==================== */
.leaderboard-container {
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.leaderboard-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2rem;
    margin-bottom: 30px;
}

.trophy {
    font-size: 2.5rem;
    animation: trophy-glow 2s ease-in-out infinite alternate;
}

@keyframes trophy-glow {
    from {
        filter: drop-shadow(0 0 10px rgba(228, 174, 57, 0.5));
    }

    to {
        filter: drop-shadow(0 0 25px rgba(228, 174, 57, 0.8));
    }
}

.leaderboard-list {
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(150, 150, 150, 0.1));
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(180, 100, 40, 0.1));
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.rank-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1a1a1a;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #1a1a1a;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #b8690e);
    color: #1a1a1a;
}

.player-name {
    flex: 1;
    font-weight: 600;
}

.player-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.player-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-leaderboard {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-leaderboard-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ==================== Pause Overlay ==================== */
.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.pause-overlay.hidden {
    display: none;
}

.pause-content {
    text-align: center;
}

.pause-content h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .game-header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-center {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .skin-image {
        max-width: 280px;
        max-height: 200px;
    }

    .feedback-content {
        padding: 25px;
    }

    .leaderboard-container,
    .result-container {
        padding: 25px;
    }
}

/* ==================== Music Question Styles ==================== */
/* 音乐题目模糊效果 */
.image-frame.music-mode .skin-image {
    filter: blur(25px) brightness(0.7);
    transition: filter 0.5s ease;
}

.image-frame.music-mode.revealed .skin-image {
    filter: blur(8px) brightness(0.85);
}

/* 音乐播放按钮 */
.music-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
}

.music-play-button.active {
    display: flex;
}

.music-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
}

/* 播放图标 (三角形) */
.play-icon {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid var(--secondary-color);
    margin-left: 5px;
    transition: all 0.3s ease;
}

.music-play-button:hover .play-icon {
    border-left-color: var(--primary-color);
}

/* 播放中状态 - 暂停图标 */
.music-play-button.playing .play-icon {
    border: none;
    width: 24px;
    height: 30px;
    margin-left: 0;
    background: linear-gradient(to right,
            var(--secondary-color) 0%,
            var(--secondary-color) 35%,
            transparent 35%,
            transparent 65%,
            var(--secondary-color) 65%,
            var(--secondary-color) 100%);
}

.music-play-button.playing:hover .play-icon {
    background: linear-gradient(to right,
            var(--primary-color) 0%,
            var(--primary-color) 35%,
            transparent 35%,
            transparent 65%,
            var(--primary-color) 65%,
            var(--primary-color) 100%);
}

/* 播放按钮动画 */
.music-play-button.playing {
    animation: pulse-button 1.5s ease-in-out infinite;
}

@keyframes pulse-button {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
    }

    50% {
        box-shadow: 0 0 50px rgba(78, 205, 196, 0.7);
    }
}

/* 音乐盒专辑封面样式调整 */
.image-frame.music-mode {
    background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 30, 0.95));
}

.image-frame.music-mode .corner {
    border-color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .music-play-button {
        width: 60px;
        height: 60px;
    }

    .play-icon {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 20px solid var(--secondary-color);
    }

    .music-play-button.playing .play-icon {
        width: 18px;
        height: 24px;
    }

    /* 移动端布局调整：禁止滚动 */
    .container {
        padding: 5px;
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
        /* 强制禁止滚动 */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* 首页恢复与PC一致（只是缩放/适配） */
    .main-title {
        font-size: 2rem;
        /* 稍微大一点 */
        margin-bottom: 5px;
        flex-wrap: nowrap;
        /* 不换行 */
    }

    .subtitle {
        display: block;
        /* 恢复显示 */
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .start-buttons {
        gap: 10px;
        margin-bottom: 20px;
    }

    .btn {
        padding: 12px 30px;
        /* 缩小按钮尺寸以适应 */
        min-width: 200px;
    }

    /* 游戏界面紧凑布局 - 水平排列模式 */
    .game-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 8px 10px;
        margin: 0;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        z-index: 10;
        pointer-events: none;
    }

    .game-header>* {
        pointer-events: auto;
    }

    /* 移除子元素的背景框（除了连击） */
    .game-header .score-display,
    .game-header .question-counter {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        backdrop-filter: none !important;
    }

    /* 得分：左侧第一个 */
    .game-header .score-display {
        flex-shrink: 0;
        align-items: center;
        gap: 4px;
    }

    /* 连击：得分右边，保持原有样式 */
    .game-header .combo-display {
        flex-shrink: 0;
        padding: 4px 10px;
        transform-origin: center center;
    }

    /* 计时器：中间位置 */
    .game-header .timer-container {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .timer-text {
        font-size: 0.9rem;
    }

    /* 题目数：计时器右边 */
    .game-header .question-counter {
        flex-shrink: 0;
    }

    /* 暂停按钮：最右侧 */
    .game-header .btn-icon-only {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .score-value {
        font-size: 1rem;
    }

    .score-label,
    .combo-label {
        font-size: 0.6rem;
    }

    .combo-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.65rem;
        opacity: 0.7;
    }

    .combo-value {
        font-size: 1rem;
        color: var(--warning-color);
    }

    /* 左右两侧的分数和连击数 */
    .score-container,
    .combo-container {
        z-index: 1;
        transform: scale(0.85);
        /* 稍微缩小以适应 */
        flex-shrink: 0;
    }

    .score-value {
        font-size: 1.2rem;
    }

    .combo-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .timer-container {
        width: 50px;
        /* 进一步缩小计时器 */
        height: 50px;
        margin-top: 0;
    }

    .timer-text {
        font-size: 1.2rem;
    }

    /* 之前针对 game-screen 的标题调整，现在需要更具体的选择器，避免影响 main-title */
    .game-screen .main-title {
        display: none;
        /* 游戏界面可能不需要大标题？或者保持原样 */
    }

    /* 实际上原代码中 .game-header 并没有用到 .main-title，而是 h1.main-title 在 startScreen */

    .question-area {
        margin-bottom: 10px;
    }

    .skin-image-container {
        margin-bottom: 5px;
    }

    .image-frame {
        padding: 4px;
    }

    .skin-image {
        max-height: 22vh;
        object-fit: contain;
    }

    .question-text h2 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .options-container {
        gap: 8px;
    }

    .feedback-overlay {
        position: absolute;
        top: 25%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%);
        width: 70%;
        min-width: 180px;
        max-width: 250px;
        margin: 0;
        z-index: 100;
        pointer-events: none;
    }

    /* 移动端弹窗动画 - 使用 @keyframes 完全重写 */
    @keyframes mobilePopupIn {
        0% {
            opacity: 0;
            transform: scale(0.9);
        }

        100% {
            opacity: 1;
            transform: scale(1);
        }
    }

    /* 移动端专用类：完全独立的动画系统 */
    .feedback-content.mobile-popup {
        animation: mobilePopupIn 0.25s ease-out forwards !important;
        transform: scale(1) !important;
        opacity: 1;
    }

    /* 禁用PC端的flying/settled在移动端的任何效果 */
    .feedback-content.flying,
    .feedback-content.settled {
        animation: mobilePopupIn 0.25s ease-out forwards !important;
        transform: scale(1) !important;
    }

    .feedback-content {
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(20, 20, 30, 0.95);
        backdrop-filter: blur(8px);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* 禁用所有 transition，改用 animation */
        transition: none !important;
        transform-origin: center center;
    }

    /* 移除伪元素的卡片叠层效果 */
    .feedback-content::before,
    .feedback-content::after {
        display: none !important;
    }

    .feedback-icon {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .feedback-text {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .skin-info {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 8px;
        width: 100%;
        margin-top: 4px;
        padding: 4px;
        background: rgba(255, 255, 255, 0.05);
        border: none;
    }

    .info-row {
        width: auto;
        flex-shrink: 0;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 0;
        border: none;
    }

    /* 强制第一行（名称）独占一行 */
    .info-row:first-child {
        width: 100%;
    }

    .info-label {
        font-size: 0.65rem;
        opacity: 0.6;
        display: none;
        /* 移动端极其紧凑模式：隐藏标签 */
    }

    .info-value {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        font-weight: 500;
    }

    /* 不需要 grid override 了，清空 */
    .info-row:nth-child(2) {
        grid-column: auto;
    }

    .info-row:first-child {
        grid-column: auto;
    }
}

}