* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: url('room.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* ===== LOADING SCREEN STYLES ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 20px;
}

.loading-logo {
    margin-bottom: 30px;
}

.loading-lock {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(198, 40, 40, 0.7));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(198, 40, 40, 1));
    }
}

.loading-title {
    font-size: 3rem;
    color: #c62828;
    text-shadow: 0 0 20px rgba(198, 40, 40, 0.8);
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-weight: bold;
}

.loading-subtitle {
    font-size: 1.2rem;
    color: #999;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.loading-keys {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.loading-key {
    width: 40px;
    height: 40px;
    color: #ffd700;
    animation: bounceKey 1.5s infinite;
}

.loading-key:nth-child(1) { animation-delay: 0s; }
.loading-key:nth-child(2) { animation-delay: 0.2s; }
.loading-key:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceKey {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-text {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
    min-height: 30px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.loading-progress {
    width: 400px;
    max-width: 90%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c62828, #ff5252, #c62828);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease-out;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-percentage {
    font-size: 1rem;
    color: #c62828;
    font-weight: bold;
    font-family: monospace;
}

.loading-hint {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Loading background effects */
.loading-ghost {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(198, 40, 40, 0.2), transparent);
    border-radius: 50%;
    animation: floatGhostLoading 15s infinite;
}

.loading-ghost:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-duration: 20s;
}

.loading-ghost:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-duration: 25s;
    animation-delay: 5s;
}

.loading-ghost:nth-child(3) {
    bottom: 15%;
    left: 15%;
    animation-duration: 30s;
    animation-delay: 10s;
}

@keyframes floatGhostLoading {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    25% { transform: translate(30px, -30px) scale(1.1); opacity: 0.3; }
    50% { transform: translate(-20px, -10px) scale(0.9); opacity: 0.2; }
    75% { transform: translate(10px, -40px) scale(1.05); opacity: 0.3; }
}

/* ===== ORIGINAL GAME STYLES ===== */
#game-container {
    display: none;
}

#game-container.active {
    display: block;
}

@keyframes floatGhost {
    0% { transform: translateY(0) translateX(0); opacity: 0.1; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.2; }
    50% { transform: translateY(-10px) translateX(-10px); opacity: 0.1; }
    75% { transform: translateY(-30px) translateX(5px); opacity: 0.2; }
    100% { transform: translateY(0) translateX(0); opacity: 0.1; }
}

/* ==================== GHOST STYLES ==================== */
.ghost {
position: absolute;
width: 120px;
height: 150px;
z-index: 40;
display: flex;
flex-direction: column;
align-items: center;
filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.ghost-body {
width: 100%;
height: 100px;
background: 
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.95) 0%,
    rgba(230, 230, 250, 0.9) 30%,
    rgba(200, 200, 220, 0.8) 70%,
    transparent 100%);
border-radius: 50% 50% 40% 40%;
position: relative;
animation: ghostFloat 4s ease-in-out infinite;
box-shadow: 
0 0 30px rgba(255, 255, 255, 0.7),
inset 0 -10px 20px rgba(150, 150, 200, 0.3);
}

/* Wavy bottom for ghost effect */
.ghost-body::after {
content: '';
position: absolute;
bottom: -15px;
left: 0;
width: 100%;
height: 30px;
background: 
radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
radial-gradient(circle at 30% 0%, rgba(230, 230, 250, 0.9) 0%, transparent 70%),
radial-gradient(circle at 50% 0%, rgba(200, 200, 220, 0.9) 0%, transparent 70%),
radial-gradient(circle at 70% 0%, rgba(230, 230, 250, 0.9) 0%, transparent 70%),
radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
border-radius: 50% 50% 40% 40%;
animation: ghostWave 3s infinite ease-in-out;
}

/* Ghost eyes */
.ghost-eyes {
position: absolute;
top: 35px;
width: 60px;
height: 30px;
display: flex;
justify-content: space-between;
z-index: 41;
}

