:root {
    --bg-color: #1A0A14;
    --primary: #E84393;
    --secondary: #FD79A8;
    --accent: #00CEC9;
    --text: #FFFFFF;
    --glass-bg: rgba(232, 67, 147, 0.1);
    --glass-border: rgba(232, 67, 147, 0.3);
    --br: 12px;
    --font: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Screen Shake Class */
.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-4px, 1px, 0); }
    20%, 80% { transform: translate3d(6px, -2px, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, 3px, 0); }
    40%, 60% { transform: translate3d(8px, -3px, 0); }
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, #11050D 0%, #1A0A14 50%, #11050D 100%);
}

#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 5;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--br);
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(5px);
}

.stat-box .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 1px;
}

.stat-box .value {
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(232, 67, 147, 0.5);
}

.gem-box .label { color: var(--accent); }
.gem-box .value { text-shadow: 0 0 10px rgba(0, 206, 201, 0.5); }

/* Screens */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-align: center;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.highlight { color: var(--primary); }
.accent { color: var(--accent); }
.error { color: #FF4757; text-shadow: 0 0 20px rgba(255, 71, 87, 0.5); }

.screen p {
    font-size: 1.2rem;
    color: #A0AABF;
    margin-bottom: 40px;
}

.results {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: var(--font);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 20px rgba(232, 67, 147, 0.3);
    margin-bottom: 15px;
    width: 250px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(232, 67, 147, 0.4);
    background: var(--secondary);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(232, 67, 147, 0.1);
    box-shadow: none;
}

/* Character Select */
.character-select {
    background: rgba(0,0,0,0.3);
    border-radius: var(--br);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.character-select h3 {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.character-list {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.char-item {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.char-item.locked {
    filter: grayscale(100%);
    opacity: 0.2;
    cursor: not-allowed;
}

.char-item.selected {
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.4);
}
