/* Spirit Saber (จอมยุทธ์จิตแสง) - Stylesheet */

:root {
    --bg-dark: #07080c;
    --panel-bg: rgba(13, 16, 26, 0.75);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --accent-emerald: #00ff88;
    --accent-yellow: #ffaa00;
    --accent-danger: #ff2a2a;
    --text-main: #e2e8f0;
    --text-muted: #8292a8;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Cinzel', serif;
    --font-mono: 'Share Tech Mono', monospace;
    --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.5);
    --glow-pink: 0 0 15px rgba(255, 0, 127, 0.5);
    --glow-emerald: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000; /* Pure black outer frame borders */
    font-family: var(--font-sans);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
}

html {
    width: 100%;
    height: 100%;
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio (100 / 56.25 = 1.777) */
    max-height: 100vh;
    max-width: 177.78vh; /* 16:9 Aspect Ratio (177.78 / 100 = 1.777) */
    overflow: hidden;
    background-color: var(--bg-dark);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
    cursor: url('asset/svg/cursor.svg') 16 16, crosshair;
}

/* Screens System */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    z-index: 10;
}

.screen.active {
    display: flex;
}

/* ==========================================
   WEAPON SELECTION SCREEN (MAIN MENU)
   ========================================== */
#menu-screen {
    background: radial-gradient(circle at center, #0e1220 0%, var(--bg-dark) 100%);
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    overflow: hidden;
    gap: 15px;
}

.menu-header {
    text-align: center;
    margin-bottom: 5px;
}

.game-title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: var(--glow-cyan);
}

.game-subtitle {
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--accent-pink);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
    text-shadow: var(--glow-pink);
}

.selection-container {
    width: 100%;
    max-width: 1100px;
    text-align: center;
}

.selection-container h2 {
    font-family: var(--font-serif);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Weapon Selection Cards */
.weapon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 10px;
}

.weapon-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.weapon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weapon-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.weapon-card.active {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan), inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.weapon-card.active::before {
    opacity: 1;
}

.weapon-card.locked {
    cursor: not-allowed;
    background: rgba(5, 5, 8, 0.4);
    border-color: rgba(255, 255, 255, 0.02);
    box-shadow: none;
    opacity: 0.85;
}

.weapon-card.locked:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.02);
    box-shadow: none;
}

.weapon-card.locked .weapon-icon {
    filter: brightness(0) opacity(0.2);
    border-color: transparent;
    background: transparent;
}

/* Icons and details */
.weapon-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.weapon-card.active .weapon-icon {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
    color: var(--accent-cyan);
}

.saber-glow {
    filter: drop-shadow(0 0 8px var(--accent-cyan));
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.75; }
}

.weapon-card h3 {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-top: 10px;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.weapon-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    height: 38px;
}

.weapon-skills {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
    text-align: left;
    flex-grow: 1;
}

.skill-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-left {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
}

.badge-right {
    background: rgba(255, 0, 127, 0.15);
    border: 1px solid rgba(255, 0, 127, 0.3);
    color: var(--accent-pink);
}

.skill-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.skill-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-status {
    width: 100%;
    text-align: center;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 8px;
    border-radius: 8px;
    margin-top: 10px;
}

.status-available {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.status-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Actions panel */
.menu-actions {
    margin-top: 30px;
}

.menu-help {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-help i {
    color: var(--accent-cyan);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    border: none;
    outline: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0099ff);
    color: #030508;
    box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   GAMEPLAY SCREEN
   ========================================== */
#game-screen {
    background-color: var(--bg-dark);
}

#game-screen canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Top HUD Banner */
#hud-top {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 15;
    pointer-events: none;
}

.hud-item {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    padding: 4px 15px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hud-item .label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.hud-item .value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: bold;
}

/* Bottom HUD banner (HP, SP, XP) */
#hud-bottom {
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 15;
    pointer-events: none;
}

.hud-left-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 200px;
}

/* HP progress bar container */
.hp-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 10px;
    align-self: stretch;
    width: 100%;
}

.hp-container .label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

