:root {
    --bg-color: #050505;
    --primary-color: #00f3ff;
    --secondary-color: #ff0055;
    --text-color: #e0e0e0;
    --panel-bg: rgba(20, 20, 20, 0.9);
}

body {
    margin: 0;
    background-color: #050505;
    background: radial-gradient(circle at center, #101010 0%, #000000 100%);
    color: var(--text-color);
    font-family: 'Orbitron', monospace;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* LOGIN SCREEN */
#login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.login-box {
    width: 480px;
    padding: 40px;
    background: var(--panel-bg);
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    position: relative;
    z-index: 10;
}

#buttonDiv {
    /* 둥근 타원 모양을 없애는 핵심 코드! ㅋ */
    border-radius: 4px !important; 
    overflow: visible !important; 
    
    /* 크기 설정 */
    width: 100%;
    max-width: 400px; /* 원하는 가로 길이 ㅋ */
    height: auto;
    
    /* 중앙 정렬 */
    display: flex;
    justify-content: center;
    margin: 20px auto;
    
    /* 네온 효과 추가 (네온 블루 ㅋ) */
    box-shadow: 0 0 15px #00F3FF; 
}

/* 구글이 강제로 넣는 스타일 무시하기 ㅋ */
#buttonDiv iframe {
    border-radius: 4px !important;
}

.login-btns {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    margin-top: 30px !important;
}

.login-btns>* {
    border-radius: 50% !important;
    overflow: hidden !important;
}

#btn-login-google {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.system-title {
    margin: 0 0 30px 0;
    font-size: 24px;
    text-align: center;
    /* Centered title */
    letter-spacing: 2px;
}

.system-title span {
    font-size: 14px;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 15px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    background: #111;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.sys-btn {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 50% !important;
    background: transparent;
    border: 1px solid #555;
    color: #888;
    cursor: pointer;
    font-size: 24px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    padding: 0 !important;
}

.sys-btn:hover {
    border-color: var(--text-color);
    color: var(--text-color);
}

.sys-btn.primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
}

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

#sys-msg {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    height: 15px;
}

#sys-msg.error {
    color: var(--secondary-color);
}

#sys-msg.success {
    color: var(--primary-color);
}

/* LEVEL SELECT */
#level-select-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.level-btn {
    width: 80px;
    height: 80px;
    background: #111;
    border: 1px solid #333;
    color: #555;
    font-size: 24px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.level-btn.unlocked {
    border-color: var(--primary-color);
    color: #fff;
    background: rgba(0, 243, 255, 0.1);
}

.level-btn.unlocked:hover {
    background: var(--primary-color);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.level-btn.locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.level-btn.locked::after {
    content: '🔒';
    font-size: 20px;
    position: absolute;
}

.level-btn.cleared {
    border-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

/* GAME INTERFACE */
#game-interface {
    display: flex !important;
    flex-direction: column !important;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.top-bar {
    padding: 15px 25px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

#btn-back-level {
    width: auto !important;
    height: 32px !important;
    min-width: 100px !important;
    min-height: 32px !important;
    padding: 0 15px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    background: rgba(0, 243, 255, 0.05) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    color: rgba(0, 243, 255, 0.7) !important;
    text-transform: uppercase;
    transition: all 0.3s ease !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.1);
}

#btn-back-level:hover {
    background: rgba(0, 243, 255, 0.15) !important;
    border-color: #00f3ff !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(0, 243, 255, 0.2);
    transform: translateY(-1px);
}

#game-stage {
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: 600px 1fr !important;
    grid-template-areas: "track video" !important;
    background: #000;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}

#video-display-area {
    grid-area: video !important;
    background: #000;
    position: relative;
    border-left: 2px solid #222;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#track-container {
    grid-area: track !important;
    width: 600px;
    height: 100%;
    background: linear-gradient(180deg, #050505 0%, #111 100%);
    position: relative;
    display: flex;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.lane {
    flex: 1;
    border-right: 1px solid #222;
    position: relative;
    height: 100%;
}

.lane:last-child {
    border-right: none;
}

.lane.space {
    flex: 1.5;
    /* Space is wider */
}

/* Receptors (Bottom Target) */
.receptor {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    height: 15px;
    background: #333;
    transition: 0.05s;
    border-top: 2px solid #555;
    border-bottom: 2px solid #555;
}

.lane.active .receptor {
    background: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    border-color: #fff;
}

.lane.press .receptor {
    /* Key Press visual */
    transform: scale(0.95);
    filter: brightness(1.5);
}

.key-label {
    position: absolute;
    bottom: 5px;
    width: 100%;
    text-align: center;
    font-size: 10px;
    color: #555;
    pointer-events: none;
}

/* Judgment Line */
#judgment-line {
    position: absolute;
    bottom: 20px;
    /* Aligned with receptor bottom */
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 10;
}

