/* ============================================================
   CRASH ALPHA — Premium Casino UI + Thrill Effects + Settings + War Room
   ============================================================ */

/* === RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Rajdhani', sans-serif; }
body {
    background-color: #0B0E11;
    background-image: radial-gradient(ellipse at 15% 60%, rgba(255, 184, 0, 0.045) 0%, transparent 55%), radial-gradient(ellipse at 85% 40%, rgba(0, 200, 83, 0.03) 0%, transparent 55%);
    color: #E8EBF0; display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 184, 0, 0.22); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 184, 0, 0.5); }

/* === HEADER === */
header {
    background: rgba(11, 14, 17, 0.97); padding: 10px 20px; border-bottom: 1px solid rgba(255, 184, 0, 0.12);
    display: flex; justify-content: space-between; align-items: center; z-index: 100;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.55); flex-shrink: 0; gap: 12px;
}
.logo-text {
    font-family: 'Orbitron', monospace; font-weight: 700; font-size: 15px; letter-spacing: 5px; color: #FFB800;
    text-shadow: 0 0 12px rgba(255, 184, 0, 0.55), 0 0 30px rgba(255, 184, 0, 0.2); text-transform: uppercase; flex-shrink: 0;
}
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-user { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 20px; }
.header-user-flag { font-size: 17px; line-height: 1; }
.header-user-nick { font-size: 12px; font-weight: 700; color: #9CA3AF; letter-spacing: 0.5px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-display { color: #FFB800; font-size: 14px; font-weight: 700; letter-spacing: 0.5px; font-family: 'Orbitron', monospace; }

.ad-button {
    background: linear-gradient(135deg, #FFB800, #FF8F00); color: #0B0E11; border: none; padding: 8px 16px; border-radius: 20px; font-weight: 700; font-family: 'Rajdhani', sans-serif; cursor: pointer; font-size: 13px; letter-spacing: 0.5px; transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; animation: pulse-glow 2.5s ease-in-out infinite; flex-shrink: 0;
}
.ad-button:hover { filter: brightness(1.12); transform: scale(1.04); box-shadow: 0 0 28px rgba(255, 184, 0, 0.65) !important; }
.ad-button:active { transform: scale(0.97); }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 12px rgba(255, 184, 0, 0.35); } 50% { box-shadow: 0 0 26px rgba(255, 184, 0, 0.7); } }