/* XP/Qi Core progress bar */
.xp-container {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 10px;
    width: 100%;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.xp-header .label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

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

.xp-bar-outer {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.xp-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SP segment bars */
.hud-right-panel {
    width: 220px;
}

.sp-container {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 10px;
    width: 100%;
}

.sp-container .label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    text-align: right;
}

.sp-bar-container {
    width: 100%;
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sp-bar-fill-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff007f, #00f0ff);
    transition: width 0.15s ease-out;
}

.sp-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

.sp-segment {
    flex: 1;
    height: 100%;
    border-right: 2px solid #000;
    background: transparent;
}

.sp-segment:last-child {
    border-right: none;
}

.sp-value-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 4px #000;
    z-index: 3;
}

/* Skill Hotbar UI in Corner */
.skill-hotbar {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 15;
    pointer-events: none;
}

.skill-slot {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skill-slot.active {
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-slot .icon {
    font-size: 18px;
    color: var(--text-muted);
}

.skill-slot#skill-dash.ready .icon {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 5px var(--accent-cyan));
}

.skill-slot#skill-drill.ready .icon {
    color: var(--accent-pink);
    filter: drop-shadow(0 0 5px var(--accent-pink));
}

.skill-key {
    position: absolute;
    top: -6px;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 4px;
    font-family: var(--font-mono);
    font-size: 7px;
    color: #fff;
}

.skill-cost {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 3px;
}

.skill-slot.ready .skill-cost {
    color: #fff;
}

/* ==========================================
   GAME INTERMISSION OVERLAYS
   ========================================== */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.game-overlay h2 {
    font-family: var(--font-serif);
    font-size: 38px;
    letter-spacing: 5px;
    margin-bottom: 8px;
}

.game-overlay p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.upgrade-choices {
    display: flex;
    gap: 20px;
    max-width: 900px;
    width: 90%;
}

.upgrade-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upgrade-card:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.upgrade-card i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-cyan);
    margin-bottom: 15px;
}

.upgrade-card:hover i {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
}

.upgrade-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.upgrade-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* ==========================================
   GAME OVER AND VICTORY OVERLAYS
   ========================================== */
#gameover-screen, #victory-screen {
    background: rgba(5, 5, 8, 0.7);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

.overlay-panel {
    width: 90%;
    max-width: 460px;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
}

.glass-panel {
    background: rgba(13, 16, 26, 0.85);
    border: 1px solid var(--panel-border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.overlay-panel h1 {
    font-family: var(--font-serif);
    font-size: 42px;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.summary-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.5;
}

.stats-summary {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 35px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.stat-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-row .label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-row .value {
    font-size: 15px;
    font-weight: 700;
}

.overlay-panel .actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overlay-panel .btn {
    width: 100%;
}

/* ==========================================
   MOBILE VIRTUAL CONTROLS
   ========================================== */
#mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 18;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px 20px 40px;
}

/* Virtual Joystick */
#joystick-boundary {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    touch-action: none;
}

#joystick-knob {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), #0099ff);
    box-shadow: var(--glow-cyan);
    cursor: pointer;
    touch-action: none;
    transition: transform 0.05s ease-out;
}

/* Action buttons */
#mobile-buttons {
    display: flex;
    gap: 20px;
    pointer-events: auto;
}

.btn-mobile {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    touch-action: none;
}

#btn-mobile-dash {
    background: rgba(0, 240, 255, 0.15);
    border: 2px solid rgba(0, 240, 255, 0.4);
}

#btn-mobile-dash.ready {
    background: rgba(0, 240, 255, 0.35);
    box-shadow: var(--glow-cyan);
}

#btn-mobile-drill {
    background: rgba(255, 0, 127, 0.15);
    border: 2px solid rgba(255, 0, 127, 0.4);
}

#btn-mobile-drill.ready {
    background: rgba(255, 0, 127, 0.35);
    box-shadow: var(--glow-pink);
}

.btn-mobile i {
    font-size: 20px;
}

.btn-mobile span {
    font-size: 8px;
    letter-spacing: 0.5px;
}