/* Notes */
#note-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.note {
    position: absolute;
    width: 100%;
    /* Relative to Lane width? No, absolute positioning needs calc */
    /* We will set width/left in JS or use grid? JS is safer for notes */
    height: 12px;
    background: #fff;
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
}

.note.white {
    background: #fff;
    box-shadow: 0 0 5px #fff;
}

.note.blue {
    background: #00f3ff;
    box-shadow: 0 0 5px #00f3ff;
}

.note.gold {
    background: #ffcc00;
    box-shadow: 0 0 5px #ffcc00;
}

/* UI Displays */
#hud-center {
    position: absolute;
    top: 30%;
    /* Centered Over lanes */
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#score-display {
    font-size: 24px;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

#combo-display {
    font-size: 60px;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color);
    height: 70px;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* HP BAR IN HUD */
#hp-container {
    width: 200px;
    margin-top: 10px;
}

.hp-label {
    font-size: 10px;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-align: center;
}

#hp-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    padding: 2px;
    box-sizing: border-box;
}

#hp-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.2s ease-out;
}

#hp-bar-fill.critical {
    background: var(--secondary-color);
    animation: pulse-red 0.5s infinite;
}

@keyframes pulse-red {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }

    100% {
        filter: brightness(1);
    }
}

#judgment-display {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    height: 40px;
    transition: transform 0.1s;
    opacity: 0;
}

.judge-cool {
    color: #00f3ff;
    text-shadow: 0 0 15px #00f3ff;
}

.judge-good {
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
}

.judge-miss {
    color: #555;
    text-shadow: none;
}

/* Hit Animation for Combo */
.pulse {
    transform: scale(1.2);
}

/* Hit Particles / Explosions */
.hit-explosion {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    mix-blend-mode: screen;
}

.hit-cool {
    background: radial-gradient(circle, rgba(0, 243, 255, 0.9) 0%, rgba(0, 243, 255, 0) 70%);
    box-shadow: 0 0 30px #00f3ff, inset 0 0 20px #fff;
    animation: explode-cool 0.4s cubic-bezier(0.1, 0.7, 1.0, 0.1) forwards;
}

.hit-good {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.8) 0%, rgba(0, 255, 0, 0) 70%);
    box-shadow: 0 0 20px #00ff00;
    animation: explode-good 0.4s ease-out forwards;
}

@keyframes explode-cool {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
        filter: brightness(2);
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
        filter: brightness(0.5);
    }
}

@keyframes explode-good {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Lane Flash on Hit */
.lane.hit-flash {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 243, 255, 0.3) 100%);
    transition: 0s;
}

/* MANAGER INTEGRATION */
.manager-portrait {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #111;
    border: 1px solid var(--primary-color);
}

#login-manager-portrait {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-color);
}

#manager-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    z-index: 100;
}

#manager-portrait {
    display: none !important;
    width: 250px;
    height: 350px;
    border-radius: 10px;
    margin-bottom: -50px;
    /* Overlap with dialogue */
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
}

#manager-portrait.shadow-glow {
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

#manager-dialogue {
    width: 100%;
    background: rgba(0, 243, 255, 0.15); /* Persistent Neon Blue Glow */
    border: 2px solid rgba(0, 243, 255, 0.6);
    border-left: 6px solid #00f3ff;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3), inset 0 0 10px rgba(0, 243, 255, 0.1);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    animation: slide-in-dialogue 0.5s ease-out;
}

.dialogue-header {
    font-size: 10px;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

#dialogue-text {
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    min-height: 40px;
}

.manager-react {
    animation: manager-bounce 0.4s ease-out;
}