/* === AD BANNER PLACEHOLDER === */
#ad-banner-placeholder {
    width: 100%;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255, 184, 0, 0.1);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.ad-ticker-label {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: rgba(255, 184, 0, 0.08);
    color: rgba(255, 184, 0, 0.5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-right: 1px solid rgba(255, 184, 0, 0.15);
    z-index: 2;
    font-family: 'Rajdhani', sans-serif;
    white-space: nowrap;
}
.ad-ticker-track {
    flex: 1;
    overflow: hidden;
    padding-left: 36px;
}
.ad-ticker-text {
    display: inline-block;
    white-space: nowrap;
    animation: ad-ticker 22s linear infinite;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
}
@keyframes ad-ticker {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* === MAIN LAYOUT === */
.main-content { display: flex; flex: 1; height: calc(100vh - 89px); position: relative; overflow: hidden; }
.panels-wrapper { flex: 1; display: flex; overflow: hidden; min-height: 0; }

@media (max-width: 768px) {
    .main-content { height: calc(100vh - 89px); }
}
.left-panel { flex: 7; display: flex; flex-direction: column; border-right: 1px solid rgba(255, 255, 255, 0.05); min-width: 0; }
.right-panel { flex: 3; background: linear-gradient(180deg, #0D1117 0%, #0B0E11 100%); display: flex; flex-direction: column; min-width: 0; }

/* === START OVERLAY === */
#startOverlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); z-index: 200; display: flex; justify-content: center; align-items: center; transition: opacity 0.4s ease;
}
.menu-card {
    background: rgba(14, 20, 28, 0.92); width: 390px; padding: 32px 28px; border-radius: 20px; border: 1px solid rgba(255, 184, 0, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 70px rgba(0, 0, 0, 0.85), 0 0 50px rgba(255, 184, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    max-height: 90vh;
    overflow-y: auto;
}
.menu-card h1 { text-align: center; margin-bottom: 24px; color: #FFB800; font-family: 'Orbitron', monospace; font-size: 20px; letter-spacing: 5px; text-transform: uppercase; text-shadow: 0 0 14px rgba(255, 184, 0, 0.75), 0 0 40px rgba(255, 184, 0, 0.3); }

/* GRAND PODIUM */
.podium-card { width: 650px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.podium-header h1 { margin-bottom: 0; font-size: 24px; }
.grand-podium { display: flex; gap: 20px; background: rgba(0,0,0,0.4); border-radius: 12px; padding: 16px; border: 1px solid rgba(255,184,0,0.1); }
.podium-section { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform 0.2s, background 0.2s; padding: 10px; border-radius: 10px; border: 1px solid transparent;}
.podium-section:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.1);}
.podium-title { font-family: 'Orbitron', monospace; font-size: 14px; color: #9CA3AF; text-align: center; letter-spacing: 2px; }
.podium-list { display: flex; flex-direction: column; gap: 6px; }
.podium-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.podium-item.rank-1 { background: rgba(255,184,0,0.1); border-color: rgba(255,184,0,0.3); box-shadow: 0 0 10px rgba(255,184,0,0.2); }
.podium-item.rank-2 { background: rgba(200,200,200,0.05); border-color: rgba(200,200,200,0.2); }
.podium-item.rank-3 { background: rgba(180,100,40,0.08); border-color: rgba(180,100,40,0.2); }
.podium-medal { font-size: 16px; width: 20px; text-align: center;}
.podium-flag { font-size: 20px; }
.podium-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.podium-name { font-size: 13px; font-weight: 700; color: #E8EBF0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-val { font-family: 'Orbitron', monospace; font-size: 12px; color: #FFB800; font-weight: bold; white-space: nowrap; flex-shrink: 0;}
.podium-title-1 { font-size: 9px; color: #FFB800; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 🌟 NEW: RANKING TEXT ANIMATIONS 🌟 */
.rank-1-text {
    background: linear-gradient(90deg, #FFD700, #FF69B4, #00FFCC, #FFD700);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    color: transparent !important;
    animation: holoFlow 3s linear infinite;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
@keyframes holoFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

.rank-2-text {
    background: linear-gradient(90deg, #E5E4E2, #B0C4DE, #FFFFFF, #B0C4DE, #E5E4E2);
    background-size: 200% auto;
    -webkit-background-clip: text;
    color: transparent !important;
    animation: platSweep 3s linear infinite;
    font-weight: 800;
}
@keyframes platSweep { 0% { background-position: -100% center; } 100% { background-position: 200% center; } }

.rank-3-text {
    background: linear-gradient(180deg, #CD7F32, #8B4513);
    -webkit-background-clip: text;
    color: transparent !important;
    text-shadow: 0 0 8px rgba(255, 69, 0, 0.4), 0 0 15px rgba(255, 69, 0, 0.2);
    animation: burningEmber 2s ease-in-out infinite alternate;
    font-weight: 800;
}
@keyframes burningEmber { 0% { text-shadow: 0 0 8px rgba(255, 69, 0, 0.3), 0 0 10px rgba(255, 69, 0, 0.1); } 100% { text-shadow: 0 0 12px rgba(255, 69, 0, 0.7), 0 0 20px rgba(255, 69, 0, 0.5); } }

.profile-summary { background: rgba(0, 0, 0, 0.35); padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border-left: 3px solid #FFB800; color: #9CA3AF; line-height: 1.7; }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #4B5563; margin-bottom: 6px; font-weight: 700; }
.input-group input, .input-group select { width: 100%; padding: 11px 14px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.08); color: #E8EBF0; border-radius: 10px; font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 500; outline: none; transition: border-color 0.2s, box-shadow 0.2s; appearance: none; -webkit-appearance: none; }
.input-group input:focus, .input-group select:focus { border-color: rgba(255, 184, 0, 0.45); box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.08); }
.input-group input::placeholder { color: #374151; }
.input-group select option { background: #12171D; color: #E8EBF0; }
.menu-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-top: 8px; }
.menu-btn { padding: 13px; border: none; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 14px; font-family: 'Rajdhani', sans-serif; letter-spacing: 0.5px; transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.menu-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.menu-btn:active { transform: translateY(0) scale(0.98); filter: brightness(0.95); }
.btn-start { grid-column: span 4; background: linear-gradient(135deg, #00C853, #009E42); color: white; margin-top: 4px; font-size: 16px; letter-spacing: 2px; box-shadow: 0 4px 22px rgba(0, 200, 83, 0.3); }
.btn-start:hover { box-shadow: 0 6px 32px rgba(0, 200, 83, 0.55); }
.btn-start:disabled { background: rgba(255, 255, 255, 0.06) !important; color: #374151 !important; cursor: not-allowed !important; box-shadow: none !important; transform: none !important; filter: none !important; border: 1px solid rgba(255, 255, 255, 0.06); }
.btn-sub { background: rgba(255, 255, 255, 0.06); color: #9CA3AF; border: 1px solid rgba(255, 255, 255, 0.07); }
.btn-sub:hover { background: rgba(255, 255, 255, 0.11); color: #E8EBF0; }
.btn-lang { background: rgba(33, 150, 243, 0.10); color: #64B5F6; border: 1px solid rgba(33, 150, 243, 0.25); font-size: 13px; }
.btn-lang:hover { background: rgba(33, 150, 243, 0.22); border-color: rgba(33, 150, 243, 0.5); color: #90CAF9; }
.btn-action { background: rgba(255, 184, 0, 0.07); color: #FFB800; font-size: 12px; border: 1px dashed rgba(255, 184, 0, 0.35); }
.btn-action:hover { background: rgba(255, 184, 0, 0.14); border-style: solid; }
.action-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* Help Icons & UI additions */
.help-icon-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1); color: #E8EBF0; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; font-weight: bold; font-family: 'Rajdhani', sans-serif; font-size:14px; transition: 0.2s; display:flex; justify-content:center; align-items:center;}
.help-icon-btn:hover { background: rgba(255, 184, 0, 0.15); border-color: rgba(255, 184, 0, 0.4); color: #FFB800; }
.bet-percent-buttons { display: flex; gap: 6px; margin-top: 6px; }
.bet-percent-buttons button { padding: 6px 0; background: rgba(33, 150, 243, 0.08); border: 1px solid rgba(33, 150, 243, 0.2); color: #64B5F6; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; font-family: 'Rajdhani', sans-serif; flex: 1; transition: all 0.15s; }
.bet-percent-buttons button:hover { background: rgba(33, 150, 243, 0.2); color: #90CAF9; border-color:rgba(33, 150, 243, 0.4);}
.donate-float { position: absolute; color: #00C853; font-weight: 900; font-size: 18px; animation: donateFly 1.5s ease-out forwards; pointer-events: none; z-index: 100; text-shadow: 0 0 10px rgba(0,200,83,0.8); right: 20px; bottom: 30px; font-family:'Orbitron', sans-serif;}
@keyframes donateFly { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(80px) scale(1.2); } }

/* === GRAPH / CANVAS SECTION === */
.graph-section {
    flex: 6; background: radial-gradient(ellipse at 50% 100%, rgba(13, 22, 38, 1) 0%, #0B0E11 65%); position: relative; width: 100%; height: 100%; overflow: hidden;
}

/* 빌딩 숲 (증권가) 배경 실루엣 */
.graph-section::before {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 35%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200" preserveAspectRatio="none"><path d="M0,200 L0,150 L50,150 L50,80 L100,80 L100,120 L150,120 L150,40 L200,40 L200,100 L250,100 L250,20 L300,20 L300,90 L350,90 L350,60 L400,60 L400,130 L450,130 L450,10 L500,10 L500,110 L550,110 L550,50 L600,50 L600,140 L650,140 L650,30 L700,30 L700,100 L750,100 L750,70 L800,70 L800,160 L850,160 L850,20 L900,20 L900,120 L950,120 L950,50 L1000,50 L1000,200 Z" fill="rgba(255,255,255,0.03)"/></svg>') no-repeat bottom;
    background-size: cover; pointer-events: none; z-index: 0;
}

canvas { display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; }
.back-btn { background: rgba(11, 14, 17, 0.82); border: 1px solid rgba(255, 255, 255, 0.09); color: #6B7280; padding: 6px 14px; border-radius: 8px; cursor: pointer; display: none; font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; transition: border-color 0.2s, color 0.2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.back-btn:hover { border-color: rgba(255, 184, 0, 0.4); color: #FFB800; }

.center-display {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 10; pointer-events: none; width:100%;
}
.multiplier-text {
    font-family: 'Orbitron', monospace; font-size: 76px; font-weight: 900; color: #FFB800; text-shadow: 0 0 8px rgba(255, 184, 0, 1), 0 0 22px rgba(255, 184, 0, 0.85), 0 0 55px rgba(255, 184, 0, 0.5), 0 0 110px rgba(255, 184, 0, 0.22); line-height: 1; letter-spacing: 3px; display: inline-block;
}
.fomo-text { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; margin-top: 15px; letter-spacing: 1px; }
.fomo-red { color: #FF5252; text-shadow: 0 0 10px rgba(255,82,82,0.5); animation: pulse-fast 0.5s infinite alternate; }
.fomo-green { color: #69F0AE; text-shadow: 0 0 10px rgba(105,240,174,0.5); }
@keyframes pulse-fast { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 1; transform: scale(1.05); } }

.status-text { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; letter-spacing: 3px; margin-top: 10px; text-transform: uppercase; }

/* 10초 대기 오버레이 텍스트 */
.game-overlay-text { position: absolute; top: 18%; left: 50%; transform: translate(-50%, -50%); font-family: 'Rajdhani', sans-serif; font-size: 32px; font-weight: 700; color: #E8EBF0; text-shadow: 0 0 20px rgba(0,0,0,0.8); z-index: 5; text-align:center; pointer-events:none;}
.game-overlay-text span { color: #FFB800; font-size: 48px; font-family: 'Orbitron', monospace; display:block; margin-top:10px; animation: pulse-med 1s infinite; }

.crash-history { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; z-index: 10; max-height: calc(100% - 24px); overflow: hidden; }
.history-badge { padding: 3px 11px; border-radius: 20px; font-size: 11px; font-weight: 700; color: white; font-family: 'Rajdhani', sans-serif; letter-spacing: 0.5px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* === CONTROL / BET SECTION === */
.control-section {
    flex: 5; background: linear-gradient(180deg, rgba(14, 19, 27, 0.99) 0%, rgba(11, 14, 17, 0.99) 100%); border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 14px 18px; display: flex; flex-direction: column; gap: 11px; position:relative;
}
.vault-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; background: rgba(255, 184, 0, 0.04); border: 1px solid rgba(255, 184, 0, 0.1); border-radius: 12px; position:relative;}
.vault-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #4B5563; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.vault-label span#vaultNationBadge { color: #FFB800; font-size: 16px; font-weight: 700; margin-right: 4px;}
.vault-btn { background: linear-gradient(135deg, #FFB800, #FF8F00); border: none; padding: 5px 15px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'Rajdhani', sans-serif; color: #0B0E11; letter-spacing: 0.5px; transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.vault-btn:hover { filter: brightness(1.1); transform: scale(1.04); box-shadow: 0 0 16px rgba(255, 184, 0, 0.4); }
.vault-btn:active { transform: scale(0.97); }

.auto-cash { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #4B5563; padding: 9px 14px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.auto-cash input[type="number"] { width: 65px; padding: 5px 8px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); color: #E8EBF0; border-radius: 8px; font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; outline: none; text-align: center; transition: border-color 0.2s, box-shadow 0.2s; -moz-appearance: textfield; }
.auto-cash input[type="number"]::-webkit-outer-spin-button, .auto-cash input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.auto-cash input[type="number"]:focus { border-color: rgba(255, 184, 0, 0.4); box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.08); }
.auto-cash input[type="checkbox"] { width: 16px; height: 16px; accent-color: #FFB800; cursor: pointer; }

.bet-input-row { display: flex; gap: 10px; align-items: center; }
.bet-input-row input { flex: 1; padding: 12px 16px; font-size: 22px; font-weight: 700; text-align: right; background: rgba(0, 0, 0, 0.55); color: #FFB800; border: 1px solid rgba(255, 184, 0, 0.18); border-radius: 12px; font-family: 'Orbitron', monospace; letter-spacing: 1px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.bet-input-row input:focus { border-color: rgba(255, 184, 0, 0.45); box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.08); }
.reset-btn { background: rgba(255, 82, 82, 0.08); border: 1px solid rgba(255, 82, 82, 0.18); color: #FF5252; font-size: 20px; cursor: pointer; padding: 8px 13px; border-radius: 10px; line-height: 1; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.reset-btn:hover { background: rgba(255, 82, 82, 0.18); border-color: rgba(255, 82, 82, 0.45); transform: scale(1.06); }
.reset-btn:active { transform: scale(0.96); }

.bet-buttons { display: flex; gap: 6px; }
.bet-buttons button { padding: 9px 0; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07); color: #9CA3AF; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; font-family: 'Rajdhani', sans-serif; flex: 1; letter-spacing: 0.3px; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }
.bet-buttons button:hover { background: rgba(255, 184, 0, 0.12); border-color: rgba(255, 184, 0, 0.28); color: #FFB800; transform: translateY(-1px); }
.bet-buttons button:active { transform: translateY(0) scale(0.97); }
.bet-max { background: linear-gradient(135deg, rgba(183, 28, 28, 0.55), rgba(220, 50, 50, 0.55)) !important; border: 1px solid rgba(255, 82, 82, 0.32) !important; color: #FF8A80 !important; }
.bet-max:hover { background: linear-gradient(135deg, rgba(183, 28, 28, 0.88), rgba(220, 50, 50, 0.88)) !important; border-color: rgba(255, 82, 82, 0.6) !important; color: #FFCDD2 !important; box-shadow: 0 0 16px rgba(255, 82, 82, 0.25); transform: translateY(-1px) !important; }

.action-btn { width: 100%; height: 54px; font-size: 18px; font-weight: 700; font-family: 'Rajdhani', sans-serif; letter-spacing: 2px; text-transform: uppercase; border: none; border-radius: 14px; cursor: pointer; margin-top: auto; transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.action-btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4); }
.action-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); filter: brightness(0.95); }
.action-btn:disabled { cursor: not-allowed; opacity: 0.8; }

/* === RIGHT PANEL — LIVE PLAYERS === */
.live-header { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #374151; border-bottom: 1px solid rgba(255, 255, 255, 0.04); background: rgba(0, 0, 0, 0.25); font-family: 'Rajdhani', sans-serif; }
.live-rank-btn { background: rgba(255, 184, 0, 0.08); border: 1px solid rgba(255, 184, 0, 0.18); border-radius: 6px; cursor: pointer; font-size: 13px; padding: 3px 7px; line-height: 1; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.live-rank-btn:hover { background: rgba(255, 184, 0, 0.2); border-color: rgba(255, 184, 0, 0.4); transform: scale(1.08); }
.live-dot { display: inline-block; width: 6px; height: 6px; background: #00C853; border-radius: 50%; margin-right: 8px; vertical-align: middle; margin-bottom: 1px; box-shadow: 0 0 8px #00C853, 0 0 16px rgba(0, 200, 83, 0.4); animation: live-blink 1.8s ease-in-out infinite; }
@keyframes live-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 8px #00C853, 0 0 16px rgba(0, 200, 83, 0.4); } 50% { opacity: 0.25; box-shadow: 0 0 3px #00C853; } }
.user-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.user-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.04); transition: background 0.2s; }
.user-item:hover { background: rgba(255, 255, 255, 0.05); }
.commander-highlight { border: 1px solid #FFD700; box-shadow: 0 0 10px rgba(255,215,0,0.3); background: rgba(255,215,0,0.05) !important; }

/* ============================================================
   🔥 DYNAMIC THRILL EFFECTS
   ============================================================ */

/* 1. 숫자 펄스(심장 박동) 효과 */
@keyframes pulse-med {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes pulse-high {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}
.pulse-med { animation: pulse-med 0.6s ease-in-out infinite; }
.pulse-high { animation: pulse-high 0.25s ease-in-out infinite; }

/* 2. 위험 경고 (Danger Alert) */
@keyframes dangerFlash {
    0%, 100% { box-shadow: inset 0 0 0 transparent; }
    50% { box-shadow: inset 0 0 120px rgba(255, 0, 0, 0.4); }
}
.danger-alert { animation: dangerFlash 0.8s infinite; }

/* 3. 사전 진동 (Pre-Rumble Screen Shake) */
@keyframes preShake1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-1px, 1px); }
}
@keyframes preShake2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, -2px); }
    50% { transform: translate(2px, 2px); }
    75% { transform: translate(-2px, 2px); }
}
@keyframes preShake3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-4px, -4px); }
    50% { transform: translate(4px, 4px); }
    75% { transform: translate(-4px, 4px); }
}
.shake-1 { animation: preShake1 0.15s infinite; }
.shake-2 { animation: preShake2 0.1s infinite; }
.shake-3 { animation: preShake3 0.05s infinite; }

/* 4. 빅 윈 알림 배지 (Big Win Alert) */
.big-win-alert {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.85), transparent);
    color: #fff;
    padding: 12px 50px;
    font-size: 18px;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 15px #FFD700;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 150;
    pointer-events: none;
    white-space: nowrap;
    border-radius: 50px;
}
.big-win-alert.show { top: 30px; opacity: 1; }

/* 글로벌 알림 배너 (도발 및 전쟁 알림용) */
.global-alert-banner {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 82, 82, 0.95);
    border: 2px solid #FF1744;
    color: white;
    padding: 10px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.6);
    pointer-events: none;
    white-space: nowrap;
}
.global-alert-banner.show { top: 20px; opacity: 1; }
.global-alert-banner.provoke { background: rgba(33, 150, 243, 0.95); border-color: #64B5F6; box-shadow: 0 0 20px rgba(33, 150, 243, 0.6); }

/* Lv.3 암전 및 사이렌 효과 */
.siren-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: black; z-index: 9999;
    box-shadow: inset 0 0 150px 50px rgba(255, 0, 0, 0.8);
    animation: sirenFlash 1s infinite alternate;
    display: flex; flex-direction: column; justify-content: center; align-items: center; color: white;
}
@keyframes sirenFlash {
    0% { box-shadow: inset 0 0 50px 10px rgba(255, 0, 0, 0.5); }
    100% { box-shadow: inset 0 0 250px 100px rgba(255, 0, 0, 1); }
}

/* 5. 축하 파티클 (Confetti) */
#confettiContainer {
    position: absolute; top:0; left:0; width:100%; height:100%;
    pointer-events:none; z-index: 30; overflow:hidden;
}
.confetti {
    position: absolute;
    width: 10px; height: 20px;
    animation: fall linear forwards;
}
@keyframes fall {
    to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   MODAL & PARTICLES
   ============================================================ */
@keyframes screenShake { 0% { transform: translate(0, 0) rotate(0deg); } 10% { transform: translate(-5px, -3px) rotate(-0.6deg); } 20% { transform: translate(5px, 3px) rotate(0.6deg); } 30% { transform: translate(-5px, 3px) rotate(-0.4deg); } 40% { transform: translate(5px, -3px) rotate(0.4deg); } 50% { transform: translate(-3px, 2px) rotate(-0.2deg); } 60% { transform: translate(3px, 2px) rotate(0.2deg); } 70% { transform: translate(-2px, -1px) rotate(-0.1deg); } 80% { transform: translate(2px, 1px) rotate(0.1deg); } 90% { transform: translate(-1px, -1px) rotate(0); } 100% { transform: translate(0, 0) rotate(0deg); } }
.shake { animation: screenShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

@keyframes rainbow { 0% { color: #ff3b3b; text-shadow: 0 0 10px #ff3b3b, 0 0 30px #ff3b3b88, 0 0 60px #ff3b3b44; } 14% { color: #ff9900; text-shadow: 0 0 10px #ff9900, 0 0 30px #ff990088, 0 0 60px #ff990044; } 28% { color: #ffe600; text-shadow: 0 0 10px #ffe600, 0 0 30px #ffe60088, 0 0 60px #ffe60044; } 42% { color: #00e676; text-shadow: 0 0 10px #00e676, 0 0 30px #00e67688, 0 0 60px #00e67644; } 57% { color: #00bcd4; text-shadow: 0 0 10px #00bcd4, 0 0 30px #00bcd488, 0 0 60px #00bcd444; } 71% { color: #448aff; text-shadow: 0 0 10px #448aff, 0 0 30px #448aff88, 0 0 60px #448aff44; } 85% { color: #ea80fc; text-shadow: 0 0 10px #ea80fc, 0 0 30px #ea80fc88, 0 0 60px #ea80fc44; } 100% { color: #ff3b3b; text-shadow: 0 0 10px #ff3b3b, 0 0 30px #ff3b3b88, 0 0 60px #ff3b3b44; } }
.multiplier-rainbow { animation: rainbow 0.8s linear infinite; }

#particleContainer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; overflow: hidden; }
.crash-particle { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); animation: particleFly 0.9s ease-out forwards; }
@keyframes particleFly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.1); } }

/* MODALS */
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 500; display: flex; justify-content: center; align-items: center; animation: modalFadeIn 0.2s ease; }
.modal-box { background: rgba(12, 17, 24, 0.98); border: 1px solid rgba(255, 184, 0, 0.15); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; max-height: 88vh; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 60px rgba(255, 184, 0, 0.06); animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); flex-shrink: 0; }
.modal-title { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700; letter-spacing: 3px; color: #FFB800; text-shadow: 0 0 14px rgba(255, 184, 0, 0.45); text-transform: uppercase; }
.modal-close { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); color: #6B7280; width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; transition: background 0.2s, color 0.2s, border-color 0.2s; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(255, 82, 82, 0.14); color: #FF5252; border-color: rgba(255, 82, 82, 0.3); }
.modal-footer { padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.04); text-align: center; flex-shrink: 0; }
.firebase-badge { font-size: 10px; letter-spacing: 1.5px; color: #374151; font-weight: 700; text-transform: uppercase; }

/* RANKING MODAL */
.ranking-modal-box { width: 500px; }
.rank-main-tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.rank-tab { flex: 1; padding: 14px; background: transparent; border: none; color: #4B5563; font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.rank-tab:hover { color: #9CA3AF; background: rgba(255, 255, 255, 0.02); }
.rank-tab.active { color: #FFB800; border-bottom-color: #FFB800; background: rgba(255, 184, 0, 0.03); }
.rank-period-filters { display: flex; gap: 8px; padding: 12px 20px; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.04); flex-shrink: 0; }
.period-btn { padding: 5px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); color: #4B5563; font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; border-radius: 20px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.period-btn:hover { color: #9CA3AF; background: rgba(255, 255, 255, 0.08); }
.period-btn.active { background: rgba(255, 184, 0, 0.12); border-color: rgba(255, 184, 0, 0.35); color: #FFB800; }
.ranking-content { flex: 1; overflow-y: auto; min-height: 0; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); transition: background 0.15s; cursor: default; }
.rank-item:hover { background: rgba(255, 255, 255, 0.02); }
.rank-item:last-child { border-bottom: none; }
.rank-item.my-nation { background: rgba(255, 184, 0, 0.06) !important; border-left: 3px solid rgba(255, 184, 0, 0.5); padding-left: 17px; }
.rank-position { width: 30px; text-align: center; font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 700; color: #374151; flex-shrink: 0; }
.rank-item.rank-1 .rank-position { font-size: 18px; }
.rank-item.rank-2 .rank-position { font-size: 18px; }
.rank-item.rank-3 .rank-position { font-size: 18px; }
.rank-flag { font-size: 24px; flex-shrink: 0; line-height: 1; }
.rank-flag.small { font-size: 16px; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; font-weight: 700; color: #E8EBF0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 10px; color: #374151; letter-spacing: 1px; margin-top: 2px; text-transform: uppercase; font-weight: 700; }
.rank-amount { text-align: right; flex-shrink: 0; }
.rank-vault-num { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700; color: #FFB800; }
.rank-vault-label { font-size: 9px; color: #374151; letter-spacing: 1px; margin-top: 3px; text-transform: uppercase; font-weight: 700; }
.rank-local-sub-header { padding: 10px 20px 8px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.rank-empty { text-align: center; padding: 48px 20px; color: #374151; font-size: 13px; font-weight: 700; letter-spacing: 1px; }

/* VAULT DEPOSIT MODAL */
.vault-modal-box { width: 380px; }
.vault-nation-banner { display: flex; align-items: center; gap: 16px; padding: 18px 24px; background: rgba(255, 184, 0, 0.04); border-bottom: 1px solid rgba(255, 184, 0, 0.08); flex-shrink: 0; }
.vault-flag-big { font-size: 44px; line-height: 1; flex-shrink: 0; }
.vault-nation-info-text { flex: 1; min-width: 0; }
.vault-nation-nm { font-size: 17px; font-weight: 700; color: #E8EBF0; letter-spacing: 0.5px; }
.vault-current-total { font-size: 11px; font-weight: 700; color: #FFB800; letter-spacing: 0.5px; margin-top: 4px; font-family: 'Orbitron', monospace; }
.vault-my-balance { padding: 11px 24px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: #4B5563; text-transform: uppercase; border-bottom: 1px solid rgba(255, 255, 255, 0.04); flex-shrink: 0; }
.vault-my-balance span { color: #69F0AE; font-family: 'Orbitron', monospace; font-size: 13px; }
.vault-preset-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; padding: 16px 20px; flex-shrink: 0; }
.vault-preset-grid button { padding: 10px 0; background: rgba(255, 184, 0, 0.06); border: 1px solid rgba(255, 184, 0, 0.15); color: #FFB800; border-radius: 9px; font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: 0.5px; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.vault-preset-grid button:hover { background: rgba(255, 184, 0, 0.16); border-color: rgba(255, 184, 0, 0.4); transform: translateY(-1px); }
.vault-preset-grid button:active { transform: scale(0.96); }
.vault-input-row { display: flex; gap: 8px; align-items: center; padding: 0 20px 16px; flex-shrink: 0; }
.vault-input-row input { flex: 1; padding: 12px 14px; font-size: 20px; font-weight: 700; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 184, 0, 0.18); color: #FFB800; border-radius: 11px; font-family: 'Orbitron', monospace; text-align: right; outline: none; letter-spacing: 1px; }
.vault-reset-btn { background: rgba(255, 82, 82, 0.08); border: 1px solid rgba(255, 82, 82, 0.18); color: #FF5252; font-size: 18px; cursor: pointer; padding: 9px 12px; border-radius: 10px; line-height: 1; transition: background 0.2s, transform 0.15s; }
.vault-reset-btn:hover { background: rgba(255, 82, 82, 0.2); transform: scale(1.06); }
.vault-action-row { display: flex; gap: 10px; padding: 0 20px 20px; flex-shrink: 0; }
.vault-cancel-btn { flex: 1; padding: 13px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); color: #6B7280; border-radius: 12px; font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; letter-spacing: 1px; transition: background 0.2s, color 0.2s; }
.vault-cancel-btn:hover { background: rgba(255, 255, 255, 0.1); color: #9CA3AF; }
.vault-confirm-btn { flex: 2; padding: 13px; background: linear-gradient(135deg, #FFB800, #FF8F00); border: none; color: #0B0E11; border-radius: 12px; font-family: 'Rajdhani', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: 1.5px; box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3); transition: filter 0.2s, transform 0.15s, box-shadow 0.2s; }
.vault-confirm-btn:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255, 184, 0, 0.5); }
.vault-confirm-btn:active { transform: translateY(0) scale(0.98); filter: brightness(0.96); }

/* SETTINGS MODAL */
.settings-modal-box { width: 350px; }
.settings-content { padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.settings-group { display: flex; flex-direction: column; gap: 12px; }
.settings-label { font-size: 11px; font-weight: 700; color: #FFB800; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid rgba(255, 184, 0, 0.2); padding-bottom: 4px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: #E8EBF0; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch label { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.1); border-radius: 24px; transition: .4s; }
.toggle-switch label:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #9CA3AF; border-radius: 50%; transition: .4s; }
.toggle-switch input:checked + label { background-color: #00C853; }
.toggle-switch input:checked + label:before { transform: translateX(20px); background-color: white; }

/* PROVOKE MODAL */
.provoke-modal-box { width: 450px; }
.provoke-tiers { display: flex; flex-direction: column; gap: 10px; }
.tier-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); padding: 15px; border-radius: 10px; cursor: pointer; transition: background 0.2s, transform 0.15s, border-color 0.2s; }
.tier-card:hover { background: rgba(255,255,255,0.07); transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }
.tier-title { font-size: 15px; font-weight: 700; color: #E8EBF0; margin-bottom: 5px; }
.tier-desc { font-size: 12px; color: #9CA3AF; line-height: 1.4; }
.tier-lv3 { background: rgba(255,82,82,0.05); border-color: rgba(255,82,82,0.2); }
.tier-lv3:hover { background: rgba(255,82,82,0.1); border-color: rgba(255,82,82,0.5); }
.warning-text { font-size: 11px; color: #FF5252; margin-top: 10px; text-align: center; }

/* WAR ROOM MODAL */
.war-room-modal-box { width: 450px; max-height: 80vh; }
.commander-banner { background: rgba(255, 184, 0, 0.1); border-bottom: 1px solid rgba(255, 184, 0, 0.2); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.commander-label { font-size: 11px; font-weight: 700; color: #FFB800; letter-spacing: 1px; text-transform: uppercase; }
.commander-name { font-size: 14px; font-weight: 700; color: #E8EBF0; }
.war-content { padding: 20px; overflow-y: auto; flex: 1; }
.war-empty { text-align: center; padding: 30px; color: #6B7280; font-size: 13px; font-weight: 600; }
.enemy-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 14px; font-weight: 700; }
.war-timer { font-family: 'Orbitron', monospace; color: #FF5252; }
.progress-container { width: 100%; height: 12px; background: rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden; margin-bottom: 5px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #00C853, #69F0AE); transition: width 0.3s ease; }
.progress-text { font-size: 11px; color: #9CA3AF; text-align: right; margin-bottom: 15px; font-family: 'Orbitron', monospace; }
.war-select { width: 100%; padding: 10px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; font-family: 'Rajdhani', sans-serif; outline: none; }
.war-active-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.war-active-nation { font-weight: 700; font-size: 14px; }
.war-active-status { font-size: 11px; color: #00C853; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================================
   📜 HISTORY MODAL (투자 영수증 디자인)
   ============================================================ */
.history-modal-box { width: 450px; max-height: 80vh; }
.history-content { padding: 15px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.history-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); padding: 15px; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.history-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: bold; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 8px; }
.history-badge-diamond { background: rgba(0,255,204,0.15); color: #00FFCC; border: 1px solid #00FFCC; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.history-badge-paper { background: rgba(255,255,255,0.1); color: #B0C4DE; border: 1px solid #B0C4DE; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.history-badge-greedy { background: rgba(255,82,82,0.15); color: #FF5252; border: 1px solid #FF5252; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.history-badge-normal { background: rgba(255,184,0,0.1); color: #FFB800; border: 1px solid rgba(255,184,0,0.5); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.history-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; color: #E8EBF0; margin-top: 5px;}
.history-label { color: #9CA3AF; font-size: 11px; text-transform: uppercase; font-weight: bold; }
.profit-pos { color: #69F0AE; font-weight: 900; font-size: 16px;}
.profit-neg { color: #FF5252; font-weight: 900; font-size: 16px;}
.missed-profit { font-size: 11px; color: #FF5252; opacity: 0.8; font-style: italic; margin-top: 6px; text-align: right; background: rgba(255,82,82,0.05); padding: 5px; border-radius: 4px;}
.empty-history { text-align: center; color: #6B7280; padding: 40px 20px; font-size: 14px; font-weight: bold; }
.ad-button.super-mine {
    background: linear-gradient(90deg, #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF, #4B0082, #9400D3, #FF0000);
    background-size: 300% 300%;
    animation: rainbowGlow 2s ease infinite, pulse-glow 1s ease-in-out infinite !important;
    color: white !important;
    text-shadow: 0 0 8px rgba(0,0,0,0.8), 0 0 15px rgba(255,255,255,0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

@keyframes rainbowGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 🔥 실시간 투자금(Total Pool) 텍스트 */
.total-pool-text {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    font-weight: 700;
    color: #9CA3AF;
    margin-top: 5px;
    letter-spacing: 2px;
    transition: all 0.3s;
}
/* 로켓 비행 중 (돈이 불타고 있을 때) */
.total-pool-text.active {
    color: #69F0AE;
    text-shadow: 0 0 10px rgba(105, 240, 174, 0.6);
}
/* 로켓이 폭락했을 때 (증발한 돈) */
.total-pool-text.crashed {
    color: #FF5252;
    text-shadow: 0 0 10px rgba(255, 82, 82, 0.6);
}
/* ============================================================
   🌟 NEXUS EQUITIES 로고 특수효과 (메탈릭 스윕 & 글리치)
   ============================================================ */
/* 1. 메탈릭 광택 효과 (기본 상태) */
.nexus-logo {
    background: linear-gradient(110deg, #FFB800 0%, #FFD700 20%, #FFFFFF 40%, #FFB800 60%, #FF8F00 80%, #FFB800 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    color: transparent !important;
    animation: metallicSweep 4s linear infinite;
    text-shadow: none !important; 
    position: relative;
    display: inline-block;
}
@keyframes metallicSweep { to { background-position: 200% center; } }

/* 2. 글리치 효과 (고액 배팅 / 시장 과열 시) */
.nexus-logo.glitch { animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite; }
@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 1px) }
    40% { transform: translate(-1px, -1px) }
    60% { transform: translate(2px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}
.nexus-logo.glitch::before, .nexus-logo.glitch::after {
    content: 'NEXUS EQUITIES';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent;
}
.nexus-logo.glitch::before {
    left: 2px; text-shadow: -1px 0 red; clip: rect(24px, 550px, 90px, 0); animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
}
.nexus-logo.glitch::after {
    left: -2px; text-shadow: -1px 0 blue; clip: rect(85px, 550px, 140px, 0); animation: glitch-anim-2 0.3s infinite linear alternate-reverse;
}
@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 81px, 0); }
    20% { clip: rect(61px, 9999px, 47px, 0); }
    40% { clip: rect(56px, 9999px, 98px, 0); }
    60% { clip: rect(31px, 9999px, 5px, 0); }
    80% { clip: rect(14px, 9999px, 49px, 0); }
    100% { clip: rect(72px, 9999px, 21px, 0); }
}

/* ============================================================
   📖 GUIDE & PRIVACY POLICY MODAL
   ============================================================ */
.guide-modal-box {
    width: 520px;
    padding: 30px 30px 24px;
    text-align: center;
    background: rgba(14, 20, 28, 0.92);
    border: 1px solid rgba(255, 184, 0, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 184, 0, 0.1), 0 24px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 184, 0, 0.15);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.guide-modal-box h2 {
    color: #FFB800;
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    margin-bottom: 18px;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.4);
    flex-shrink: 0;
}
.guide-modal-content {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    padding-right: 6px;
    margin-bottom: 4px;
    max-height: 55vh;
    color: #9CA3AF;
    font-size: 13px;
    line-height: 1.75;
}
.guide-modal-content h3 {
    color: #FFB800;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 184, 0, 0.15);
}
.guide-modal-content h3:first-child { margin-top: 0; }
.guide-modal-content p { margin-bottom: 10px; }
.guide-modal-content ol { padding-left: 20px; margin-bottom: 10px; }
.guide-modal-content li { margin-bottom: 7px; }
.guide-modal-content strong { color: #E8EBF0; }
.guide-confirm-btn {
    background: linear-gradient(135deg, rgba(255,184,0,0.12), rgba(255,143,0,0.12)) !important;
    border: 1px solid rgba(255, 184, 0, 0.4) !important;
    color: #FFB800 !important;
    box-shadow: none !important;
}
.guide-confirm-btn:hover {
    background: linear-gradient(135deg, rgba(255,184,0,0.25), rgba(255,143,0,0.25)) !important;
    color: #FFD54F !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 0 18px rgba(255, 184, 0, 0.3) !important;
}
.guide-footer-link {
    position: fixed;
    bottom: 10px;
    right: 18px;
    z-index: 90;
}
.guide-footer-link button {
    background: transparent;
    border: none;
    color: #374151;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    padding: 4px 8px;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.guide-footer-link button:hover { color: #9CA3AF; }

/* ============================================================
   🚨 DISCLAIMER (초기 경고문) & 반투명 글래스 효과
   ============================================================ */
.disclaimer-glass {
    background: rgba(11, 14, 17, 0.45) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}
.disclaimer-box {
    width: 420px; padding: 35px 30px; text-align: center;
    background: rgba(14, 20, 28, 0.85);
    border: 1px solid rgba(255, 82, 82, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 82, 82, 0.1), 0 24px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 82, 82, 0.15);
}
.disclaimer-box h2 {
    color: #FF5252; font-family: 'Orbitron', monospace; font-size: 20px; margin-bottom: 18px; letter-spacing: 3px; text-shadow: 0 0 10px rgba(255, 82, 82, 0.4);
}
.disclaimer-box p { color: #9CA3AF; font-size: 13.5px; line-height: 1.7; margin-bottom: 28px; }
.disclaimer-box button { padding: 14px; transition: all 0.2s ease; }
.disclaimer-box .vault-confirm-btn { background: rgba(255, 82, 82, 0.1); border: 1px solid rgba(255, 82, 82, 0.4); color: #FF5252; }
.disclaimer-box .vault-confirm-btn:hover { background: rgba(255, 82, 82, 0.2); color: white; box-shadow: 0 0 20px rgba(255, 82, 82, 0.3); transform: translateY(-2px); }
/* ============================================================
   ✨ FLOATING PROFIT TEXT EFFECT (돈 캘 때 솟구치는 효과)
   ============================================================ */
@keyframes floatUpAndOut {
    0% { transform: translate(-50%, 0); opacity: 1; scale: 1; }
    50% { opacity: 1; scale: 1.2; }
    100% { transform: translate(-50%, 100px); opacity: 0; scale: 1; }
}

.float-text {
    position: fixed;
    pointer-events: none;
    font-weight: 900;
    font-size: 26px;
    font-family: 'Orbitron', sans-serif; /* 기존 게임의 멋진 폰트 사용 */
    color: #FFB800; /* NEXUS GOLD 색상 */
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.8), 0 0 20px rgba(0,0,0,1);
    animation: floatUpAndOut 1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    z-index: 20000;
}
.float-text-super {
    font-size: 38px;
    text-shadow: 0 0 12px rgba(255,184,0,1), 0 0 30px rgba(255,184,0,0.7), 0 0 50px rgba(255,184,0,0.3), 0 0 20px rgba(0,0,0,1);
}

/* ── Skeleton Loading ──────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(0,210,255,0.25), 0 0 8px rgba(0,210,255,0.08); }
    50%       { box-shadow: 0 0 12px rgba(0,210,255,0.55), 0 0 22px rgba(0,210,255,0.2); }
}
.skeleton-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,210,255,0.08);
    background: rgba(255,255,255,0.02);
    animation: neon-pulse 2s ease-in-out infinite;
}
.skeleton-circle {
    width: 22px; height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.6s infinite linear;
}
.skeleton-bar {
    height: 10px;
    border-radius: 5px;
    flex: 1;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.6s infinite linear;
}
.skeleton-bar-short {
    width: 58px; height: 10px;
    border-radius: 5px;
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,184,0,0.15) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.6s infinite linear;
}

/* ── Provoke Effects ───────────────────────────────────────── */
@keyframes flag-shake {
    0%, 100% { transform: rotate(0deg); }
    20%      { transform: rotate(-18deg); }
    40%      { transform: rotate(18deg); }
    60%      { transform: rotate(-12deg); }
    80%      { transform: rotate(12deg); }
}
@keyframes screen-blackout {
    0%        { background-color: transparent; }
    10%, 90%  { background-color: rgba(255, 0, 0, 0.35); }
    50%       { background-color: rgba(255, 0, 0, 0.55); }
    100%      { background-color: transparent; }
}
.effect-lv2-shake {
    animation: flag-shake 0.35s ease-in-out infinite;
    display: inline-block;
}
.effect-lv3-blackout {
    animation: screen-blackout 2s ease-in-out 4;
    pointer-events: none;
}

/* ============================================================
   📋 LEGAL MODALS (Terms of Service & Privacy Policy)
   ============================================================ */
.legal-modal-box {
    width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.legal-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    color: #9CA3AF;
    font-size: 13px;
    line-height: 1.75;
}
.legal-modal-content h3 {
    color: #FFB800;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 184, 0, 0.15);
}
.legal-modal-content h4 {
    color: #E8EBF0;
    font-size: 13px;
    font-weight: 700;
    margin: 16px 0 6px;
    letter-spacing: 0.5px;
}
.legal-modal-content p { margin-bottom: 10px; }
.legal-modal-content ul { padding-left: 20px; margin-bottom: 10px; }
.legal-modal-content li { margin-bottom: 6px; }
.legal-modal-content strong { color: #E8EBF0; }

.legal-footer-links {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 6px;
}
.legal-footer-links button {
    background: transparent;
    border: none;
    color: #374151;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    padding: 4px 8px;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.legal-footer-links button:hover { color: #9CA3AF; }
.legal-footer-sep {
    color: #1F2937;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}