.ghost-eyes::before,
.ghost-eyes::after {
content: '';
width: 20px;
height: 25px;
background: 
radial-gradient(circle at 30% 30%, #1a1a2e 0%, #0f3460 70%, #16213e 100%);
border-radius: 50% 50% 40% 40%;
animation: blink 5s infinite;
box-shadow: 
inset 0 0 10px rgba(0, 0, 0, 0.8),
0 0 15px rgba(0, 0, 0, 0.5);
}

/* Ghost mouth */
.ghost::before {
content: '';
position: absolute;
top: 70px;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 15px;
background: 
radial-gradient(ellipse at center, #1a1a2e 0%, #0f3460 60%, transparent 100%);
border-radius: 50% 50% 40% 40%;
z-index: 41;
animation: ghostMouth 6s infinite ease-in-out;
box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.5);
}

/* Ghost glow aura */
.ghost::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 180px;
height: 180px;
background: radial-gradient(circle, 
rgba(255, 255, 255, 0.3) 0%,
rgba(200, 200, 255, 0.2) 30%,
rgba(150, 150, 200, 0.1) 60%,
transparent 80%);
border-radius: 50%;
z-index: 39;
animation: ghostAura 8s infinite alternate;
}

/* Ghost shadow */
.ghost-shadow {
position: absolute;
bottom: -25px;
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 20px;
background: radial-gradient(ellipse at center, 
rgba(0, 0, 0, 0.4) 0%,
rgba(0, 0, 0, 0.2) 50%,
transparent 100%);
border-radius: 50%;
filter: blur(5px);
animation: shadowPulse 4s infinite ease-in-out;
}

/* ==================== INDIVIDUAL GHOST VARIATIONS ==================== */
.ghost1 {
top: 10%;
left: 5%;
}

.ghost1 .ghost-body {
background: 
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.95) 0%,
    rgba(230, 240, 255, 0.9) 30%,
    rgba(200, 220, 240, 0.8) 70%,
    transparent 100%);
animation-duration: 6s;
animation-delay: 0s;
}