@keyframes slide-in-dialogue {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes manager-bounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-blue {
    animation: box-pulse-blue 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.pulse-red {
    animation: box-pulse-red 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes box-pulse-blue {
    0% { 
        border-color: #fff; 
        box-shadow: 0 0 60px rgba(0, 243, 255, 1), inset 0 0 40px rgba(0, 243, 255, 0.8); 
        transform: scale(1.04); 
        background: rgba(0, 243, 255, 0.5);
    }
    100% { 
        border-color: rgba(0, 243, 255, 0.6); 
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.3); 
        transform: scale(1); 
        background: rgba(0, 243, 255, 0.15);
    }
}

@keyframes box-pulse-red {
    0% { 
        border-color: #fff; 
        box-shadow: 0 0 70px rgba(255, 0, 85, 1), inset 0 0 50px rgba(255, 0, 85, 0.9); 
        transform: scale(1.1) rotate(1deg); 
        background: rgba(255, 0, 85, 0.7);
    }
    100% { 
        border-color: rgba(0, 243, 255, 0.6); 
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.3); 
        transform: scale(1) rotate(0); 
        background: rgba(0, 243, 255, 0.15);
    }
}

/* LOBBY SCREEN - FULL SCREEN DASHBOARD */
#lobby-container {
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    background: radial-gradient(circle at top right, #0a0a0a 0%, #000 100%);
    padding: 2vh 3vw;
    box-sizing: border-box;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    border: 1px solid rgba(0, 242, 255, 0.1);
    box-shadow: inset 0 0 100px rgba(0, 242, 255, 0.05);
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #222;
    padding-bottom: 20px;
}

.lobby-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.lobby-title span {
    color: var(--primary-color);
    font-size: 14px;
}

.user-status {
    font-size: 14px;
    color: var(--primary-color);
    background: rgba(0, 242, 255, 0.05);
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.lobby-content {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
    margin: 2vh 0;
}

/* 3-Column Layout Distibution */
.level-select-panel {
    flex: 1.2;
    min-width: 320px;
}

.center-panel {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 450px;
}

.ranking-panel {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 243, 255, 0.02);
    border: 1px solid rgba(0, 243, 255, 0.1);
    border-radius: 10px;
    padding: 24px;
    overflow-y: auto;
}

/* Level Selection Panel (Left) */
.level-select-panel {
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid #222;
    border-radius: 10px;
    padding: 20px;
}

.panel-title {
    font-size: 14px;
    color: var(--primary-color);
    margin: 0 0 20px 0;
    letter-spacing: 2px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.level-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.level-list::-webkit-scrollbar {
    width: 4px;
}

.level-list::-webkit-scrollbar-thumb {
    background: #333;
}

.level-card {
    display: flex;
    align-items: center;
    background: #111;
    border: 1px solid #222;
    margin-bottom: 10px;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.level-card.locked {
    filter: grayscale(1) brightness(0.5);
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.card-lock-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 5;
}

/* NOTE GUIDE LINES */
.lane.show-guide::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* --- HAZARDS END --- */

/* REIVE PROMPT OVERLAY */
#revive-prompt-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5000;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 30px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px var(--primary-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.revive-emoji-btn {
    font-size: 5rem;
    background: none;
    border: none;
    cursor: pointer;
    margin: 20px 0;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 10px #fff);
    animation: heartBeat 1.5s infinite;
}

.revive-emoji-btn:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px var(--primary-color));
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

.revive-msg {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.revive-counter {
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0.8;
}

#revive-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 20px #000;
    z-index: 6000;
    pointer-events: none;
}

/* INVENTORY EQUIP SYSTEM */
.inv-item {
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.inv-item:hover {
    background: rgba(0, 255, 136, 0.1);
}

.inv-item.equipped {
    border: 1px solid var(--primary-color);
    background: rgba(0, 255, 136, 0.05);
}

.inv-equip-check {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.inv-item.unlimited .inv-count {
    color: #ff00ff;
    font-weight: bold;
}

/* HAZARD EFFECTS */
#game-stage.flip-view {
    grid-template-columns: 1fr 600px !important;
    grid-template-areas: "video track" !important;
}

#game-stage.flip-view #manager-overlay {
    right: auto;
    left: 20px;
    align-items: flex-start;
}

#game-stage.flip-view #manager-portrait {
    transform-origin: bottom left;
    transform: scaleX(-1);
}

#game-stage.flip-view #manager-dialogue {
    border-left: 2px solid rgba(0, 243, 255, 0.5);
    border-right: 6px solid var(--primary-color);
}

#track-container.fog-view::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(180deg, #000 0%, transparent 100%);
    pointer-events: none;
    z-index: 10;
}

