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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

body {
    font-family: 'Chakra Petch', monospace;
    background: #0a0e1a;
    color: #e0e6ff;
    overflow: hidden;
    cursor: crosshair;
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: none;
}

#gameCanvas {
    display: block;
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.hud {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    font-family: 'Orbitron', monospace;
    z-index: 100;
    background: rgba(10, 14, 26, 0.85);
    padding: 10px;
    border: 2px solid #00ffff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
}

.hud-item {
    margin: 3px 0;
    font-size: 11px;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.hud-bar {
    width: 100%;
    max-width: 140px;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ffff;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 3px;
}

.hud-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00aaff);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Pause button */
.pause-button {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00ffff, #0088cc);
    border: 3px solid #00ffff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    z-index: 250;
    cursor: pointer;
    font-family: Arial, sans-serif;
    touch-action: manipulation;
}

.pause-button:active {
    transform: scale(0.9);
    box-shadow: 0 0 30px rgba(0, 255, 255, 1);
}

.level-up-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.card-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 10px;
    max-width: 100%;
    margin: 20px auto 0;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: visible;
}

.power-card {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
    height: 393px;
    background: linear-gradient(135deg, #0a1929 0%, #132f4c 100%);
    border: 4px solid #00ffff;
    border-radius: 20px;
    padding: 15px 16px;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

.power-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: #00ffff;
}

.power-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(0, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.power-card:active {
    transform: translateY(-4px) scale(0.98);
    border-color: #00ffaa;
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.6), inset 0 1px 0 rgba(0, 255, 255, 0.3);
    background: linear-gradient(135deg, #1a3a4a 0%, #0f2a3c 100%);
}

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

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    line-height: 1.2;
    word-wrap: break-word;
}

.card-desc {
    font-size: 12px;
    line-height: 1.4;
    color: #b0c4ff;
    margin: 0;
    flex: 1;
    word-wrap: break-word;
}

.card-stats {
    margin: 8px 0 0 0;
    padding-top: 8px;
    border-top: 2px solid rgba(0, 255, 255, 0.3);
    font-size: 11px;
    color: #00ff88;
    line-height: 1.4;
    word-wrap: break-word;
}

.reroll-button {
    margin-top: 20px;
    padding: 16px 40px;
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    background: linear-gradient(135deg, #ff6600, #ff3300);
    border: 4px solid #ff9900;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(255, 150, 0, 0.5);
    box-shadow: 0 8px 20px rgba(255, 150, 0, 0.3);
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.reroll-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 150, 0, 0.5);
}

.reroll-button:active {"}}]
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 8px 24px rgba(255, 150, 0, 0.6);
}

.reroll-count {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #ff9900;
    text-align: center;
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(255, 150, 0, 0.5);
}

.game-over-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 300;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.game-over-title {
    font-family: 'Orbitron', monospace;
    font-size: 72px;
    font-weight: 900;
    color: #ff3366;
    text-shadow: 0 0 30px rgba(255, 51, 102, 0.8);
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-over-stats {
    font-size: 24px;
    margin: 15px 0;
    color: #00ffff;
}

.button {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    padding: 16px 32px;
    margin: 5px;
    background: linear-gradient(135deg, #00ffff, #00aaff);
    border: none;
    border-radius: 10px;
    color: #0a0e1a;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.4);
    width: 100%;
    max-width: 350px;
    touch-action: manipulation;
}

.button:active {
    transform: scale(0.95);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 1);
}

.skill-tree-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 600;
    overflow-y: auto;
    padding: 80px 40px 40px 40px;
    flex-direction: column;
    align-items: center;
}

.skill-tree-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    color: #00ffff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.skill-points {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
    color: #ffaa00;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.skill-grid::-webkit-scrollbar {
    width: 8px;
}

.skill-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.skill-grid::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 10px;
}

.skill-grid::-webkit-scrollbar-thumb:hover {
    background: #00dddd;
}

.skill-item {
    background: linear-gradient(135deg, #1a2844 0%, #0f1a32 100%);
    border: 2px solid #4466ff;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(68, 102, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(68, 102, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item.unlocked {
    border-color: #00ffff;
    background: linear-gradient(135deg, #1a3644 0%, #0f2232 100%);
    box-shadow: 0 8px 24px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(0, 255, 255, 0.2);
}

.skill-item.unlocked:hover {
    box-shadow: 0 12px 32px rgba(0, 255, 255, 0.5), inset 0 1px 0 rgba(0, 255, 255, 0.3);
}

.skill-item.maxed {
    border-color: #ffaa00;
    background: linear-gradient(135deg, #3a2a1a 0%, #2a1a0a 100%);
    box-shadow: 0 8px 24px rgba(255, 170, 0, 0.3), inset 0 1px 0 rgba(255, 170, 0, 0.2);
}

.skill-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.skill-name {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-item.unlocked .skill-name {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.skill-item.maxed .skill-name {
    color: #ffaa00;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
}

.skill-description {
    font-size: 12px;
    color: #b0c0ff;
    line-height: 1.4;
    flex-grow: 1;
}

.skill-stats {
    font-size: 11px;
    color: #88cc00;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(68, 102, 255, 0.3);
    margin-top: auto;
}

.skill-level {
    font-size: 12px;
    color: #aabbff;
    font-weight: 600;
}

.skill-cost {
    font-size: 12px;
    color: #ffaa00;
    font-weight: 700;
}

.skill-item.maxed .skill-cost {
    color: #ffff00;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.6);
}

.skill-node {
    background: linear-gradient(145deg, #1a2332, #0f1419);
    border: 3px solid #555;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.skill-node.unlocked {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.skill-node.available:hover {
    border-color: #ffaa00;
    transform: scale(1.05);
}

.skill-node.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.close-button {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: #ff3366;
    z-index: 400;
}

.boss-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', monospace;
    font-size: 64px;
    font-weight: 900;
    color: #ff3366;
    text-shadow: 0 0 40px rgba(255, 51, 102, 1);
    z-index: 150;
    pointer-events: none;
    animation: bossWarning 2s ease-out forwards;
}

@keyframes bossWarning {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

.boss-health-bar {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    z-index: 100;
    background: rgba(10, 14, 26, 0.9);
    padding: 15px 25px;
    border: 3px solid #ff3366;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.5);
}

.boss-name {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 900;
    color: #ff3366;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
}

.boss-bar {
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ff3366;
    border-radius: 10px;
    overflow: hidden;
}

.boss-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3366, #ff6699);
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.9);
}

.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.98);
    z-index: 500;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 20px;
    overflow-y: auto; /* Allow scrolling if content is too tall */
}

.start-title {
    font-family: 'Orbitron', monospace;
    font-size: 6vw;
    max-font-size: 52px;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    margin-bottom: 15px;
    text-align: center;
}

.start-subtitle {
    font-size: 2.5vw;
    max-font-size: 14px;
    color: #a0b0ff;
    margin: 5px 0;
    text-align: center;
}

.start-stats {
    margin-top: 20px;
    font-size: 3vw;
    max-font-size: 16px;
    color: #ffaa00;
    text-align: center;
}

.start-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 350px;
}

.reset-button {
    background: linear-gradient(135deg, #ff3366, #ff6699);
    font-size: 14px;
    padding: 12px 24px;
}

.reset-button:active {
    background: linear-gradient(135deg, #ff6699, #ff3366);
}

.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 400;
    background: rgba(10, 14, 26, 0.8);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
}

.volume-slider {
    width: 100px;
    height: 5px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.mute-button {
    background: none;
    border: none;
    color: #00ffff;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.mute-button:hover {
    color: #00ffaa;
}

.menu-volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(10, 14, 26, 0.8);
    border: 2px solid #00ffff;
    border-radius: 10px;
}

.menu-volume-label {
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
}

.menu-volume-control .volume-slider {
    width: 150px;
}

.music-selector-button {
    background: none;
    border: none;
    color: #00ffff;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.music-selector-button:hover {
    color: #00ffaa;
    transform: scale(1.2);
}

.music-selector-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
    padding: 40px 20px;
}

.music-selector-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    color: #00ffff;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    text-align: center;
}

