:root { --bg: #050505; --text: #d4d4d4; --primary: #ffcc00; --btn-off: #151515; }
.white-mode { --bg: #f5f5f5; --text: #111; --primary: #007bff; --btn-off: #ddd; }

* {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    transition: 0.5s;
}

#vignette {
    position: fixed; inset: 0; pointer-events: none; z-index: 500;
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.8) 150%);
}

.overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.menu-card {
    background: #111;
    padding: 40px;
    border-radius: 2px;
    text-align: center;
    border: 1px solid var(--primary);
    box-shadow: 0 0 50px rgba(255, 204, 0, 0.2);
}
.menu-btn {
    background: #222;
    color: var(--text);
    border: 1px solid var(--primary);
    padding: 12px 24px;
    margin: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}
.menu-btn.primary { background: var(--primary); color: black; font-weight: bold; }
.menu-btn.danger { border-color: #ff4444; color: #ff4444; }

.game-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    gap: 12px;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0.8;
}
.top-bar button {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
}

.boss-info {
    background: rgba(0,0,0,0.6);
    border: 1px solid #444;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}
.boss-hp-container {
    width: 100%;
    height: 16px;
    background: #2a2a2a;
    border-radius: 10px;
    margin: 8px 0;
    overflow: hidden;
}
#bossHpFill {
    width: 100%;
    height: 100%;
    background: #ff4444;
    transition: width 0.2s ease;
}
.boss-passive {
    font-size: 0.8rem;
    color: #ffaa88;
    margin-top: 6px;
    font-style: italic;
}

.skin-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 5px 0;
}
.skin-tab {
    background: var(--btn-off);
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s;
    opacity: 0.6;
    font-size: 0.9rem;
    text-align: center;
}
.skin-tab.active {
    opacity: 1;
    border-color: var(--primary);
    background: var(--primary);
    color: black;
    transform: scale(1.05);
}
.skin-tab.locked {
    filter: grayscale(1) brightness(0.5);
    cursor: not-allowed;
}

.play-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}
#clickButton {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: none;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #1a1a1a;
    color: #00a8ff;
    border: 1px solid #00a8ff;
    position: relative;
    z-index: 5;
}
#clickButton.skin-1 { background: #1a1a1a; border-color: #00a8ff; box-shadow: 0 0 20px #00a8ff; }
#clickButton.skin-2 { background: #ffcc00; color: #000; border-color: #ffcc00; box-shadow: 0 0 30px #ffcc00; }
#clickButton.skin-3 { background: #2a0a3a; border-color: #bb88ff; color: #ddbbff; box-shadow: 0 0 40px #bb88ff; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 20px #bb88ff; }
    50% { box-shadow: 0 0 60px #bb88ff; }
    100% { box-shadow: 0 0 20px #bb88ff; }
}

#iceShield {
    position: absolute;
    inset: -15px;
    background: rgba(100, 200, 255, 0.2);
    border: 2px solid #74b9ff;
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    color: #bbffff;
    font-weight: bold;
    pointer-events: none;
}

.shop-bar {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
}
.shop-bar button {
    flex: 1;
    padding: 14px;
    border-radius: 24px;
    background: var(--btn-off);
    color: var(--text);
    border: 1px solid #444;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}
.shop-bar button.affordable {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    color: var(--primary);
}

.floating-num {
    position: absolute;
    pointer-events: none;
    animation: floatUp 0.8s forwards;
    font-weight: bold;
    font-family: sans-serif;
    z-index: 2000;
    text-shadow: 0 0 3px black;
}
@keyframes floatUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}

.hidden { display: none !important; }