.level-card:hover {
    background: #1a1a1a;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.level-num {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-right: 20px;
    width: 40px;
}

.level-main {
    flex: 1;
}

.level-msg {
    font-size: 16px;
    color: #eee;
    margin-bottom: 5px;
}

.level-meta {
    font-size: 10px;
    color: #666;
}

.level-difficulty {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.level-difficulty.easy {
    color: #00ffcc;
    border: 1px solid #00ffcc;
}

.level-difficulty.normal {
    color: #00f3ff;
    border: 1px solid #00f3ff;
}

.level-difficulty.hard {
    color: #ffcc00;
    border: 1px solid #ffcc00;
}

.level-difficulty.insane {
    color: #ff0055;
    border: 1px solid #ff0055;
}

.level-difficulty.god {
    color: #fff;
    background: #ff0055;
    border: 1px solid #fff;
    box-shadow: 0 0 10px #ff0055;
}

/* Center Panel: Shop (Top) & Inventory (Bottom) */
.shop-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 0, 85, 0.05);
    border: 1px solid rgba(255, 0, 85, 0.2);
    border-radius: 10px;
    padding: 8px 12px;
}

.shop-panel .panel-title {
    margin: 0 0 5px 0;
}

.shop-wallet {
    font-size: 14px;
    color: #ff0055;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.shop-wallet .j-icon {
    font-size: 12px;
}

.shop-wallet .dollar-icon {
    font-size: 16px;
}

.charge-pulse-btn {
    background: var(--primary-color);
    border: none;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 0 10px var(--primary-color);
    animation: btn-pulse 1.5s infinite;
}

@keyframes btn-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px var(--primary-color);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px var(--primary-color);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px var(--primary-color);
    }
}

/* --- RANK TIER SYSTEM --- */
.rank-supernova {
    color: #FF0033 !important;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.6), 0 0 20px rgba(255, 0, 51, 0.4);
    font-weight: 900;
}

.rank-glint {
    color: #00F3FF !important;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6), 0 0 20px rgba(0, 243, 255, 0.4);
    font-weight: 800;
}

.rank-flicker {
    color: #FFFFFF !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

#lobby-user-role {
    transition: all 0.5s ease;
}

.rank-badge-icon {
    margin-right: 5px;
    font-size: 1.1em;
}

.my-rank-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
    margin: 15px 0;
    position: relative;
}

.my-rank-separator::after {
    content: 'MY SYSTEM STATUS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    padding: 2px 10px;
    font-size: 9px;
    color: rgba(0, 243, 255, 0.6);
    letter-spacing: 2px;
}

.my-rank-item {
    background: rgba(0, 243, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    border-radius: 8px;
    animation: my-rank-pulse 2s infinite alternate;
}

@keyframes my-rank-pulse {
    from { border-color: rgba(0, 243, 255, 0.3); }
    to { border-color: rgba(0, 243, 255, 0.6); }
}

/* Perfect Reward Modal Styles */
#perfect-reward-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
}

.perfect-reward-content {
    text-align: center;
    position: relative;
    padding: 60px;
    border: 2px solid gold;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, rgba(0,0,0,0.9) 70%);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
}

.perfect-gift-box {
    font-size: 120px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    filter: drop-shadow(0 0 20px gold);
    animation: gift-idle 2s infinite ease-in-out;
}

.perfect-gift-box:hover {
    transform: scale(1.1);
}

.perfect-gift-box.pop {
    animation: gift-pop-anim 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes gift-idle {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes gift-pop-anim {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); filter: brightness(2) blur(2px); }
    100% { transform: scale(0); opacity: 0; }
}

.reward-particles {
    position: absolute;
    top: 50%; left: 50%;
    pointer-events: none;
}

.perfect-reward-items {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.perfect-reward-items.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.reward-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

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

/* Neon Yellow Snackbar */
#neon-snackbar {
    position: fixed;
    top: -50px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
    height: 30px;
    background: rgba(255, 255, 0, 0.6); /* Semi-transparent neon yellow */
    color: #000;
    z-index: 11000;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.4);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 0, 0.8);
}

#neon-snackbar.show {
    top: 15px;
}

.snackbar-scroll-text {
    white-space: nowrap;
    position: absolute;
    font-size: 14px;
    letter-spacing: 1px;
    animation: scroll-rtl 20s linear infinite;
}

@keyframes scroll-rtl {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

#charge-interface {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slide-down 0.3s ease-out;
}

