/**
 * 超级玛丽游戏 - 界面样式
 * 优化版：视觉层次、动画效果、响应式设计、性能优化
 */

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

:root {
    --primary: #4CAF50;
    --primary-hover: #66BB6A;
    --primary-active: #388E3C;
    --secondary: #2196F3;
    --secondary-hover: #42A5F5;
    --secondary-active: #1565C0;
    --danger: #F44336;
    --danger-hover: #E57373;
    --danger-active: #C62828;
    --gold: #FFD700;
    --gold-light: #FFE082;
    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --text: #fff;
    --text-muted: #b0b0b0;
    --text-dim: #888;
    --glass-bg: rgba(0, 0, 0, 0.88);
    --glass-bg-light: rgba(0, 0, 0, 0.65);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-light: rgba(255, 255, 255, 0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

body {
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace, Arial, sans-serif;
    overflow: hidden;
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(74, 158, 255, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse at 80% 80%, rgba(231, 60, 60, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(76, 175, 80, 0.08) 0%, transparent 50%);
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 1920px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.9), 
        0 0 80px rgba(74, 158, 255, 0.12),
        0 0 120px rgba(74, 158, 255, 0.06);
    border: 1px solid var(--glass-border-light);
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: auto;
    background: #6B8CFF;
}

.menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn var(--transition-slow) ease;
    will-change: opacity;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(231, 60, 60, 0.5); }
    to { text-shadow: 0 0 20px rgba(231, 60, 60, 0.8), 0 0 35px rgba(231, 60, 60, 0.5); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(255, 215, 0, 0.3); }
    50% { border-color: rgba(255, 215, 0, 0.6); }
}

.hidden {
    display: none !important;
}

.menu-content {
    text-align: center;
    color: var(--text);
    padding: 2.5rem;
    max-width: 650px;
    width: 92%;
    will-change: transform;
}

.title-section {
    margin-bottom: 2.2rem;
    animation: slideUp 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

.game-title {
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    color: #E73C3C;
    text-shadow: 
        4px 4px 0 #000, 
        -2px -2px 0 #000, 
        2px -2px 0 #000, 
        -2px 2px 0 #000,
        0 0 15px rgba(231, 60, 60, 0.4);
    margin-bottom: 0.8rem;
    animation: pulse 1.6s cubic-bezier(0.25, 0.8, 0.25, 1) infinite alternate;
    letter-spacing: 5px;
    font-weight: bold;
    will-change: transform;
}

.subtitle {
    font-size: clamp(0.85rem, 2vw, 1.2rem);
    color: var(--gold);
    opacity: 0.9;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.menu-title {
    font-size: clamp(1.6rem, 3.8vw, 2.6rem);
    color: var(--text);
    margin-bottom: 1.6rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.menu-title.game-over {
    color: #E73C3C;
    animation: glow 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite alternate;
    will-change: text-shadow;
}

.pause-stats, .gameover-stats {
    margin-bottom: 1.6rem;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.pause-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
    min-width: 120px;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-item .stat-label {
    font-size: 0.65rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.stat-item .stat-value {
    font-size: 1.3rem;
    color: var(--text);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.6rem;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.1s both;
}

.menu-btn {
    padding: 1.1rem 2.2rem;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-family: inherit;
    color: var(--text);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    will-change: transform;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--primary), #2E7D32);
    border: 2px solid #1B5E20;
}

.menu-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.45);
}

.menu-btn.primary:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.35);
}

.menu-btn.secondary {
    background: linear-gradient(135deg, var(--secondary), #1565C0);
    border: 2px solid #0D47A1;
}

.menu-btn.secondary:hover {
    background: linear-gradient(135deg, var(--secondary-hover), var(--secondary));
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.45);
}

.menu-btn.secondary:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.35);
}

.menu-btn.danger {
    background: linear-gradient(135deg, var(--danger), #C62828);
    border: 2px solid #B71C1C;
}

.menu-btn.danger:hover {
    background: linear-gradient(135deg, var(--danger-hover), var(--danger));
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.45);
}