.music-category {
    margin-bottom: 50px;
    text-align: center;
}

.music-category-title {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #ffaa00;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
}

.music-track-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.music-track-button {
    padding: 15px 30px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    background: linear-gradient(135deg, #1a2332, #0f1419);
    border: 2px solid #00ffff;
    border-radius: 8px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.music-track-button:hover {
    border-color: #00ffaa;
    background: linear-gradient(135deg, #00ffff, #0088cc);
    transform: scale(1.05);
}

.music-track-button.active {
    background: linear-gradient(135deg, #00ffff, #00aaff);
    border-color: #00ffaa;
    box-shadow: 0 0 30px rgba(0, 255, 255, 1);
    color: #0a0e1a;
}

.music-track-button:active {
    transform: scale(0.95);
}

.current-track-display {
    margin-top: 60px;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: #a0b0ff;
    text-align: center;
}

.current-track-display span {
    color: #00ffff;
    font-weight: 700;
}

.music-selector-close {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: #ff3366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-selector-close:hover {
    background: #ff6699;
    transform: scale(1.1);
}

/* Audio Settings Screen */
.audio-settings-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
    padding: 60px 20px 40px;
}

.audio-settings-title {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: 900;
    color: #00ffff;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    text-align: center;
}

.audio-category {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.audio-category-title {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #ffaa00;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
}

.audio-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.audio-slider-label {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #a0b0ff;
    min-width: 40px;
}

.audio-slider {
    width: 300px;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #0a1929 0%, #132f4c 100%);
    border: 2px solid #00ffff;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ffff, #00aaff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.audio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(0, 255, 255, 1);
}

.audio-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ffff, #00aaff);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.audio-test-button {
    margin-top: 20px;
    padding: 12px 30px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    background: linear-gradient(135deg, #1a2332, #0f1419);
    border: 2px solid #00ffff;
    border-radius: 8px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.audio-test-button:hover {
    background: linear-gradient(135deg, #00ffff, #0088cc);
    color: #0a0e1a;
    transform: scale(1.05);
}

.audio-test-button:active {
    transform: scale(0.95);
}

.audio-settings-close {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: #ff3366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.audio-settings-close:hover {
    background: #ff6699;
    transform: scale(1.1);
}

/* Audio Track Selection in Audio Settings */
.audio-track-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.audio-track-button {
    padding: 12px 20px;
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    background: linear-gradient(135deg, #1a2332, #0f1419);
    border: 2px solid #444;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.audio-track-button:hover {
    border-color: #00ffff;
    color: #00ffff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.audio-track-button.active {
    background: linear-gradient(135deg, #00ffff20, #0088cc20);
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.audio-now-playing {
    margin-top: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #0a1020 0%, #1a2540 100%);
    border: 1px solid #333;
    border-radius: 10px;
    font-size: 14px;
    color: #888;
}

.audio-now-playing span {
    color: #00ffcc;
    font-weight: bold;
}

.pause-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.9);
    z-index: 450;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.pause-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #00ffff;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.pause-stats {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 40px;
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.pause-xp-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.pause-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00aaff);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.chest-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 460;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.chest-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #ffaa00;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 170, 0, 0.8);
    text-align: center;
}

.chest-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.character-selection {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1600px;
}

.character-option {
    background: linear-gradient(180deg, rgba(15, 10, 25, 0.95) 0%, rgba(30, 20, 40, 0.9) 100%);
    border: 3px solid #3a2a4a;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    width: 330px;
    min-height: 250px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 2.4em;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.character-option:hover {
    border-color: #6a4a8a;
    box-shadow: 0 6px 30px rgba(100, 50, 150, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.character-option.selected {
    border-color: #00ffcc;
    background: linear-gradient(180deg, rgba(0, 50, 50, 0.9) 0%, rgba(0, 30, 40, 0.95) 100%);
    box-shadow: 0 0 25px rgba(0, 255, 200, 0.4), 0 0 50px rgba(0, 255, 200, 0.2), inset 0 0 20px rgba(0, 255, 200, 0.1);
    transform: scale(1.05);
}

.power-card.cursed {
    border-color: #ff3333;
    background: linear-gradient(145deg, #2a1515, #190f0f);
}
.power-card.cursed .card-title { color: #ff3333; }
.power-card.cursed .card-stats { color: #ff8888; }

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.95), rgba(50, 30, 70, 0.95));
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px 25px;
    z-index: 2000;
    animation: achievementSlide 0.5s ease, achievementFade 0.5s 2.5s forwards;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    max-width: 350px;
}

.achievement-popup h3 {
    font-family: 'Orbitron', monospace;
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.achievement-popup .achievement-name {
    font-family: 'Chakra Petch', monospace;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.achievement-popup .achievement-desc {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

@keyframes achievementSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes achievementFade {
    to { opacity: 0; transform: translateX(100%); }
}

/* Evolution Popup */
.evolution-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(50, 0, 100, 0.98), rgba(100, 0, 150, 0.95));
    border: 3px solid #ff00ff;
    border-radius: 15px;
    padding: 40px 60px;
    z-index: 2000;
    text-align: center;
    animation: evolutionPulse 0.5s ease;
    box-shadow: 0 0 60px rgba(255, 0, 255, 0.6), inset 0 0 40px rgba(255, 0, 255, 0.2);
}

.evolution-popup h2 {
    font-family: 'Orbitron', monospace;
    color: #ff00ff;
    font-size: 32px;
    text-shadow: 0 0 20px #ff00ff;
    margin-bottom: 20px;
}

.evolution-popup .weapon-name {
    font-family: 'Chakra Petch', monospace;
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.evolution-popup .weapon-desc {
    color: #dda0ff;
    font-size: 14px;
}

@keyframes evolutionPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Achievements Screen */
.achievements-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.95);
    z-index: 1500;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px;
}

.achievements-screen.visible {
    display: flex;
}

.achievements-screen h2 {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 30px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-width: 1200px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.achievement-entry {
    background: linear-gradient(135deg, rgba(30, 25, 40, 0.9), rgba(20, 15, 30, 0.95));
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.achievement-entry.unlocked {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.achievement-entry .name {
    font-family: 'Orbitron', monospace;
    color: #fff;
    font-size: 16px;
    margin-bottom: 5px;
}

.achievement-entry .desc {
    color: #888;
    font-size: 12px;
}

.achievement-entry.unlocked .desc {
    color: #aaa;
}

/* Bestiary Screen */
.bestiary-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.95);
    z-index: 1500;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px;
}

.bestiary-screen.visible {
    display: flex;
}

.bestiary-screen h2 {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #ff6644;
    text-shadow: 0 0 20px rgba(255, 100, 68, 0.5);
    margin-bottom: 30px;
}

.bestiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.bestiary-entry {
    background: linear-gradient(135deg, rgba(40, 20, 20, 0.9), rgba(30, 15, 15, 0.95));
    border: 2px solid #662222;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.bestiary-entry:hover {
    border-color: #ff6644;
    box-shadow: 0 0 15px rgba(255, 100, 68, 0.3);
}

.bestiary-entry .enemy-name {
    font-family: 'Orbitron', monospace;
    color: #ff6644;
    font-size: 14px;
    margin-bottom: 8px;
}

.bestiary-entry .kill-count {
    color: #888;
    font-size: 12px;
}

/* Daily Challenge Banner */
.daily-challenge-banner {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(255, 100, 0, 0.9), rgba(255, 50, 0, 0.9));
    border: 2px solid #ff8800;
    border-radius: 8px;
    padding: 10px 30px;
    z-index: 500;
    font-family: 'Orbitron', monospace;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    animation: bannerGlow 2s ease-in-out infinite;
    display: none;
}

.daily-challenge-banner.visible {
    display: block;
}

@keyframes bannerGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 100, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 100, 0, 0.8); }
}

/* Run Stats */
.run-stats-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(20, 15, 30, 0.98), rgba(30, 20, 45, 0.95));
    border: 3px solid #6644aa;
    border-radius: 15px;
    padding: 30px 50px;
    z-index: 1800;
    min-width: 400px;
    display: none;
}

.run-stats-container.visible {
    display: block;
}

.run-stats-container h2 {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    color: #aa88ff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(170, 136, 255, 0.5);
}

.run-stats-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item .label {
    color: #888;
    font-size: 14px;
}

.stat-item .value {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
}

/* Boss Rush Mode Button */
.boss-rush-btn {
    background: linear-gradient(145deg, #ff3300, #aa0000);
    border: 2px solid #ff6633;
    color: #fff;
    font-family: 'Orbitron', monospace;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin: 10px;
}

.boss-rush-btn:hover {
    background: linear-gradient(145deg, #ff5500, #cc0000);
    box-shadow: 0 0 30px rgba(255, 50, 0, 0.6);
    transform: scale(1.05);
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.menu-btn {
    background: linear-gradient(145deg, rgba(40, 30, 60, 0.9), rgba(30, 20, 45, 0.95));
    border: 2px solid #5544aa;
    color: #ddd;
    font-family: 'Chakra Petch', monospace;
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    border-color: #8866ff;
    background: linear-gradient(145deg, rgba(60, 40, 90, 0.9), rgba(40, 30, 60, 0.95));
    box-shadow: 0 0 20px rgba(100, 80, 180, 0.4);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 50, 50, 0.3);
    border: 2px solid #ff5555;
    color: #ff5555;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 50, 50, 0.5);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.5);
}

/* Elite Enemy Indicator */
.elite-indicator {
    position: absolute;
    color: #ff00ff;
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    text-shadow: 0 0 5px #ff00ff;
}

/* Prestige Display */
.prestige-display {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 180, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 8px 15px;
    z-index: 100;
    font-family: 'Orbitron', monospace;
    color: #ffd700;
    font-size: 14px;
    display: none;
}

.prestige-display.visible {
    display: block;
}

/* Cursed Chest Warning */
.cursed-chest-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(80, 0, 0, 0.95), rgba(50, 0, 0, 0.9));
    border: 3px solid #ff3333;
    border-radius: 10px;
    padding: 20px 40px;
    z-index: 2000;
    font-family: 'Orbitron', monospace;
    color: #ff3333;
    font-size: 24px;
    text-shadow: 0 0 20px rgba(255, 50, 50, 0.8);
    animation: pulseWarning 0.5s ease-in-out infinite;
}

@keyframes pulseWarning {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Cursed Chest Selection Screen */
.cursed-chest-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 0, 0, 0.95);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.cursed-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    color: #ff3333;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 50, 50, 0.8);
    animation: pulseText 2s ease-in-out infinite;
}

.cursed-subtitle {
    font-family: 'Chakra Petch', monospace;
    font-size: 18px;
    color: #aa6666;
    margin-bottom: 40px;
}

.cursed-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.skip-cursed {
    margin-top: 30px;
    background: linear-gradient(145deg, #333, #222);
    border: 2px solid #666;
}

.skip-cursed:hover {
    border-color: #888;
    background: linear-gradient(145deg, #444, #333);
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Character Unlock Popup */
.character-unlock-popup {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(0, 100, 50, 0.95), rgba(0, 70, 35, 0.95));
    border: 3px solid #00ff88;
    border-radius: 15px;
    padding: 20px 40px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
}

.character-unlock-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.unlock-icon {
    font-size: 48px;
}

.unlock-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #88ffaa;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.unlock-name {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* Enemy behavior indicators */
.charging-indicator {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #ff4400;
    animation: chargeGlow 0.3s ease-in-out infinite;
}

@keyframes chargeGlow {
    0%, 100% { box-shadow: 0 0 10px #ff4400; }
    50% { box-shadow: 0 0 30px #ff4400; }
}

.shield-effect {
    position: absolute;
    width: 150%;
    height: 150%;
    border-radius: 50%;
    border: 4px solid #4488ff;
    background: rgba(68, 136, 255, 0.2);
    animation: shieldPulse 1s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ============================================ */
/* Story Map Screen - Candy Crush Style */
/* ============================================ */

.story-map-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0e1a 0%, #1a1f2e 50%, #0f1419 100%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.story-map-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 100, 0.3);
    border: 2px solid #ff0066;
    border-radius: 50%;
    color: #ff0066;
    font-size: 24px;
    cursor: pointer;
    z-index: 310;
    transition: all 0.3s ease;
}

.story-map-close:hover {
    background: rgba(255, 0, 100, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 102, 0.6);
}

.story-map-title {
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    margin-top: 20px;
    margin-bottom: 5px;
    letter-spacing: 3px;
}

.story-map-stats {
    font-family: 'Chakra Petch', monospace;
    font-size: 18px;
    color: #ffaa00;
    margin-bottom: 15px;
}

.story-map-container {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #00ffff #1a1f2e;
}

.story-map-container::-webkit-scrollbar {
    width: 10px;
}

.story-map-container::-webkit-scrollbar-track {
    background: #1a1f2e;
}

.story-map-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffff, #0088cc);
    border-radius: 5px;
}

.story-map-path {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 100px;
}

/* Zone Container - wraps entire zone with background */
.story-zone-container {
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    margin: 20px 0;
    padding: 20px 10px 30px;
    overflow: hidden;
}

.story-zone-container .story-zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(10, 14, 26, 0.6) 0%, 
        rgba(10, 14, 26, 0.4) 30%,
        rgba(10, 14, 26, 0.4) 70%,
        rgba(10, 14, 26, 0.6) 100%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.story-zone-levels {
    position: relative;
    z-index: 2;
}

/* Zone Dividers */
.story-zone-divider {
    width: 100%;
    text-align: center;
    padding: 15px 0 20px;
    position: relative;
    z-index: 3;
}

.story-zone-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--zone-color, #888), transparent);
    z-index: 2;
}

.story-zone-name {
    display: inline-block;
    background: rgba(10, 14, 26, 0.9);
    padding: 10px 30px;
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    color: var(--zone-color, #888);
    text-shadow: 0 0 15px var(--zone-color, #888), 0 0 30px var(--zone-color, #888);
    border: 2px solid var(--zone-color, #888);
    border-radius: 20px;
    position: relative;
    z-index: 5;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px var(--zone-color, #888);
}

/* Level Row */
.story-level-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    position: relative;
    min-height: 70px;
    z-index: 2;
}

.story-level-row.left {
    justify-content: flex-start;
    padding-left: 20px;
}

.story-level-row.right {
    justify-content: flex-end;
    padding-right: 20px;
}

.story-level-row.center {
    justify-content: center;
}

/* Level Node (Button) */
.story-level-node {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
    border: 4px solid;
}

/* Unlocked Levels */
.story-level-node.unlocked {
    background: linear-gradient(135deg, #00cc88 0%, #00aa66 100%);
    border-color: #00ffaa;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.story-level-node.unlocked:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.8), 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Current Level (Next to play) */
.story-level-node.current {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    border-color: #ffcc00;
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 200, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: currentLevelPulse 1.5s ease-in-out infinite;
}

.story-level-node.current::after {
    content: '▶';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #ffcc00;
    animation: bounceArrow 1s ease-in-out infinite;
}

@keyframes currentLevelPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes bounceArrow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* Locked Levels */
.story-level-node.locked {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    border-color: #555;
    color: #666;
    cursor: not-allowed;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.story-level-node.locked::before {
    content: '🔒';
    position: absolute;
    font-size: 16px;
}

.story-level-node.locked span {
    display: none;
}

/* Boss Levels (every 10th) */
.story-level-node.boss {
    width: 75px;
    height: 75px;
    font-size: 20px;
}

.story-level-node.boss.unlocked {
    background: linear-gradient(135deg, #ff4466 0%, #cc2244 100%);
    border-color: #ff6688;
    box-shadow: 0 0 20px rgba(255, 100, 100, 0.6), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.story-level-node.boss.unlocked::before {
    content: '💀';
    position: absolute;
    top: -20px;
    font-size: 18px;
}

.story-level-node.boss.current {
    background: linear-gradient(135deg, #ff6600 0%, #cc4400 100%);
    border-color: #ff8833;
}

/* Completed Levels - Stars */
.story-level-node.completed::after {
    content: '⭐';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
}

/* Path Lines */
.story-path-line {
    position: absolute;
    background: linear-gradient(90deg, #334, #445);
    z-index: 1;
}

.story-path-line.vertical {
    width: 6px;
    height: 60px;
    left: 50%;
    transform: translateX(-50%);
}

.story-path-line.horizontal {
    height: 6px;
    width: 100px;
}

.story-path-line.active {
    background: linear-gradient(90deg, #00aa88, #00cc99);
    box-shadow: 0 0 10px rgba(0, 200, 150, 0.5);
}

/* SVG Path for curvy lines */
.story-path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.story-path-svg path {
    fill: none;
    stroke: #334;
    stroke-width: 6;
    stroke-linecap: round;
}

.story-path-svg path.active {
    stroke: #00aa88;
    filter: drop-shadow(0 0 5px rgba(0, 200, 150, 0.5));
}

/* Zone-specific colors */
.zone-forest { --zone-color: #00ff88; }
.zone-ice { --zone-color: #66ccff; }
.zone-volcano { --zone-color: #ff6633; }
.zone-demon { --zone-color: #aa44ff; }
.zone-angel { --zone-color: #ffdd44; }
.zone-void { --zone-color: #ff00ff; }
.zone-crystal { --zone-color: #00ffff; }
.zone-ancient { --zone-color: #ffaa00; }
.zone-shadow { --zone-color: #8844aa; }
.zone-divine { --zone-color: #ffffff; }

/* Decorations */
.story-map-decoration {
    position: absolute;
    opacity: 0.3;
    pointer-events: none;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .story-map-title {
        font-size: 28px;
    }
    
    .story-level-node {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
    
    .story-level-node.boss {
        width: 60px;
        height: 60px;
        font-size: 16px;
    }
    
    .story-zone-name {
        font-size: 16px;
        padding: 6px 15px;
    }
}

/* ============================================ */
/* Objective HUD - Story Mode */
/* ============================================ */

.objective-hud {
    position: fixed;
    top: 10px;
    right: 70px;
    background: rgba(10, 14, 26, 0.9);
    border: 2px solid #ffaa00;
    border-radius: 12px;
    padding: 12px 16px;
    z-index: 100;
    min-width: 180px;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.3);
}

.objective-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #ffaa00;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    letter-spacing: 2px;
}

.objective-item {
    margin: 8px 0;
    font-family: 'Chakra Petch', monospace;
    font-size: 13px;
    color: #e0e6ff;
}

.objective-icon {
    margin-right: 6px;
    font-size: 14px;
}

.objective-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.objective-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.objective-bar.boss-bar {
    border-color: #ff6666;
}

.objective-bar-fill.boss-fill {
    background: linear-gradient(90deg, #ff4466, #ff8844);
    box-shadow: 0 0 8px rgba(255, 100, 100, 0.6);
}

/* ============================================ */
/* Daily Challenge HUD - In-Game Progress */
/* ============================================ */

.daily-challenge-hud {
    position: fixed;
    top: 10px;
    left: 320px;
    background: linear-gradient(135deg, rgba(40, 20, 10, 0.95), rgba(60, 30, 15, 0.9));
    border: 2px solid #ff8800;
    border-radius: 12px;
    padding: 7px 16px;
    z-index: 100;
    min-width: 180px;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.4);
    animation: dailyHudPulse 3s ease-in-out infinite;
}

@keyframes dailyHudPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 136, 0, 0.4); }
    50% { box-shadow: 0 0 30px rgba(255, 136, 0, 0.6); }
}

.daily-hud-title {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    color: #ff8800;
    text-align: center;
    margin-bottom: 3px;
    text-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
    letter-spacing: 2px;
}

.daily-hud-name {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #ffe0aa;
    text-align: center;
    margin-bottom: 5px;
    font-weight: bold;
}

.daily-hud-progress {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

#dailyHudExtra {
    color: #ff6644;
    font-size: 12px;
    margin-left: 4px;
}

.daily-hud-bar {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff8800;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.daily-hud-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6600, #ffaa00);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.8);
}

.daily-hud-bar-fill.complete {
    background: linear-gradient(90deg, #00ff88, #44ffaa);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    animation: completeGlow 0.5s ease-in-out infinite alternate;
}

@keyframes completeGlow {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.daily-hud-reward {
    font-family: 'Chakra Petch', monospace;
    font-size: 11px;
    color: #aaaaaa;
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 136, 0, 0.3);
}

.daily-hud-reward .reward-icon {
    margin-right: 4px;
}

.daily-challenge-hud.complete {
    border-color: #00ff88;
    background: linear-gradient(135deg, rgba(10, 40, 20, 0.95), rgba(20, 60, 30, 0.9));
    animation: completeHudPulse 0.8s ease-in-out infinite;
}

@keyframes completeHudPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.8); transform: scale(1.02); }
}

.daily-challenge-hud.complete .daily-hud-title {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
}

.daily-challenge-hud.complete .daily-hud-reward {
    color: #00ff88;
    font-weight: bold;
}

/* ============================================ */
/* Victory Stats Grid */
/* ============================================ */

.victory-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 25px auto;
    padding: 0 20px;
}

.victory-stat {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #00ff88;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.victory-stat-icon {
    font-size: 24px;
}

.victory-stat-label {
    font-family: 'Chakra Petch', monospace;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.victory-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 200, 0.5);
}

@media (max-width: 500px) {
    .objective-hud {
        right: 10px;
        top: auto;
        bottom: 80px;
        min-width: 150px;
    }
    
    .daily-challenge-hud {
        left: 10px;
        top: auto;
        bottom: 80px;
        min-width: 150px;
        padding: 8px 12px;
    }
    
    .daily-hud-title {
        font-size: 10px;
    }
    
    .daily-hud-name {
        font-size: 12px;
    }
    
    .daily-hud-progress {
        font-size: 14px;
    }
    
    .daily-hud-reward {
        font-size: 10px;
    }
    
    .victory-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .victory-stat {
        padding: 10px;
    }
    
    .victory-stat-value {
        font-size: 18px;
    }
}

/* ============================================ */
/* RELIC SYSTEM STYLES */
/* ============================================ */

.relic-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1025 50%, #0f1419 100%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.relic-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 50, 100, 0.2);
    border: 2px solid #ff3366;
    border-radius: 50%;
    color: #ff3366;
    font-size: 24px;
    cursor: pointer;
    z-index: 410;
    transition: all 0.3s ease;
}

.relic-close-btn:hover {
    background: rgba(255, 50, 100, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 50, 100, 0.5);
}

.relic-screen-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(100, 50, 150, 0.3) 0%, transparent 100%);
}

.relic-screen-title {
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    background: linear-gradient(135deg, #ff88ff, #aa44ff, #6644ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(150, 100, 255, 0.5));
    letter-spacing: 4px;
}

.relic-screen-subtitle {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
    color: #aa88cc;
    margin-top: 8px;
}

/* Tabs */
.relic-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(150, 100, 255, 0.3);
}

.relic-tab {
    padding: 12px 30px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    background: rgba(100, 50, 150, 0.2);
    border: 2px solid rgba(150, 100, 255, 0.3);
    border-radius: 25px;
    color: #aa88cc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.relic-tab:hover {
    background: rgba(100, 50, 150, 0.4);
    border-color: rgba(150, 100, 255, 0.6);
}

.relic-tab.active {
    background: linear-gradient(135deg, rgba(150, 100, 255, 0.4), rgba(100, 50, 200, 0.4));
    border-color: #aa66ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(150, 100, 255, 0.4);
}

/* Tab Content */
.relic-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Filter Bar */
.relic-filter-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.relic-filter {
    padding: 8px 16px;
    font-family: 'Chakra Petch', monospace;
    font-size: 12px;
    background: rgba(50, 50, 50, 0.5);
    border: 1px solid #444;
    border-radius: 15px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.relic-filter:hover {
    background: rgba(80, 80, 80, 0.5);
}

.relic-filter.active {
    background: rgba(100, 100, 100, 0.5);
    border-color: #888;
    color: #fff;
}

.relic-filter[data-filter="common"] { border-color: #888; }
.relic-filter[data-filter="uncommon"] { border-color: #44dd44; }
.relic-filter[data-filter="epic"] { border-color: #aa44ff; }
.relic-filter[data-filter="legendary"] { border-color: #ff8800; }
.relic-filter[data-filter="mythic"] { border-color: #ff4444; }

.relic-filter[data-filter="common"].active { background: rgba(136, 136, 136, 0.3); color: #aaa; }
.relic-filter[data-filter="uncommon"].active { background: rgba(68, 221, 68, 0.2); color: #44dd44; }
.relic-filter[data-filter="epic"].active { background: rgba(170, 68, 255, 0.2); color: #aa44ff; }
.relic-filter[data-filter="legendary"].active { background: rgba(255, 136, 0, 0.2); color: #ff8800; }
.relic-filter[data-filter="mythic"].active { background: rgba(255, 68, 68, 0.2); color: #ff4444; }

.relic-inventory-stats {
    text-align: center;
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.relic-inventory-stats span {
    margin: 0 15px;
}

/* Relic Grid */
.relic-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

/* Relic Card */
.relic-card {
    position: relative;
    background: linear-gradient(135deg, var(--relic-bg, #2a2a2a), rgba(0, 0, 0, 0.5));
    border: 3px solid var(--relic-color, #888);
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.relic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, var(--relic-color, #888), transparent);
    opacity: 0.1;
    pointer-events: none;
}

.relic-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--relic-color, #888);
}

.relic-card.selected {
    box-shadow: 0 0 30px var(--relic-color, #888), inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.relic-card.equipped::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.relic-icon {
    font-size: 36px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 8px var(--relic-color, #888));
}

.relic-name {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--relic-color, #888);
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--relic-color, #888);
}

.relic-rarity {
    font-family: 'Chakra Petch', monospace;
    font-size: 10px;
    color: var(--relic-color, #888);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.relic-effect {
    font-family: 'Chakra Petch', monospace;
    font-size: 10px;
    color: #aaa;
    margin-top: 8px;
}

.relic-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: #fff;
}

/* Rarity Colors */
.relic-card.common { --relic-color: #888888; --relic-bg: #2a2a2a; }
.relic-card.uncommon { --relic-color: #44dd44; --relic-bg: #1a3a1a; }
.relic-card.epic { --relic-color: #aa44ff; --relic-bg: #2a1a3a; }
.relic-card.legendary { --relic-color: #ff8800; --relic-bg: #3a2a1a; }
.relic-card.mythic { 
    --relic-color: #ff4444; 
    --relic-bg: #3a1a1a; 
    animation: mythicGlow 2s ease-in-out infinite;
}

@keyframes mythicGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 68, 68, 0.8), 0 0 50px rgba(255, 68, 68, 0.4); }
}

/* Combine Tab */
.combine-info {
    text-align: center;
    margin-bottom: 25px;
}

.combine-recipe {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #888;
    margin: 8px 0;
}

.combine-rarity {
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.combine-rarity.common { background: rgba(136, 136, 136, 0.3); color: #aaa; }
.combine-rarity.uncommon { background: rgba(68, 221, 68, 0.3); color: #44dd44; }
.combine-rarity.epic { background: rgba(170, 68, 255, 0.3); color: #aa44ff; }
.combine-rarity.legendary { background: rgba(255, 136, 0, 0.3); color: #ff8800; }
.combine-rarity.mythic { background: rgba(255, 68, 68, 0.3); color: #ff4444; }

.combine-slots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.combine-slot {
    width: 120px;
    height: 140px;
    background: rgba(50, 50, 50, 0.5);
    border: 3px dashed #555;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.combine-slot:hover {
    border-color: #888;
    background: rgba(80, 80, 80, 0.5);
}

.combine-slot.active {
    border-style: solid;
    border-color: #aa66ff;
    box-shadow: 0 0 20px rgba(150, 100, 255, 0.3);
}

.combine-slot.filled {
    border-style: solid;
}

.combine-slot-label {
    font-family: 'Chakra Petch', monospace;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.combine-slot-content {
    font-family: 'Chakra Petch', monospace;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.combine-plus, .combine-equals {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #555;
}

.combine-result {
    width: 120px;
    height: 140px;
    background: linear-gradient(135deg, rgba(100, 50, 150, 0.2), rgba(50, 25, 75, 0.2));
    border: 3px solid #aa66ff;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.combine-button {
    display: block;
    margin: 0 auto 25px;
    padding: 15px 40px;
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    background: linear-gradient(135deg, #aa44ff, #6644ff);
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.combine-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(150, 100, 255, 0.6);
}

.combine-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.combine-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

/* Equipped Tab */
.equipped-info {
    text-align: center;
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
}

.equipped-slots {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.equipped-slot {
    width: 100px;
    height: 120px;
    background: rgba(50, 50, 50, 0.3);
    border: 3px solid #444;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.equipped-slot:hover {
    border-color: #666;
    background: rgba(80, 80, 80, 0.3);
}

.equipped-slot.filled {
    border-color: var(--relic-color, #888);
    background: linear-gradient(135deg, var(--relic-bg, #2a2a2a), rgba(0, 0, 0, 0.5));
}

.equipped-slot .relic-icon {
    font-size: 30px;
}

.equipped-slot .relic-name {
    font-size: 9px;
}

.equipped-total-bonus {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 15px;
    padding: 20px;
}

.equipped-bonus-title {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: #aa66ff;
    text-align: center;
    margin-bottom: 15px;
}

.equipped-bonus-item {
    font-family: 'Chakra Petch', monospace;
    font-size: 13px;
    color: #aaa;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.equipped-bonus-item:last-child {
    border-bottom: none;
}

.equipped-bonus-value {
    color: #00ff88;
    float: right;
}

/* Relic Drop Notification */
.relic-drop-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    animation: relicDropAppear 0.5s ease-out;
}

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

.relic-drop-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--drop-color, #888) 0%, transparent 70%);
    opacity: 0.3;
    animation: relicGlowPulse 1s ease-in-out infinite;
}

@keyframes relicGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.relic-drop-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 15, 30, 0.95), rgba(10, 8, 15, 0.95));
    border: 4px solid var(--drop-color, #888);
    border-radius: 20px;
    padding: 30px 50px;
    text-align: center;
    box-shadow: 0 0 50px var(--drop-color, #888);
}

.relic-drop-title {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 20px var(--drop-color, #888);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.relic-drop-icon {
    font-size: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 15px var(--drop-color, #888));
    animation: relicIconBounce 0.5s ease-in-out infinite;
}

@keyframes relicIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.relic-drop-name {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    color: var(--drop-color, #888);
    text-shadow: 0 0 10px var(--drop-color, #888);
    margin-bottom: 8px;
}

.relic-drop-rarity {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: var(--drop-color, #888);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.relic-drop-notification.common { --drop-color: #888888; }
.relic-drop-notification.uncommon { --drop-color: #44dd44; }
.relic-drop-notification.epic { --drop-color: #aa44ff; }
.relic-drop-notification.legendary { --drop-color: #ff8800; }
.relic-drop-notification.mythic { --drop-color: #ff4444; }

/* Empty State */
.relic-empty-state {
    text-align: center;
    padding: 50px;
    color: #666;
}

.relic-empty-state .empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.relic-empty-state .empty-text {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
}

/* Mobile */
@media (max-width: 600px) {
    .relic-screen-title {
        font-size: 28px;
    }
    
    .relic-tabs {
        flex-wrap: wrap;
    }
    
    .relic-tab {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .relic-inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    
    .relic-card {
        padding: 10px 5px;
    }
    
    .relic-icon {
        font-size: 28px;
    }
    
    .relic-name {
        font-size: 10px;
    }
    
    .combine-slot, .combine-result {
        width: 90px;
        height: 110px;
    }
    
    .combine-plus, .combine-equals {
        font-size: 24px;
    }
    
    .equipped-slot {
        width: 70px;
        height: 90px;
    }
}

/* ============================================
   LEADERBOARD SCREEN
   ============================================ */

.leaderboard-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    z-index: 1500;
    overflow-y: auto;
}

.leaderboard-title {
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    margin-bottom: 10px;
}

.leaderboard-subtitle {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.leaderboard-list {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 20px;
    gap: 15px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    transform: translateX(5px);
    border-color: #00ffff;
}

.leaderboard-entry.top-1 {
    border-color: #ffd700;
    background: linear-gradient(135deg, #3a2e00 0%, #1a1a00 100%);
}

.leaderboard-entry.top-2 {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.leaderboard-entry.top-3 {
    border-color: #cd7f32;
    background: linear-gradient(135deg, #2a1a00 0%, #1a1000 100%);
}

.leaderboard-rank {
    font-size: 28px;
    min-width: 50px;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-character {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: #00ffff;
}

.leaderboard-date {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.leaderboard-stats {
    display: flex;
    gap: 15px;
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
}

.leaderboard-time {
    color: #ffaa00;
}

.leaderboard-kills {
    color: #ff6666;
}

.leaderboard-level {
    color: #66ff66;
}

.leaderboard-empty {
    text-align: center;
    color: #666;
    font-size: 18px;
    padding: 40px;
}

/* ============================================
   RELIC FILTER SCREEN
   ============================================ */

.relic-filter-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 1500;
}

.relic-filter-title {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    margin-bottom: 10px;
}

.relic-filter-subtitle {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.relic-filter-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.relic-filter-option {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.relic-filter-option:hover {
    transform: scale(1.02);
    border-color: #555;
}

.relic-filter-option.common { border-color: #888888; }
.relic-filter-option.uncommon { border-color: #44dd44; }
.relic-filter-option.epic { border-color: #aa44ff; }
.relic-filter-option.legendary { border-color: #ff8800; }
.relic-filter-option.mythic { border-color: #ff4444; }

.relic-filter-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #555;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #00ff00;
    background: #111;
}

.relic-filter-checkbox.checked {
    background: linear-gradient(135deg, #003300 0%, #001a00 100%);
    border-color: #00ff00;
}

.relic-filter-label {
    flex: 1;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
}

.relic-filter-status {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #888;
}

.relic-filter-info {
    margin-top: 30px;
    font-size: 14px;
    color: #666;
    text-align: center;
    max-width: 400px;
}

/* ============================================
   WEEKLY RAID BOSS SCREEN
   ============================================ */

.raid-boss-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a0a 50%, #0a0a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 1500;
}

.raid-boss-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.raid-boss-week {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: #ff6666;
    letter-spacing: 3px;
}

.raid-boss-status {
    font-family: 'Chakra Petch', monospace;
    font-size: 14px;
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #00ff00;
}

.raid-boss-icon {
    font-size: 100px;
    margin-bottom: 10px;
    animation: raidBossPulse 2s ease-in-out infinite;
}

@keyframes raidBossPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.5)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.8)); }
}

.raid-boss-name {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    margin-bottom: 30px;
    letter-spacing: 4px;
}

.raid-boss-health-container {
    width: 100%;
    max-width: 500px;
    height: 30px;
    background: #111;
    border: 2px solid #ff4444;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.raid-boss-health-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444, #ff6666);
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.raid-boss-health-text {
    font-family: 'Chakra Petch', monospace;
    font-size: 18px;
    color: #ff6666;
    margin-bottom: 20px;
}

.raid-boss-your-damage {
    font-family: 'Chakra Petch', monospace;
    font-size: 16px;
    color: #ffaa00;
    margin-bottom: 30px;
}

.raid-boss-info {
    font-size: 14px;
    color: #666;
    text-align: center;
    max-width: 400px;
    margin-bottom: 30px;
}

.raid-boss-fight-btn {
    background: linear-gradient(135deg, #8b0000 0%, #4a0000 100%);
    border: 2px solid #ff4444;
    font-size: 20px;
    padding: 15px 40px;
    animation: fightBtnGlow 1.5s ease-in-out infinite;
}

.raid-boss-fight-btn:hover {
    background: linear-gradient(135deg, #aa0000 0%, #5a0000 100%);
    transform: scale(1.05);
}

@keyframes fightBtnGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
}

/* ============================================
   ELITE MUTATION INDICATORS
   ============================================ */

.mutation-indicator {
    position: absolute;
    font-size: 12px;
    pointer-events: none;
}

/* ============================================
   RELIC SET BONUSES DISPLAY
   ============================================ */

.relic-sets-display {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #333;
    border-radius: 8px;
}

.relic-set-active {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    border-radius: 6px;
}

.relic-set-icon {
    font-size: 24px;
}

.relic-set-info {
    flex: 1;
}

.relic-set-name {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #00ffff;
}

.relic-set-bonus {
    font-size: 12px;
    color: #88ff88;
}

/* ============================================
   RUN HISTORY SCREEN
   ============================================ */

.run-history-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    z-index: 2000;
    overflow-y: auto;
}

.run-history-title {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #00ffcc;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
    margin-bottom: 10px;
}

.run-history-subtitle {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.run-history-list {
    width: 100%;
    max-width: 800px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.run-history-entry {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.run-history-entry:hover {
    border-color: #00ffcc;
    transform: translateX(5px);
}

.run-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.run-number {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: #666;
}

.run-character {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: #00ffcc;
}

.run-mode {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.run-date {
    font-size: 12px;
    color: #666;
}

.run-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.run-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    color: #ffffff;
}

.run-history-actions {
    margin-top: 20px;
}

.no-history {
    text-align: center;
    color: #666;
    font-size: 18px;
    padding: 40px;
}

/* ============================================
   EVENT NOTIFICATION
   ============================================ */

.event-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(30, 10, 10, 0.95) 0%, rgba(60, 10, 10, 0.95) 100%);
    border: 3px solid #ff4444;
    border-radius: 15px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 0 40px rgba(255, 68, 68, 0.5);
}

.event-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.event-icon {
    font-size: 48px;
    animation: eventIconPulse 0.5s ease infinite;
}

@keyframes eventIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.event-text {
    text-align: left;
}

.event-name {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 15px currentColor;
    animation: eventTextGlow 0.5s ease infinite;
}

@keyframes eventTextGlow {
    0%, 100% { text-shadow: 0 0 15px currentColor; }
    50% { text-shadow: 0 0 30px currentColor, 0 0 50px currentColor; }
}

.event-desc {
    font-size: 14px;
    color: #cccccc;
    margin-top: 5px;
}

/* Event active indicator (shown in HUD) */
.event-active-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 68, 68, 0.9);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    z-index: 150;
    animation: eventIndicatorPulse 1s ease infinite;
}

@keyframes eventIndicatorPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 68, 68, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 68, 68, 0.8); }
}

/* Credits Screen - Professional Scrolling */
.credits-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(15, 20, 35, 0.99) 0%, rgba(5, 5, 15, 1) 100%);
    z-index: 1500;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

.credits-container {
    width: 100%;
    height: 80%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.credits-scroll {
    text-align: center;
    animation: creditsScroll 60s linear infinite;
    position: relative;
    top: 100%;
}

.credits-scroll:hover {
    animation-play-state: paused;
}

@keyframes creditsScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-100% - 100vh)); }
}

.credits-game-title {
    font-family: 'Orbitron', monospace;
    font-size: 64px;
    color: #ffd700;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(255, 215, 0, 0.4), 0 4px 20px rgba(0, 0, 0, 0.8);
    letter-spacing: 8px;
    margin-bottom: 20px;
}

.credits-section {
    margin: 40px 0;
}

.credits-role {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.credits-name-large {
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    color: #00ffcc;
    text-shadow: 0 0 30px rgba(0, 255, 204, 0.6), 0 0 60px rgba(0, 255, 204, 0.3);
    letter-spacing: 3px;
}

.credits-person {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.credits-tool {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    color: #66ccff;
    text-shadow: 0 0 15px rgba(102, 204, 255, 0.4);
    margin-top: 8px;
}

.credits-tool-desc {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
    letter-spacing: 1px;
}

.credits-tech {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: #ff9966;
    margin: 8px 0;
}

.credits-thanks {
    font-size: 20px;
    color: #c8b8d8;
    margin: 10px 0;
}

.credits-quote {
    font-size: 18px;
    font-style: italic;
    color: #aaa;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.credits-copyright {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.credits-thankyou {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.3);
    letter-spacing: 4px;
    animation: thankYouPulse 2s ease-in-out infinite;
}

@keyframes thankYouPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.credits-divider-line {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    margin: 0 auto;
}

.credits-spacer {
    height: 60px;
}

.credits-spacer-small {
    height: 30px;
}

.credits-spacer-large {
    height: 120px;
}

.credits-skip-hint {
    position: absolute;
    bottom: 20px;
    font-size: 14px;
    color: #555;
    letter-spacing: 1px;
}