/* ==========================================
   GLOW AND EFFECT UTILITIES
   ========================================== */
.text-glow-cyan {
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

.text-glow-pink {
    color: var(--accent-pink);
    text-shadow: var(--glow-pink);
}

.text-glow-emerald {
    color: var(--accent-emerald);
    text-shadow: var(--glow-emerald);
}

.text-glow-danger {
    color: var(--accent-danger);
    text-shadow: 0 0 15px rgba(255, 42, 42, 0.6);
}

.text-glow-success {
    color: var(--accent-emerald);
    text-shadow: var(--glow-emerald);
}

.text-emerald { color: var(--accent-emerald); }
.text-cyan { color: var(--accent-cyan); }
.text-pink { color: var(--accent-pink); }

.font-mono {
    font-family: var(--font-mono);
}

.animate-glow {
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from {
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.2);
    }
    to {
        text-shadow: 0 0 25px rgba(0, 240, 255, 0.8), 0 0 45px rgba(0, 240, 255, 0.4);
    }
}

.animate-pulse {
    animation: text-pulse 2s infinite alternate;
}

@keyframes text-pulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.03); }
}

.hidden {
    display: none !important;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */
@media (max-width: 1024px) {
    .weapon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #hud-top {
        gap: 10px;
        top: 10px;
    }
    
    .hud-item {
        padding: 2px 10px;
    }
    
    .hud-item .value {
        font-size: 13px;
    }
    
    #hud-bottom {
        bottom: 5px;
        left: 8px;
        right: 8px;
    }
    
    .hud-left-panel {
        width: 140px;
        gap: 4px;
    }
    
    .hp-container {
        padding: 2px 6px;
        border-radius: 8px;
        gap: 6px;
    }
    
    .hearts-row i {
        font-size: 11px;
    }
    
    .xp-container {
        padding: 4px 8px;
        border-radius: 6px;
    }
    
    .xp-header {
        margin-bottom: 2px;
    }
    
    .hud-right-panel {
        width: 150px;
    }
    
    .sp-container {
        padding: 4px 8px;
        border-radius: 6px;
    }
    
    .sp-bar-container {
        height: 12px;
    }
    
    .sp-value-overlay {
        font-size: 8px;
    }

    .skill-hotbar {
        display: none; /* Hide hotbar on mobile, use buttons */
    }

    /* Level Up Responsive */
    .levelup-box {
        padding: 15px;
        max-width: 95%;
    }
    .levelup-options {
        gap: 8px;
    }
    .levelup-card {
        width: 135px;
        height: 200px;
        padding: 12px 8px;
    }
    .levelup-title {
        font-size: 12px;
    }
    .levelup-desc {
        font-size: 9px;
    }
    .levelup-card img.skill-icon-main {
        width: 24px !important;
        height: 24px !important;
    }

    /* Shop Responsive */
    .shop-box {
        width: 95%;
        max-height: 95%;
        padding: 15px;
    }
    .shop-header {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    .shop-header h2 {
        font-size: 18px;
    }
    .shop-currency {
        font-size: 12px;
    }
    .shop-currency .value {
        font-size: 15px;
    }
    .shop-columns {
        flex-direction: column;
        gap: 12px;
    }
    .shop-column {
        border-left: none !important;
        padding-left: 0 !important;
    }
    .shop-column:last-child {
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 12px;
    }
    .shop-section-title {
        font-size: 12px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    .shop-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 5px 0;
    }
    .shop-card {
        width: 125px;
        height: 180px;
        padding: 10px 6px;
    }
    .shop-card-icon-container {
        margin-top: 2px !important;
        margin-bottom: 5px !important;
    }
    .shop-card-icon-container img {
        width: 20px !important;
        height: 20px !important;
    }
    .shop-card-title {
        font-size: 11px;
    }
    .shop-card-lv {
        font-size: 8px;
    }
    .shop-card-desc {
        font-size: 9px;
    }
    .shop-card-action {
        padding-top: 4px;
        margin-top: 2px;
    }
    .shop-card-cost {
        font-size: 10px;
    }
    .shop-card-btn {
        font-size: 8px;
        padding: 1px 4px;
    }
    .shop-footer {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    #menu-screen {
        padding: 20px 10px;
    }
    
    .game-title {
        font-size: 30px;
        letter-spacing: 2px;
    }
    
    .weapon-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .weapon-card {
        padding: 12px;
    }
}