.menu-btn.danger:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.35);
}

.btn-icon {
    font-size: 1.15em;
    line-height: 1;
}

.controls-info {
    margin-top: 1.2rem;
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    animation: slideUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.2s both;
}

.controls-info h3 {
    font-size: clamp(0.75rem, 1.6vw, 0.95rem);
    color: var(--gold);
    margin-bottom: 1.1rem;
    letter-spacing: 2px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.7rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    font-size: clamp(0.55rem, 1.3vw, 0.7rem);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition-fast);
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.45rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: monospace;
    min-width: 2rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.control-item:hover .key {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--gold);
}

.gameover-stats {
    margin-bottom: 1.6rem;
}

.final-score {
    font-size: clamp(1.3rem, 3.2vw, 1.9rem);
    color: var(--gold);
    margin-bottom: 1.6rem;
    animation: pulse 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite alternate;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    will-change: transform;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
    animation: scaleIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

.stat-card:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
    border-color: var(--gold);
}

.stat-card .stat-label {
    font-size: 0.55rem;
    color: var(--gold);
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    color: var(--text);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

#hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.4rem;
    background: var(--glass-bg-light);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    z-index: 50;
    box-shadow: var(--shadow-md);
    will-change: transform;
    transition: opacity var(--transition-fast);
}

.hud-section {
    display: flex;
    gap: 1.6rem;
    align-items: center;
}

.hud-section.center {
    margin: 0 1.2rem;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.hud-label {
    font-size: 0.5em;
    color: var(--gold);
    margin-bottom: 0.35rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hud-value {
    font-size: clamp(0.85rem, 1.6vw, 1.15rem);
    color: var(--text);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    font-weight: bold;
    transition: color var(--transition-fast);
}

.hud-value.time-warning {
    color: var(--danger);
    animation: pulse 0.5s infinite;
}

.lives-value {
    color: #E73C3C;
    letter-spacing: 3px;
}

.time-value {
    color: #69F0AE;
}

.level-value {
    color: #E0E0E0;
}

.coin-value {
    color: var(--gold);
}

#mobile-controls {
    position: fixed;
    bottom: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px;
    z-index: 200;
    pointer-events: none;
}

.mobile-dpad {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.dpad-row {
    display: flex;
    gap: 10px;
}

.dpad-btn {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    color: var(--text);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.dpad-btn.wide {
    width: calc(130px);
}

.dpad-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dpad-btn:active {
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0.92);
}

.mobile-actions {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    pointer-events: auto;
}

.action-btn {
    width: 75px;
    height: 75px;
    font-size: 0.75rem;
    font-family: inherit;
    border-radius: 50%;
    color: var(--text);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
    transform: scale(0.88);
}

.jump-btn {
    background: rgba(76, 175, 80, 0.42);
    border: 3px solid rgba(76, 175, 80, 0.7);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.jump-btn:hover {
    background: rgba(76, 175, 80, 0.5);
}

.jump-btn:active {
    background: rgba(76, 175, 80, 0.7);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.run-btn {
    background: rgba(231, 60, 60, 0.42);
    border: 3px solid rgba(231, 60, 60, 0.7);
    box-shadow: 0 4px 12px rgba(231, 60, 60, 0.25);
}

.run-btn:hover {
    background: rgba(231, 60, 60, 0.5);
}

.run-btn:active {
    background: rgba(231, 60, 60, 0.7);
    box-shadow: 0 2px 8px rgba(231, 60, 60, 0.4);
}

@media (max-width: 768px) {
    #mobile-controls {
        display: flex !important;
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 8px;
    }
    #hud {
        top: 8px;
        left: 8px;
        right: 8px;
        padding: 0.55rem 1rem;
    }
    .hud-section {
        gap: 1rem;
    }
    .hud-section.center {
        margin: 0 0.6rem;
    }
    .hud-label {
        font-size: 0.45em;
    }
    .hud-value {
        font-size: 0.8rem;
    }
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    .game-title {
        letter-spacing: 3px;
    }
    .menu-content {
        padding: 1.5rem;
        width: 95%;
    }
    .dpad-btn {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }
    .dpad-btn.wide {
        width: calc(114px);
    }
    .action-btn {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 480px) {
    #game-container {
        border-radius: 0;
        border: none;
    }
    .hud-item {
        min-width: 45px;
    }
    .hud-section {
        gap: 0.6rem;
    }
    .dpad-btn {
        width: 48px;
        height: 48px;
    }
    .action-btn {
        width: 58px;
        height: 58px;
    }
}

@media (min-width: 769px) {
    #mobile-controls {
        display: none !important;
    }
}

@media (min-width: 2560px) {
    :root {
        --game-scale: 1.3;
    }
}

@media print {
    body {
        background: none;
    }
    #mobile-controls,
    #hud,
    .menu-overlay {
        display: none !important;
    }
}

/* ========================================
   皮肤商店样式
   ======================================== */

.shop-container {
    width: 92%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.shop-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid var(--gold);
}

.balance-icon {
    font-size: 1.4rem;
}

.balance-value {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--gold);
    font-weight: bold;
}