.ghost1 .ghost-eyes::before,
.ghost1 .ghost-eyes::after {
background: radial-gradient(circle at 30% 30%, #2c3e50 0%, #34495e 70%, #2c3e50 100%);
}

.ghost2 {
top: 60%;
right: 10%;
}

.ghost2 .ghost-body {
background: 
radial-gradient(circle at 30% 20%, rgba(255, 240, 240, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(255, 240, 240, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(255, 240, 240, 0.95) 0%,
    rgba(240, 220, 220, 0.9) 30%,
    rgba(220, 200, 200, 0.8) 70%,
    transparent 100%);
animation-duration: 5s;
animation-delay: 1s;
}

.ghost2 .ghost-eyes::before,
.ghost2 .ghost-eyes::after {
background: radial-gradient(circle at 30% 30%, #6d214f 0%, #b33771 70%, #6d214f 100%);
}

.ghost3 {
bottom: 20%;
left: 15%;
}

.ghost3 .ghost-body {
background: 
radial-gradient(circle at 30% 20%, rgba(240, 240, 255, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(240, 240, 255, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(240, 240, 255, 0.95) 0%,
    rgba(220, 220, 240, 0.9) 30%,
    rgba(200, 200, 220, 0.8) 70%,
    transparent 100%);
animation-duration: 7s;
animation-delay: 2s;
}

.ghost3 .ghost-eyes::before,
.ghost3 .ghost-eyes::after {
background: radial-gradient(circle at 30% 30%, #0c2461 0%, #1e3799 70%, #0c2461 100%);
}

/* ==================== GHOST ANIMATIONS ==================== */
@keyframes ghostFloat {
0%, 100% { 
transform: translateY(0) rotate(0deg); 
}
25% { 
transform: translateY(-20px) rotate(1deg); 
}
50% { 
transform: translateY(0) rotate(0deg); 
}
75% { 
transform: translateY(-15px) rotate(-1deg); 
}
}

@keyframes ghostWave {
0%, 100% { 
transform: scaleX(1); 
opacity: 0.8;
}
50% { 
transform: scaleX(1.2); 
opacity: 1;
}
}

@keyframes blink {
0%, 90%, 95%, 100% { 
height: 25px; 
transform: scaleY(1);
}
92.5%, 97.5% { 
height: 5px; 
transform: scaleY(0.2);
}
}

@keyframes ghostMouth {
0%, 70%, 100% { 
height: 15px; 
width: 40px;
}
75%, 80% { 
height: 25px; 
width: 50px;
}
85% { 
height: 15px; 
width: 40px;
}
}

@keyframes ghostAura {
0% { 
opacity: 0.3; 
transform: translate(-50%, -50%) scale(0.9);
}
100% { 
opacity: 0.6; 
transform: translate(-50%, -50%) scale(1.1);
}
}

@keyframes shadowPulse {
0%, 100% { 
opacity: 0.4; 
transform: translateX(-50%) scale(1);
}
50% { 
opacity: 0.6; 
transform: translateX(-50%) scale(1.2);
}
}

/* Ghost movement paths */
@keyframes ghostPath1 {
0% { transform: translate(0, 0); }
25% { transform: translate(200px, -100px); }
50% { transform: translate(400px, 50px); }
75% { transform: translate(200px, 150px); }
100% { transform: translate(0, 0); }
}

@keyframes ghostPath2 {
0% { transform: translate(0, 0); }
33% { transform: translate(-300px, 100px); }
66% { transform: translate(-150px, -150px); }
100% { transform: translate(0, 0); }
}

@keyframes ghostPath3 {
0% { transform: translate(0, 0); }
20% { transform: translate(150px, -80px); }
40% { transform: translate(300px, 100px); }
60% { transform: translate(150px, 200px); }
80% { transform: translate(-100px, 150px); }
100% { transform: translate(0, 0); }
}

/* Apply movement paths */
.ghost1 {
animation: ghostPath1 30s infinite linear, ghostFloat 6s infinite ease-in-out;
}

.ghost2 {
animation: ghostPath2 40s infinite linear, ghostFloat 5s infinite ease-in-out 1s;
}

.ghost3 {
animation: ghostPath3 35s infinite linear, ghostFloat 7s infinite ease-in-out 2s;
}

/* ==================== GHOST INTERACTIONS ==================== */
.ghost:hover {
animation-play-state: paused;
filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.8)) brightness(1.2);
}

.ghost.dangerous {
filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.9)) brightness(1.3);
}

.ghost.dangerous .ghost-body {
background: 
radial-gradient(circle at 30% 20%, rgba(255, 200, 200, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(255, 200, 200, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(255, 200, 200, 0.95) 0%,
    rgba(255, 150, 150, 0.9) 30%,
    rgba(255, 100, 100, 0.8) 70%,
    transparent 100%);
}

.ghost.dangerous .ghost-eyes::before,
.ghost.dangerous .ghost-eyes::after {
background: radial-gradient(circle at 30% 30%, #b71540 0%, #eb2f06 70%, #b71540 100%);
}

/* Ghost collision effect */
.ghost.collided {
animation: ghostHit 0.5s ease-out forwards;
}

@keyframes ghostHit {
0% { 
transform: scale(1); 
opacity: 1;
}
50% { 
transform: scale(1.3); 
opacity: 0.7;
}
100% { 
transform: scale(0); 
opacity: 0;
display: none;
}
}

/* ==================== RESPONSIVE GHOSTS ==================== */
@media (max-width: 768px) {
.ghost {
width: 80px;
height: 100px;
}

.ghost-body {
height: 70px;
}

.ghost-eyes {
top: 25px;
width: 40px;
}

.ghost-eyes::before,
.ghost-eyes::after {
width: 15px;
height: 18px;
}

.ghost::before {
top: 50px;
width: 30px;
height: 10px;
}

.ghost::after {
width: 120px;
height: 120px;
}
}

/* ==================== DARK GHOST VARIANT ==================== */
.ghost.dark {
filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8)) brightness(0.7);
}

.ghost.dark .ghost-body {
background: 
radial-gradient(circle at 30% 20%, rgba(100, 100, 150, 0.9) 0%, transparent 15%),
radial-gradient(circle at 70% 20%, rgba(100, 100, 150, 0.9) 0%, transparent 15%),
linear-gradient(to bottom, 
    rgba(50, 50, 80, 0.95) 0%,
    rgba(40, 40, 70, 0.9) 30%,
    rgba(30, 30, 60, 0.8) 70%,
    transparent 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 20px;
    background: rgba(20, 20, 20, 0.85);
    border-radius: 10px;
    border: 1px solid #5a0000;
    box-shadow: 0 0 20px rgba(90, 0, 0, 0.7);
    margin-bottom: 30px;
}

h1 {
    font-size: 2.8rem;
    color: #c62828;
    text-shadow: 0 0 10px #ff0000;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 20px;
}

.screen {
    display: none;
    background: rgba(15, 15, 15, 0.9);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #444;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen.active {
    display: block;
}

.story-text {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-align: justify;
}

.story-text p {
    margin-bottom: 15px;
}

.highlight {
    color: #c62828;
    font-weight: bold;
}

.btn {
    display: inline-block;
    background: linear-gradient(to bottom, #5a0000, #3a0000);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #2a0000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: linear-gradient(to bottom, #7a0000, #5a0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3a0000;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2a0000;
}

.btn-start {
    background: linear-gradient(to bottom, #c62828, #8e0000);
    font-size: 1.3rem;
    padding: 15px 40px;
    margin-top: 20px;
}

.btn-hint {
    background: linear-gradient(to bottom, #1a237e, #0d1440);
    font-size: 0.9rem;
    padding: 8px 15px;
}

.btn-submit {
    background: linear-gradient(to bottom, #2e7d32, #1b5e20);
}

.timer-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #c62828;
    text-align: center;
}

.timer {
    font-size: 2.5rem;
    color: #ff5252;
    font-weight: bold;
    text-shadow: 0 0 10px #ff0000;
    letter-spacing: 3px;
}

.timer-warning {
    color: #ff9800;
    animation: pulse 1s infinite;
}

.timer-danger {
    color: #f44336;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.question-container {
    margin-bottom: 25px;
}

.question-number {
    color: #c62828;
    font-size: 1.3rem;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.answer-input {
    width: 100%;
    padding: 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.answer-input:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 10px rgba(198, 40, 40, 0.5);
}

.hint-container {
    background: rgba(26, 35, 126, 0.2);
    border: 1px solid #3949ab;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: none;
}

.hint-container.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.hint-title {
    color: #7986cb;
    font-weight: bold;
    margin-bottom: 10px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.95);
    border-left: 5px solid #c62828;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-width: 400px;
    display: none;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.show {
    display: block;
}

.notification-title {
    color: #c62828;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.notification-content {
    line-height: 1.5;
}

.notification-error {
    border-left-color: #c62828;
}

.notification-success {
    border-left-color: #2e7d32;
}

.notification-timeout {
    border-left-color: #ff6f00;
}

.jumpscare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
}

.jumpscare.active {
    display: flex;
    animation: jumpscareEffect 0.8s ease-out;
}

@keyframes jumpscareEffect {
    0% { transform: scale(1); opacity: 0; }
    10% { transform: scale(1.1); opacity: 1; }
    20% { transform: scale(1); }
    30% { transform: scale(1.05); }
    40% { transform: scale(1); }
    50% { transform: scale(1.02); }
    60% { transform: scale(1); }
    100% { opacity: 1; }
}

.jumpscare-image {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.music-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(90, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: rgba(120, 0, 0, 0.9);
    transform: scale(1.1);
}

.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #c62828;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(198, 40, 40, 0.7);
}

.profile-name {
    font-size: 1.8rem;
    color: #c62828;
    margin-bottom: 10px;
}

.profile-desc {
    text-align: center;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 20px;
}

.instructions-list {
    list-style-type: none;
    padding-left: 20px;
}

.instructions-list li {
    margin-bottom: 15px;
    padding-left: 10px;
    position: relative;
}

.instructions-list li:before {
    content: "➜";
    color: #c62828;
    position: absolute;
    left: -15px;
}

.end-message {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.8;
}

.final-time {
    color: #ff5252;
    font-weight: bold;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 82, 82, 0.7);
}

.nav-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .loading-title {
        font-size: 2rem;
    }
    
    .timer {
        font-size: 1.8rem;
    }
    
    .screen {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .btn-start {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
}

/* ==================== CANDLE STYLES ==================== */
.candle {
position: absolute;
width: 40px;
height: 80px;
z-index: 30;
display: flex;
flex-direction: column;
align-items: center;
}

.candle-body {
width: 100%;
height: 70px;
background: linear-gradient(to bottom, 
#8B0000 0%, 
#B22222 30%, 
#8B0000 70%, 
#4B0000 100%);
border-radius: 20px 20px 10px 10px;
position: relative;
box-shadow: 
inset 0 5px 10px rgba(255, 255, 255, 0.2),
inset 0 -5px 10px rgba(0, 0, 0, 0.5),
0 0 20px rgba(139, 0, 0, 0.5);
animation: candleGlow 4s infinite alternate;
}

/* Wax drips effect */
.candle-body::before {
content: '';
position: absolute;
bottom: -5px;
left: 5px;
width: 10px;
height: 15px;
background: linear-gradient(to bottom, #8B0000, #B22222);
border-radius: 50% 50% 40% 40%;
transform: rotate(15deg);
}

.candle-body::after {
content: '';
position: absolute;
bottom: -8px;
right: 8px;
width: 8px;
height: 12px;
background: linear-gradient(to bottom, #8B0000, #A52A2A);
border-radius: 50% 50% 40% 40%;
transform: rotate(-10deg);
}

/* Candle flame */
.candle-flame {
width: 25px;
height: 40px;
background: linear-gradient(to bottom, 
#FFFF00 0%, 
#FFA500 50%, 
#FF4500 100%);
border-radius: 50% 50% 20% 20%;
position: relative;
margin-bottom: -15px;
z-index: 35;
animation: flameFlicker 0.5s infinite alternate,
       flameMove 3s infinite ease-in-out;
box-shadow: 
0 0 30px rgba(255, 165, 0, 0.8),
0 0 60px rgba(255, 69, 0, 0.5),
0 0 100px rgba(255, 0, 0, 0.3);
filter: blur(1px);
}

/* Inner flame */
.candle-flame::before {
content: '';
position: absolute;
top: 5px;
left: 50%;
transform: translateX(-50%);
width: 15px;
height: 25px;
background: linear-gradient(to bottom, 
#FFFFFF 0%, 
#FFFF00 60%, 
transparent 100%);
border-radius: 50% 50% 20% 20%;
opacity: 0.7;
filter: blur(2px);
}

/* Flame tip */
.candle-flame::after {
content: '';
position: absolute;
top: -5px;
left: 50%;
transform: translateX(-50%);
width: 8px;
height: 10px;
background: #FFFFFF;
border-radius: 50% 50% 40% 40%;
opacity: 0.9;
filter: blur(3px);
}

/* Candle light glow */
.candle-light {
position: absolute;
top: -50px;
width: 120px;
height: 120px;
background: radial-gradient(circle, 
rgba(255, 200, 0, 0.3) 0%,
rgba(255, 100, 0, 0.2) 30%,
rgba(255, 50, 0, 0.1) 60%,
transparent 80%);
border-radius: 50%;
z-index: 25;
animation: lightPulse 2s infinite alternate;
}

/* Smoke effect */
.candle::after {
content: '';
position: absolute;
top: -60px;
width: 20px;
height: 40px;
background: linear-gradient(to top, 
rgba(100, 100, 100, 0.8) 0%,
rgba(150, 150, 150, 0.4) 50%,
transparent 100%);
border-radius: 50% 50% 0 0;
z-index: 20;
opacity: 0;
animation: smokeRise 4s infinite ease-in-out;
}

/* ==================== CANDLE POSITIONS ==================== */
.candle1 {
top: 15%;
left: 10%;
}

.candle2 {
top: 20%;
right: 15%;
}

.candle3 {
bottom: 25%;
left: 20%;
}

.candle4 {
bottom: 15%;
right: 25%;
}

/* ==================== CANDLE ANIMATIONS ==================== */
@keyframes flameFlicker {
0%, 100% { 
transform: scale(1, 1) translateY(0) rotate(0deg); 
height: 40px;
}
25% { 
transform: scale(1.1, 0.9) translateY(-2px) rotate(1deg); 
height: 38px;
}
50% { 
transform: scale(0.9, 1.1) translateY(2px) rotate(-1deg); 
height: 42px;
}
75% { 
transform: scale(1.05, 0.95) translateY(-1px) rotate(0.5deg); 
height: 39px;
}
}

@keyframes flameMove {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-3px); }
50% { transform: translateX(3px); }
75% { transform: translateX(-2px); }
}

@keyframes candleGlow {
0%, 100% { 
box-shadow: 
    inset 0 5px 10px rgba(255, 255, 255, 0.2),
    inset 0 -5px 10px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(139, 0, 0, 0.5);
}
50% { 
box-shadow: 
    inset 0 5px 10px rgba(255, 255, 255, 0.3),
    inset 0 -5px 10px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 69, 0, 0.7);
}
}

@keyframes lightPulse {
0%, 100% { 
opacity: 0.6; 
transform: scale(1);
}
50% { 
opacity: 0.8; 
transform: scale(1.1);
}
}

@keyframes smokeRise {
0% { 
opacity: 0; 
transform: translateY(0) scale(0.5); 
}
10% { 
opacity: 0.8; 
transform: translateY(-10px) scale(0.8); 
}
30% { 
opacity: 0.6; 
transform: translateY(-30px) scale(1); 
}
50% { 
opacity: 0.4; 
transform: translateY(-50px) scale(1.2); 
}
70% { 
opacity: 0.2; 
transform: translateY(-70px) scale(1.4); 
}
90% { 
opacity: 0.1; 
transform: translateY(-90px) scale(1.6); 
}
100% { 
opacity: 0; 
transform: translateY(-100px) scale(1.8); 
}
}

/* ==================== COLLECTED CANDLE EFFECT ==================== */
.candle.collected {
animation: collectAnimation 0.8s ease-out forwards;
}

.candle.collected .candle-flame {
animation: flameExtinguish 0.5s forwards;
}

@keyframes collectAnimation {
0% { 
transform: scale(1) translateY(0); 
opacity: 1;
}
50% { 
transform: scale(1.5) translateY(-20px); 
opacity: 0.7;
}
100% { 
transform: scale(0) translateY(-40px); 
opacity: 0;
display: none;
}
}

@keyframes flameExtinguish {
0% { 
opacity: 1;
transform: scale(1);
box-shadow: 0 0 30px rgba(255, 165, 0, 0.8);
}
100% { 
opacity: 0;
transform: scale(0.1);
box-shadow: 0 0 5px rgba(255, 69, 0, 0.2);
}
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 768px) {
.candle {
width: 30px;
height: 60px;
}

.candle-body {
height: 50px;
}

.candle-flame {
width: 20px;
height: 30px;
}

.candle-light {
width: 80px;
height: 80px;
top: -40px;
}
}

/* ==================== DARK MODE CANDLE ==================== */
.candle.dark {
filter: brightness(0.7) hue-rotate(180deg);
}

.candle.dark .candle-body {
background: linear-gradient(to bottom, 
#4B0082 0%, 
#8A2BE2 30%, 
#4B0082 70%, 
#2E0854 100%);
box-shadow: 
inset 0 5px 10px rgba(255, 255, 255, 0.1),
inset 0 -5px 10px rgba(0, 0, 0, 0.6),
0 0 20px rgba(138, 43, 226, 0.6);
}

.candle.dark .candle-flame {
background: linear-gradient(to bottom, 
#9370DB 0%, 
#8A2BE2 50%, 
#4B0082 100%);
box-shadow: 
0 0 30px rgba(147, 112, 219, 0.8),
0 0 60px rgba(138, 43, 226, 0.5),
0 0 100px rgba(75, 0, 130, 0.3);
}