/* Tibo Reset Frenzy 2.2 Hyper Edition Stylesheet */
:root {
    --bg-main: #070a12;
    --bg-card: rgba(21, 28, 46, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.3);
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --accent-yellow: #ffea00;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-blue: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 15% 20%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
        radial-gradient(at 85% 80%, rgba(236, 72, 153, 0.08) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* 화면 전체 플래시 효과 */
.screen-flash {
    animation: flashAnim 0.5s ease-out;
}

@keyframes flashAnim {
    0% { filter: brightness(3.5) contrast(1.5); }
    100% { filter: brightness(1.0) contrast(1.0); }
}

/* 상단 헤더 */
header {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 30px;
    filter: drop-shadow(0 0 10px var(--accent-pink));
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-version {
    font-size: 10px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-text-fill-color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

.badge-parody {
    font-size: 10px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-text-fill-color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-badge {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.stat-badge.credit {
    border-color: #f59e0b;
    color: #fde047;
}

.stat-badge.tears {
    border-color: #38bdf8;
    color: #7dd3fc;
}

.stat-badge.reset {
    border-color: var(--accent-red);
    color: #fca5a5;
}

.header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.language-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.language-picker select {
    min-height: 32px;
    padding: 5px 28px 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-main);
    font: inherit;
    cursor: pointer;
}

.language-picker select:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

.btn-header {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-header:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
}

.btn-header.accent {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border: none;
    color: #fff;
}

.btn-header.danger:hover {
    border-color: var(--accent-red);
    color: #f87171;
}

/* 메인 게임 컨테이너 */
.game-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 16px;
    padding: 16px;
    max-width: 1480px;
    margin: 0 auto;
    width: 100%;
}

/* 왼쪽: 게임 메인 스테이지 */
.stage-panel {
    background: radial-gradient(circle at center, #131d36 0%, #080c16 100%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(0, 0, 0, 0.7);
}

/* 상단 리셋 압박 게이지 */
.gauge-container {
    padding: 18px 24px;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 상단 Phase 진화 비주얼 HUD 바 */
.phase-track-panel {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.phase-track-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.next-phase-info {
    font-size: 11px;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.phase-steps-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.phase-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    text-align: center;
}

.phase-step .step-num {
    font-size: 9px;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.phase-step .step-icon {
    font-size: 20px;
    margin: 2px 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.phase-step .step-name {
    font-size: 11px;
    font-weight: 800;
    color: #e2e8f0;
    white-space: nowrap;
}

.phase-step .step-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 3px;
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
}

/* 활성화된 현재 페이즈 (눈에 확 띄는 네온 글로우) */
.phase-step.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(236, 72, 153, 0.25));
    border: 2px solid #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5), inset 0 0 10px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
    animation: activePhasePulse 1.8s infinite alternate;
}

.phase-step.active .step-num {
    color: #38bdf8;
}

.phase-step.active .step-name {
    color: #ffffff;
    font-weight: 900;
}

.phase-step.active .step-badge {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 900;
}

@keyframes activePhasePulse {
    0% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.4); }
    100% { box-shadow: 0 0 22px rgba(236, 72, 153, 0.7); }
}

/* 이미 완료/통과한 페이즈 */
.phase-step.passed {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.12);
}

.phase-step.passed .step-name {
    color: #10b981;
}

.phase-step.passed .step-badge {
    background: #10b981;
    color: #ffffff;
}

/* 미달성 잠김 페이즈 */
.phase-step.locked {
    opacity: 0.5;
    filter: grayscale(0.6);
}

.phase-connector {
    width: 14px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    gap: 8px;
}

.status-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
}

.status-tag.mood {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.4);
    box-shadow: 0 0 8px rgba(244, 114, 182, 0.2);
}

.gauge-title {
    color: #38bdf8;
}

.gauge-percent {
    font-size: 22px;
    font-weight: 900;
    color: #f8fafc;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.gauge-track {
    width: 100%;
    height: 22px;
    background: #090d16;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #3b82f6);
    border-radius: 8px;
    transition: width 0.08s ease-out;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
}

/* 콤보 & 피버 */
.combo-display {
    position: absolute;
    top: 85px;
    left: 24px;
    font-size: 26px;
    font-weight: 900;
    color: var(--accent-yellow);
    text-shadow: 0 0 12px rgba(255, 234, 0, 0.8), 2px 2px 0 #000;
    transform: rotate(-6deg);
    pointer-events: none;
    animation: pulseCombo 0.4s infinite alternate;
}

@keyframes pulseCombo {
    0% { transform: scale(1) rotate(-6deg); }
    100% { transform: scale(1.15) rotate(-4deg); }
}

.fever-banner {
    position: absolute;
    top: 85px;
    right: 24px;
    background: linear-gradient(90deg, #ec4899, #f43f5e);
    color: #fff;
    padding: 6px 16px;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.8);
    animation: feverGlow 0.6s infinite alternate;
    pointer-events: none;
}

@keyframes feverGlow {
    0% { box-shadow: 0 0 10px #f43f5e; }
    100% { box-shadow: 0 0 25px #ec4899, 0 0 35px #fbbf24; }
}

/* 중앙 게임 캔버스 */
.canvas-wrapper {
    flex: 1;
    position: relative;
    cursor: crosshair;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

canvas#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    touch-action: manipulation;
}

canvas#gameCanvas:focus-visible {
    box-shadow: inset 0 0 0 2px var(--accent-cyan);
}

/* 돌발 캡차 QTE 오버레이 */
.qte-container {
    position: absolute;
    top: 30px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    border: 2px solid var(--accent-cyan);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 20;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.qte-header {
    text-align: center;
}

.qte-alert {
    font-size: 15px;
    font-weight: 900;
    color: var(--accent-yellow);
    display: block;
}

.qte-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.qte-keys-list {
    display: flex;
    gap: 10px;
    margin: 6px 0;
}

.qte-key {
    background: #1e293b;
    border: 2px solid #475569;
    color: #f8fafc;
    padding: 8px 14px;
    min-width: 52px;
    min-height: 48px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 4px 0 #0f172a;
    transition: all 0.1s ease;
}

.qte-key:hover,
.qte-key:focus-visible {
    border-color: var(--accent-yellow);
    transform: translateY(-2px);
    outline: none;
}

.qte-key:disabled {
    cursor: default;
}

.qte-key.current {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: scale(1.15);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.qte-key.completed {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    opacity: 0.6;
}

.qte-progress-bar {
    width: 100%;
    height: 6px;
    background: #0f172a;
    border-radius: 4px;
    overflow: hidden;
}

.qte-progress-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    transition: width 0.05s linear;
}

/* 거대 리셋 버튼 */
.button-dock {
    position: absolute;
    bottom: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.big-reset-btn {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff4d6d 0%, #b91c1c 70%, #7f1d1d 100%);
    border: 5px solid #450a0a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(239, 68, 68, 0.4), inset 0 4px 8px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    font-family: inherit;
    font-weight: 900;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.big-reset-btn .btn-icon {
    font-size: 28px;
}

.big-reset-btn .btn-text {
    font-size: 12px;
    letter-spacing: 1px;
}

.big-reset-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 68, 68, 0.7);
}

.big-reset-btn:focus-visible,
.skill-slot:focus-visible {
    outline: 3px solid var(--accent-cyan);
    outline-offset: 3px;
}

.big-reset-btn.ready {
    animation: readyPulse 0.5s infinite alternate;
}

@keyframes readyPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px #ef4444; }
    100% { transform: scale(1.1); box-shadow: 0 0 45px #f87171, 0 0 70px #f59e0b; }
}

.big-reset-btn.pressed {
    transform: scale(0.85) translateY(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), inset 0 6px 12px rgba(0,0,0,0.8);
    background: #991b1b;
}

/* 액티브 스킬 HUD */
.skills-hud-container {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hud-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-cyan);
}

.skills-slots {
    display: flex;
    gap: 12px;
}

.skill-slot {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    padding: 0;
    color: inherit;
    font-family: inherit;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.skill-slot:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.skill-slot:disabled {
    cursor: default;
}

.skill-key {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    font-weight: 900;
    color: var(--accent-cyan);
}

.skill-icon {
    font-size: 22px;
    margin-top: 2px;
}

.skill-name {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 52px;
}

.skill-cd-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.75);
    transition: height 0.1s linear;
}

.skill-cd-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 6px #000;
}