.charge-header {
    font-size: 10px;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: center;
}

.charge-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.charge-opt {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    font-size: 11px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    transition: 0.2s;
}

.charge-opt:hover {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
}

.shop-section-title {
    font-size: 12px;
    color: #888;
    margin: 5px 0 5px 0;
    letter-spacing: 2px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

.shop-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.shop-package {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    border: 1px solid #00f3ff;
    border-radius: 8px;
    padding: 8px;
    transition: 0.2s;
    text-align: center;
}

.shop-package:first-child {
    border-color: #ff0055;
}

.shop-package:hover {
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

.shop-package:first-child:hover {
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.2);
}

.pkg-icon {
    font-size: 20px;
    margin-bottom: 10px;
}

.pkg-name {
    font-size: 14px;
    color: #00f3ff;
    font-weight: bold;
    margin-bottom: 5px;
}

.pkg-desc {
    font-size: 11px;
    color: #888;
    margin-bottom: auto;
    min-height: 26px;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #111;
    border: 1px solid #333;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
    text-align: center;
}

.shop-item:hover {
    border-color: var(--primary-color);
    background: #161616;
}

.item-icon {
    font-size: 16px;
    margin-bottom: 8px;
}

.item-info {
    width: 100%;
    margin-bottom: 8px;
}

.item-name {
    font-size: 10px;
    color: #eee;
    margin-bottom: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    display: none;
    /* Hide description in compact shop */
}

.buy-btn {
    width: 90%;
    margin-top: 5px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #aaa;
    font-size: 12px;
    padding: 8px 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: 0.2s;
    border-radius: 4px;
}

.buy-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
}

.price-symbol {
    font-size: 9px;
    margin-right: 2px;
    color: #888;
}

.inventory-panel {
    flex: 0.6;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    min-height: 150px;
}

.inventory-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    grid-auto-rows: min-content;
    gap: 8px;
    overflow-y: auto;
    padding-right: 5px;
    padding-top: 5px;
}

.inv-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 1/1;
    overflow: hidden;
}

.inv-item:hover {
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.inv-item.equipped {
    background: rgba(0, 243, 255, 0.15);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.inv-icon-grid {
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.inv-name-mini {
    font-size: 8px;
    color: #888;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
}

.inv-count-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    background: var(--primary-color);
    color: #000;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 12px;
    text-align: center;
}

.inv-equip-dot {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #444;
}

.inv-item.equipped .inv-equip-dot {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
    border-color: #fff;
}

.inv-item.unlimited .inv-count-badge {
    background: #ff00ff;
    color: #fff;
    box-shadow: 0 0 5px #ff00ff;
}


.empty-msg {
    color: #444;
    font-size: 12px;
    font-style: italic;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

/* Ranking Panel (Right) */
.ranking-list {
    display: flex;
    flex-direction: column;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #222;
    transition: 0.2s;
}

.rank-item:hover {
    background: rgba(0, 243, 255, 0.1);
}

.rank-pos {
    width: 30px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.rank-name {
    flex: 1;
    font-size: 13px;
    color: #eee;
    letter-spacing: 1px;
}

.rank-score {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

/* START OVERLAY */
#start-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 10px;
}

/* --- DAILY REWARD MODAL --- */
.reward-modal {
    background: linear-gradient(160deg, #0d0d0d 0%, #111 100%);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    padding: 36px 32px 28px;
    width: 340px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.12), 0 20px 60px rgba(0,0,0,0.6);
}

.reward-header {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-transform: uppercase;
}

.reward-content p {
    color: #eee;
    margin-bottom: 20px;
}

.gift-box {
    font-size: 80px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    margin: 20px 0;
}

.gift-box:hover {
    transform: scale(1.1);
}

.gift-box.shaking {
    animation: shake 0.5s infinite;
    pointer-events: none; /* Prevent multiple clicks */
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

#reward-result {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* --- RECURRING GIFT BOX --- */
#recurring-gift-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--primary-color);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 14px;
    min-width: 80px;
}

#recurring-gift-box {
    transition: all 0.2s;
}

#recurring-gift-box.ready {
    cursor: pointer;
    font-size: 20px;
    animation: pulseGlow 1.5s infinite;
}

#recurring-gift-box.ready:hover {
    transform: scale(1.2);
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.5)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 15px rgba(0, 243, 255, 1)); transform: scale(1.1); }
    100% { filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.5)); transform: scale(1); }
}
/* COUNTDOWN DISPLAY */
#countdown-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 150px;
    font-weight: 800;
    color: var(--secondary-color);
    text-shadow: 0 0 50px rgba(255, 0, 85, 0.8), 0 0 100px rgba(255, 0, 85, 0.4);
    z-index: 999;
    pointer-events: none;
    opacity: 0;
}

