/* css/style.css */
:root {
    --primary: #00f2ff; /* 霓虹青 */
    --primary-glow: rgba(0, 242, 255, 0.5);
    --secondary: #bc13fe; /* 霓虹紫 */
    --accent: #ff0055; /* 霓虹红 */
    --accent-glow: rgba(255, 0, 85, 0.5);
    --bg-dark: #050505;
    --glass: rgba(15, 15, 35, 0.8);
    --text: #ffffff;
    --font-main: 'Orbitron', 'PingFang SC', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;900&display=swap');

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

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-main);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    overflow: hidden;
    box-shadow: none;
    border: none;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* UI Header */
#ui-header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 5;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 4px;
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
}

.stat-card .label {
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.4s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.3);
    animation: cardAppear 0.4s ease-out;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), transparent, var(--secondary));
    z-index: -1;
    border-radius: 10px;
    opacity: 0.5;
}

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

h1, h2 {
    margin-bottom: 24px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
    text-shadow: 0 0 15px var(--primary-glow);
}

.tutorial-content {
    margin-bottom: 32px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.key-icon {
    background: var(--primary);
    color: #000;
    padding: 6px 15px;
    border-radius: 2px;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.danger-icon {
    background: var(--accent);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 900;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Difficulty Selector */
.difficulty-selector {
    margin-bottom: 30px;
}

.difficulty-selector .label {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.difficulty-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.diff-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 14px;
    transition: all 0.3s ease;
}

.diff-btn.easy:hover, .diff-btn.easy.active {
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}

.diff-btn.normal:hover, .diff-btn.normal.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(0, 242, 255, 0.1);
}

.diff-btn.hard:hover, .diff-btn.hard.active {
    border-color: #ff4400;
    color: #ff4400;
    box-shadow: 0 0 15px rgba(255, 68, 0, 0.3);
    background: rgba(255, 68, 0, 0.1);
}

/* Buttons */
.primary-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 18px 45px;
    font-size: 20px;
    font-weight: 900;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 0 var(--primary);
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px var(--primary-glow);
}

.primary-btn:active {
    transform: scale(0.95);
}

.game-over-title {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.result-stats {
    margin-bottom: 32px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Achievements List */
.achievements-list {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.achievement-badge {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-badge.new {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

.achievement-badge i {
    font-style: normal;
}

@keyframes badgePop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