.skill-slot.active-buff {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 15px rgba(255, 234, 0, 0.6);
}

/* 하단 가이드 툴바 */
.instruction-bar {
    padding: 8px 20px;
    background: rgba(8, 12, 22, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.key-hint {
    background: #1e293b;
    color: #f8fafc;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #334155;
    margin: 0 2px;
}

/* 오른쪽 사이드바 */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

/* 탭 네비게이션 */
.tab-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.research-notice {
    font-size: 11px;
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.shop-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-item {
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.shop-item:hover {
    background: var(--bg-card-hover);
    border-color: #475569;
}

.shop-item.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.shop-item.locked {
    opacity: 0.68;
}

.shop-item.affordable {
    opacity: 1;
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.16);
}

.item-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-badge {
    font-size: 10px;
    background: #0284c7;
    color: #fff;
    padding: 1px 5px;
    border-radius: 4px;
}

.item-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.item-stats {
    font-size: 11px;
    color: var(--accent-yellow);
    font-weight: 600;
    margin-top: 2px;
}

.btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-equip {
    background: #334155;
    color: #fff;
}

.btn-equip.equipped {
    background: var(--accent-cyan);
    color: #0f172a;
    font-weight: 800;
}

.btn-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.btn-buy.affordable {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.65), 0 3px 8px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.btn-buy:not(:disabled):hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.btn-buy.disabled,
.btn-buy:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* 업적 리스트 */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-item {
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
}

.achievement-item.unlocked {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.ach-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.ach-text {
    font-size: 11px;
    color: var(--text-muted);
}

.ach-reward {
    font-size: 11px;
    font-weight: 800;
    color: #38bdf8;
}

/* 업적 토스트 팝업 */
.achievement-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.4);
    z-index: 1000;
    animation: toastSlide 0.4s ease-out;
}

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

.ach-icon {
    font-size: 28px;
}

.ach-title {
    font-size: 13px;
    font-weight: 900;
    color: #10b981;
}

.ach-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* 리셋 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
    background: linear-gradient(145deg, #1e293b, #0b0f19);
    border: 2px solid var(--accent-cyan);
    border-radius: 22px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.4), 0 20px 40px rgba(0,0,0,0.8);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.clockout .modal-content {
    border-color: #a7f3d0;
    box-shadow: 0 0 50px rgba(167, 243, 208, 0.28), 0 20px 40px rgba(0,0,0,0.8);
}

.modal-overlay.clockout .modal-title {
    color: #a7f3d0;
    text-shadow: 0 0 15px rgba(167, 243, 208, 0.5);
}

@keyframes modalPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-yellow);
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 234, 0, 0.6);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-reward-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
}