@keyframes countdown-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.countdown-anim {
    animation: countdown-pulse 1s ease-out forwards;
}

/* NEW HAZARD: SHAKE VIEW */
.shake-view {
    animation: master-shake 0.1s infinite;
}

@keyframes master-shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

/* SHAKE REDUCTION (GUIDE ITEM) */
.shake-view.stabilized {
    animation: mild-shake 0.3s infinite;
}

@keyframes mild-shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(1px, 1px);
    }
}

/* NEW HAZARD: DARKNESS VIEW */

/* COMMON MODAL OVERLAY (mission-ui, sys-modal, daily-reward) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

/* SYSTEM MODAL (ALERT/CONFIRM) */
#sys-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.lobby-footer {
    display: none;
}

.start-btn {
    flex: 2;
    font-size: 1.5rem !important;
    padding: 20px !important;
}

.logout-btn {
    flex: 1;
}

.shop-more-btn {
    margin-top: 10px;
    width: 100%;
}

.tactical-feed-label {
    color: #444;
    font-size: 10px;
}

.sys-modal, .mission-modal {
    width: 420px;
    background: linear-gradient(160deg, #0d0d0d 0%, #111 100%);
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.12), 0 20px 60px rgba(0,0,0,0.7);
    padding: 32px 32px 28px;
    border-radius: 6px;
    text-align: center;
    animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#mission-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
    text-shadow: 0 0 10px var(--primary-color);
}

#phase-display {
    color: var(--secondary-color);
    font-size: 14px;
    letter-spacing: 2px;
}

#mission-desc {
    color: #888;
    font-size: 12px;
    margin-bottom: 25px;
}

.modal-header {
    font-size: 11px;
    color: var(--primary-color);
    margin-bottom: 24px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 14px;
    opacity: 0.9;
}

.modal-body {
    font-size: 15px;
    color: #ccc;
    margin-bottom: 28px;
    line-height: 1.7;
    white-space: pre-line;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 모달 내부 버튼: sys-btn 원형 스타일을 직사각형 HUD 버튼으로 오버라이드 */
.modal-btns .sys-btn,
.modal-btns button {
    width: auto !important;
    height: 42px !important;
    min-width: 120px !important;
    min-height: 42px !important;
    border-radius: 4px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    padding: 0 24px !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.modal-btns .sys-btn.primary,
.modal-btns #btn-modal-ok {
    background: rgba(0, 243, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.6) !important;
    color: #00f3ff !important;
}

.modal-btns .sys-btn.primary:hover,
.modal-btns #btn-modal-ok:hover {
    background: rgba(0, 243, 255, 0.18) !important;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.3) !important;
    color: #fff !important;
}

.modal-btns #btn-modal-cancel {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #666 !important;
}

.modal-btns #btn-modal-cancel:hover {
    background: rgba(255, 0, 85, 0.08) !important;
    border-color: rgba(255, 0, 85, 0.4) !important;
    color: #ff0055 !important;
}

/* 데일리 리워드 닫기 버튼 */
#btn-reward-close {
    width: auto !important;
    height: 40px !important;
    min-width: 140px !important;
    border-radius: 4px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    padding: 0 24px !important;
    background: rgba(0, 243, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.5) !important;
    color: #00f3ff !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

#btn-reward-close:hover {
    background: rgba(0, 243, 255, 0.18) !important;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.3) !important;
    color: #fff !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ════════════════════════════════════
   ITEM GRADE BADGE SYSTEM
   ════════════════════════════════════ */
.reward-grade {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 3px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* COMMON - 회색 */
.grade-common {
    color: #aaa;
    background: rgba(170, 170, 170, 0.08);
    border: 1px solid rgba(170, 170, 170, 0.3);
}

/* RARE - 파란색 */
.grade-rare {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.08);
    border: 1px solid rgba(79, 195, 247, 0.4);
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.6);
}

/* EPIC - 보라색 */
.grade-epic {
    color: #ce93d8;
    background: rgba(206, 147, 216, 0.08);
    border: 1px solid rgba(206, 147, 216, 0.4);
    text-shadow: 0 0 10px rgba(206, 147, 216, 0.7);
}