.close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: rgba(255, 68, 68, 0.3);
    border-color: var(--danger);
    color: var(--danger);
}

.shop-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: inherit;
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--gold), #DAA520);
    border-color: var(--gold);
    color: var(--darker);
    font-weight: bold;
}

.shop-skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    max-height: 65vh;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) var(--glass-bg);
}

.shop-skins-grid::-webkit-scrollbar {
    width: 8px;
}

.shop-skins-grid::-webkit-scrollbar-track {
    background: var(--glass-bg);
    border-radius: 4px;
}

.shop-skins-grid::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.skin-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.skin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.skin-card:hover .skin-preview {
    background: rgba(255, 255, 255, 0.12);
}

.skin-preview {
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    position: relative;
}

.skin-preview canvas {
    max-width: 80%;
    max-height: 80%;
}

.skin-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.skin-badge.owned {
    background: rgba(76, 175, 80, 0.8);
    color: white;
}

.skin-badge.equipped {
    background: rgba(255, 215, 0, 0.8);
    color: var(--darker);
}

.skin-info {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skin-name {
    font-size: clamp(0.65rem, 1.4vw, 0.8rem);
    color: var(--text);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skin-rarity {
    font-size: 0.55rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.skin-rarity.default {
    background: rgba(136, 136, 136, 0.3);
    color: #888;
}

.skin-rarity.rare {
    background: rgba(65, 105, 225, 0.3);
    color: #4169E1;
}

.skin-rarity.epic {
    background: rgba(148, 0, 211, 0.3);
    color: #9400D3;
}

.skin-rarity.legendary {
    background: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.skin-price {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: var(--gold);
}

.skin-price.free {
    color: #4CAF50;
}

/* 皮肤详情界面 */
.detail-container {
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.detail-container .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.detail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.detail-preview {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-preview canvas {
    max-width: 90%;
    max-height: 90%;
}

.detail-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.detail-name {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.detail-rarity {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
}

.detail-desc {
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

.detail-price {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid var(--gold);
}

.price-icon {
    font-size: 1.5rem;
}

.price-value {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--gold);
    font-weight: bold;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.detail-actions .menu-btn {
    min-width: 140px;
}

.detail-message {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.detail-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.detail-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .shop-container {
        width: 95%;
        max-height: 95vh;
    }
    .shop-header {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    .shop-skins-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 60vh;
        gap: 0.8rem;
    }
    .skin-preview {
        height: 100px;
    }
    .detail-container {
        padding: 1.5rem;
        width: 95%;
    }
    .detail-preview {
        width: 150px;
        height: 150px;
    }
    .detail-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .shop-skins-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .skin-preview {
        height: 80px;
    }
    .shop-tabs {
        gap: 0.3rem;
    }
    .tab-btn {
        padding: 0.5rem 0.8rem;
    }
}