.reward-item .reward-label {
    font-size: 12px;
    color: var(--text-muted);
}

.reward-item .reward-val {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-cyan);
    margin-top: 4px;
}

.modal-btn {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
    color: #0f172a;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.modal-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: #334155;
    color: #f8fafc;
    box-shadow: none;
}

.modal-btn.secondary:hover {
    background: #475569;
}

/* 푸터 */
.footer-disclaimer {
    background: rgba(7, 10, 18, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 10px 24px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-disclaimer strong {
    color: #f59e0b;
}

.hidden {
    display: none !important;
}

/* 반응형 모바일 */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
    .header-controls {
        width: 100%;
    }
    .game-container {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    .sidebar-panel {
        max-height: none;
    }
    .instruction-bar {
        flex-direction: column;
        gap: 6px;
        font-size: 11px;
    }
    .big-reset-btn {
        width: 85px;
        height: 85px;
    }
    .big-reset-btn .btn-icon {
        font-size: 24px;
    }
    .skills-slots {
        gap: 6px;
    }
    .skill-slot {
        width: 50px;
        height: 50px;
    }
    .qte-container {
        width: calc(100% - 24px);
        top: 16px;
        padding: 14px 12px;
    }
    .qte-keys-list {
        width: 100%;
        justify-content: center;
        gap: 7px;
    }
    .qte-key {
        flex: 1;
        max-width: 76px;
        min-width: 0;
        padding: 10px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
