:root {
    --bg-color: #0f0c29;
    --text-color: #e0e0e0;
    --accent-blue: #00f2fe;
    --accent-pink: #e94560;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gold: #ffd700;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f2027, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 1s ease;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app {
    width: 90%;
    max-width: 800px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    transition: all 1s ease;
    position: relative;
    overflow: hidden;
}

header h1 {
    font-size: 2.5rem;
    background: -webkit-linear-gradient(var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.progress-container {
    margin: 1.5rem 0;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
    transition: width 0.3s ease;
}

.level-container {
    margin: 2rem 0;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.instruction {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.prompt-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-blue);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

input[type="text"], textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    outline: none;
    resize: vertical;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.primary-btn, .secondary-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.primary-btn {
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-pink));
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#level-content > * {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Timer */
.timer-container {
    margin: 1rem 0;
}
.timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-blue);
    font-family: monospace;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* Void Mode */
body.void-mode {
    background: #000 !important;
    animation: none;
}
#app.void-mode {
    background: #000;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}
.void-text {
    font-size: 2rem;
    color: #fff;
    opacity: 0;
    animation: fadeSlow 3s forwards;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}
.delay-1 { animation-delay: 3s; }
.delay-2 { animation-delay: 6s; }

@keyframes fadeSlow {
    to { opacity: 1; }
}
.void-input-container {
    opacity: 0;
    animation: fadeSlow 3s forwards;
}

/* Breathing Circle */
.breathing-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-blue), transparent);
    margin: 0 auto;
    opacity: 0.8;
    box-shadow: 0 0 30px var(--accent-blue);
}
@keyframes breathe {
    0% { transform: scale(1); opacity: 0.4; box-shadow: 0 0 10px var(--accent-blue); }
    50% { transform: scale(2.2); opacity: 1; box-shadow: 0 0 60px var(--accent-blue); }
    100% { transform: scale(1); opacity: 0.4; box-shadow: 0 0 10px var(--accent-blue); }
}

/* Gold Mode */
body.gold-mode {
    background: radial-gradient(circle, #2a2000, #000) !important;
    animation: none;
}
#app.gold-mode {
    border-color: var(--gold);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
}
.glow-text {
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold);
}
.signature-field {
    font-family: 'Brush Script MT', cursive;
    font-size: 2.5rem;
    text-align: center;
    border-bottom: 2px solid var(--gold) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--gold) !important;
}

/* RAS Board */
.ras-board {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.ras-target {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}
.ras-target:active {
    transform: scale(0.8);
}

/* Two Cups (Quantum Jump) */
.cups-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    perspective: 1000px;
}
.cup-box {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 1.5rem;
    width: 45%;
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.cup-box h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.glow-border {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 30px var(--accent-blue), inset 0 0 20px var(--accent-blue) !important;
}
.pulse-glow {
    animation: portalPulse 2s infinite ease-in-out;
}

@keyframes portalPulse {
    0% { box-shadow: 0 0 20px var(--accent-blue), inset 0 0 10px var(--accent-blue); }
    50% { box-shadow: 0 0 50px #fff, inset 0 0 30px var(--accent-blue); transform: translateZ(20px); }
    100% { box-shadow: 0 0 20px var(--accent-blue), inset 0 0 10px var(--accent-blue); }
}

@keyframes shatter {
    0% { transform: scale(1); opacity: 1; filter: blur(0); }
    10% { transform: scale(1.1) rotate(-5deg); filter: contrast(200%); }
    20% { transform: scale(0.9) rotate(5deg); }
    100% { transform: scale(1.5) rotate(15deg) translateZ(-500px); opacity: 0; filter: blur(20px); }
}

/* Screen Shake and Flash */
@keyframes screenShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-10px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 10px) rotate(1deg); }
    30% { transform: translate(10px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -10px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-10px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -10px) rotate(1deg); }
    90% { transform: translate(10px, 2px) rotate(0deg); }
    100% { transform: translate(0px, 0px) rotate(0deg); }
}
.shake {
    animation: screenShake 0.5s cubic-bezier(.36,.07,.19,.97) both !important;
}

.flash-white {
    animation: flashWhite 1s ease-out forwards;
}
@keyframes flashWhite {
    0% { background-color: rgba(255,255,255,0.8); box-shadow: 0 0 100px #fff inset; }
    100% { background-color: var(--glass-bg); }
}

/* Guided SATS Text */
.guided-text {
    opacity: 0;
    transition: opacity 2s ease-in-out;
    margin-bottom: 1rem;
}
.guided-text.visible {
    opacity: 1;
}

/* Healing */
.healing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.orbs-source {
    display: flex;
    gap: 1.5rem;
}
.healing-orb {
    font-size: 2.5rem;
    cursor: grab;
    filter: drop-shadow(0 0 10px var(--gold));
    transition: transform 0.2s;
}
.healing-orb:hover {
    transform: scale(1.2);
}
.healing-orb:active {
    cursor: grabbing;
}
.body-outline {
    font-size: 8rem;
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 1s ease;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}
.healed-glow {
    filter: drop-shadow(0 0 50px #00ff00) !important;
    transform: scale(1.1);
}