/* ==========================================
   LEVEL UP & SHOP INTERFACES
   ========================================== */

/* Glass box styling */
.glass-panel {
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(10px);
}

/* Level Up styling */
.levelup-box {
    width: 720px;
    max-width: 95%;
    padding: 25px 30px;
    text-align: center;
    border-color: rgba(0, 255, 136, 0.2);
}

/* Options styling */
.options-box {
    width: 380px;
    max-width: 90%;
    padding: 24px 30px;
    text-align: center;
    border-color: rgba(0, 240, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.levelup-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.levelup-options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
}

.levelup-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 195px;
    height: 260px;
    box-sizing: border-box;
    text-align: center;
}

.levelup-card:hover {
    background: rgba(0, 255, 136, 0.08);
    border-color: var(--accent-emerald);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.15);
}

.levelup-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.levelup-level {
    font-size: 11px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.levelup-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Shop styling */
.shop-box {
    width: 960px;
    max-width: 95%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    padding: 22px 28px;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.shop-currency {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.shop-currency .value {
    font-size: 19px;
    font-weight: bold;
}

.shop-columns {
    display: flex;
    gap: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 5px 0;
}

.shop-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.shop-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
    flex: 1;
}

.shop-active-slots-container {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-active-slots-container span {
    font-size: 11px;
    color: var(--text-muted);
}

.shop-slots-row {
    display: flex;
    gap: 6px;
}

.shop-slot-indicator {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.shop-slot-indicator.active {
    border-color: var(--accent-cyan);
    color: #fff;
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
}

/* Card item inside shop */
.shop-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 155px;
    height: 245px;
    box-sizing: border-box;
    text-align: center;
}

.shop-card:hover:not(.disabled) {
    background: rgba(0, 240, 255, 0.04);
    border-color: rgba(0, 240, 255, 0.25);
    transform: translateY(-1px);
}

.shop-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.02);
}

.shop-card-info {
    margin-bottom: 6px;
}

.shop-card-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1px;
}

.shop-card-lv {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 3px;
}

.shop-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

.shop-card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 6px;
}

.shop-card-cost {
    font-size: 12px;
    font-weight: bold;
    font-family: var(--font-mono);
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
    gap: 3px;
}

.shop-card-btn {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.shop-card-btn.buy {
    background: var(--accent-cyan);
    color: #000;
}

.shop-card-btn.upgrade {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.shop-card-btn.maxed {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.shop-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--panel-border);
}

/* Animations helper */
.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.levelup-indicator {
    background: var(--accent-emerald);
    color: #000;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.45);
    display: inline-block;
}

@keyframes levelup-pop {
    0% {
        transform: scale(0.6) rotate(-2deg);
        opacity: 0;
        box-shadow: 0 0 0px rgba(0, 255, 136, 0);
    }
    70% {
        transform: scale(1.05) rotate(1deg);
        opacity: 0.9;
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
    }
    100% {
        transform: scale(1.0) rotate(0deg);
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.2);
    }
}

.levelup-box-anim {
    animation: levelup-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Composite Stacked Skill Icons */
.skill-icon-stack {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.skill-icon-main {
    font-size: 36px;
    color: rgba(0, 240, 255, 0.22);
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.15));
}

.skill-icon-status {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 14px;
    color: var(--accent-emerald);
    background: #0d1326;
    border: 1.5px solid rgba(0, 255, 136, 0.4);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.35);
}

.svg-cyan {
    filter: drop-shadow(0 0 3px #00f0ff) drop-shadow(0 0 1px #00f0ff);
}

.svg-green {
    filter: drop-shadow(0 0 3px #00ff88) drop-shadow(0 0 1px #00ff88);
}