/* LEGENDARY - 금색 + 펄스 글로우 */
.grade-legendary {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.9);
    animation: legendary-pulse 1.5s ease-in-out infinite;
}

@keyframes legendary-pulse {
    0%, 100% {
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 180, 0, 0.3);
    }
}

/* ════════════════════════════════════
   PAYPAL 결제 모달
   ════════════════════════════════════ */
.paypal-modal {
    width: 400px;
    background: linear-gradient(160deg, #0d0d0d 0%, #111 100%);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-top: 3px solid #009cde; /* PayPal 블루 */
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 156, 222, 0.15), 0 20px 60px rgba(0,0,0,0.8);
    animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 헤더 */
.pp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0, 156, 222, 0.05);
}

.pp-header-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #009cde;
    text-transform: uppercase;
}

.pp-x-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
}
.pp-x-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* 아이템 미리보기 */
.pp-item-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pp-preview-icon {
    font-size: 42px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.pp-preview-info {
    flex: 1;
}

.pp-preview-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #eee;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.pp-preview-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #009cde;
    letter-spacing: 1px;
}

/* PayPal 버튼 컨테이너 */
#paypal-button-container {
    padding: 20px 24px;
}

/* 상태 메시지 */
.pp-status {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-align: center;
    padding: 0 24px 4px;
    min-height: 20px;
    letter-spacing: 0.5px;
}
.pp-pending { color: #009cde; }
.pp-error   { color: #ff0055; }
.pp-cancel  { color: #666; }

/* 결제 성공 UI */
.pp-success-icon {
    font-size: 64px;
    text-align: center;
    padding: 28px 0 12px;
    animation: scaleIn 0.3s ease;
}

.pp-success-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #00f3ff;
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.pp-success-msg {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #aaa;
    text-align: center;
    padding: 0 24px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.pp-close-btn {
    display: block;
    margin: 0 auto 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 12px 32px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.5);
    color: #00f3ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.pp-close-btn:hover {
    background: rgba(0, 243, 255, 0.18);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.3);
    color: #fff;
}

/* Neon Performance Animations */
.neon-bg-flash::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 99999;
    animation: neon-overlay-pulse 5s ease-out forwards;
}

.neon-flash {
    text-shadow: 0 0 10px gold, 0 0 20px gold, 0 0 40px #ffea00, 0 0 80px #ffea00 !important;
    animation: neon-text-pulse 0.5s infinite alternate !important;
}

@keyframes neon-overlay-pulse {
    0%, 100% { box-shadow: inset 0 0 0px transparent; background: transparent; }
    10%, 30%, 50%, 70%, 90% { box-shadow: inset 0 0 50px rgba(255, 215, 0, 0.3); background: rgba(255, 215, 0, 0.05); }
    20%, 40%, 60%, 80% { box-shadow: inset 0 0 150px rgba(255, 215, 0, 0.8); background: rgba(255, 215, 0, 0.2); }
}

@keyframes neon-text-pulse {
    from { filter: brightness(1) drop-shadow(0 0 5px gold); transform: scale(1); }
    to { filter: brightness(1.5) drop-shadow(0 0 15px white); transform: scale(1.1); }
}

/* --- VOLUME & SETTINGS UI --- */
#btn-settings-toggle {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.5);
    color: #00f3ff;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

#btn-settings-toggle:hover {
    background: rgba(0, 243, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    transform: rotate(45deg);
}

#volume-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.6);
    padding: 8px 18px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 243, 255, 0.15);
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#volume-menu.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.volume-icon {
    font-size: 16px;
    color: #00f3ff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.vol-step-btn {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vol-step-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* Custom Styled Range Slider */
.vol-slider-container {
    position: relative;
    width: 120px;
    height: 24px;
    display: flex;
    align-items: center;
}

#vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #00f3ff;
    border-radius: 50%;
    box-shadow: 0 0 12px #00f3ff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}

#vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px #00f3ff;
}

.vol-gauge-line {
    position: absolute;
    left: 0;
    top: 50%;
    height: 4px;
    background: #00f3ff;
    width: 50%; /* JS will update this */
    pointer-events: none;
    box-shadow: 0 0 15px #00f3ff;
    transform: translateY(-50%);
    border-radius: 2px;
    z-index: 1;
}