/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
#login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at 60% 40%, #1a103c 0%, #0d0921 60%, #050510 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
}
#login-screen.fade-out {
    animation: loginFadeOut 0.7s ease forwards;
}
@keyframes loginFadeOut {
    to { opacity: 0; transform: scale(1.04); pointer-events: none; }
}

.login-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    text-align: center;
}
.login-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: white;
    margin: 0 auto 1.25rem;
    box-shadow: 0 0 30px rgba(99,102,241,0.5);
}
.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}
.login-field {
    position: relative;
    margin-bottom: 1rem;
    text-align: left;
}
.login-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.login-field input {
    width: 100%;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.login-field input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.login-error {
    color: var(--color-red);
    font-size: 0.85rem;
    margin: 0.5rem 0 0.75rem;
    min-height: 1.2em;
    text-align: center;
}
.login-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}
.login-btn:hover  { opacity: 0.9; }
.login-btn:active { transform: scale(0.98); }

/* ═══════════════════════════════════════════════
   ESMA MAGICAL SURPRISE
═══════════════════════════════════════════════ */
#esma-surprise {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: radial-gradient(ellipse at 50% 35%, #3b0764 0%, #1e0236 50%, #090014 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    overflow: hidden;
}
#esma-surprise.hidden { display: none; }

/* Floating particles field */
.heart-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.heart-particle {
    position: absolute;
    bottom: -60px;
    font-size: 1.5rem;
    animation: floatHeart linear infinite;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(244, 114, 182, 0.6));
}
@keyframes floatHeart {
    0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
    15%  { opacity: 0.9; }
    85%  { opacity: 0.7; }
    100% { transform: translateY(-115vh) rotate(35deg) scale(1.2); opacity: 0; }
}

/* Animated Flying Butterfly Figures */
.butterfly {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 4;
    perspective: 400px;
}
.butterfly .wing {
    position: absolute;
    width: 20px;
    height: 28px;
    background: linear-gradient(135deg, #f472b6, #ec4899, #a855f7);
    border-radius: 50% 50% 20% 50%;
    opacity: 0.9;
    box-shadow: 0 0 15px rgba(236,72,153,0.8);
}
.butterfly .wing.left {
    left: 0;
    transform-origin: right center;
    animation: flapLeft 0.28s ease-in-out infinite alternate;
}
.butterfly .wing.right {
    right: 0;
    transform-origin: left center;
    border-radius: 50% 50% 50% 20%;
    animation: flapRight 0.28s ease-in-out infinite alternate;
}
.butterfly .body {
    position: absolute;
    left: 18px;
    top: 4px;
    width: 4px;
    height: 22px;
    background: #3b0764;
    border-radius: 4px;
}

@keyframes flapLeft {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(72deg); }
}
@keyframes flapRight {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(-72deg); }
}

.butterfly-fly1 { animation: flyPath1 16s ease-in-out infinite alternate; }
.butterfly-fly2 { animation: flyPath2 19s ease-in-out infinite alternate; }
.butterfly-fly3 { animation: flyPath3 22s ease-in-out infinite alternate; }

@keyframes flyPath1 {
    0%   { transform: translate(5vw, 80vh) rotate(15deg); }
    30%  { transform: translate(35vw, 40vh) rotate(-10deg); }
    65%  { transform: translate(75vw, 65vh) rotate(25deg); }
    100% { transform: translate(25vw, 15vh) rotate(-15deg); }
}
@keyframes flyPath2 {
    0%   { transform: translate(85vw, 85vh) rotate(-25deg); }
    40%  { transform: translate(60vw, 30vh) rotate(15deg); }
    70%  { transform: translate(20vw, 55vh) rotate(-20deg); }
    100% { transform: translate(15vw, 10vh) rotate(20deg); }
}
@keyframes flyPath3 {
    0%   { transform: translate(40vw, 90vh) rotate(5deg); }
    50%  { transform: translate(80vw, 20vh) rotate(-30deg); }
    100% { transform: translate(10vw, 60vh) rotate(15deg); }
}

/* Surprise card */
.surprise-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1.5px solid rgba(244, 114, 182, 0.3);
    border-radius: 28px;
    padding: 2.5rem 2.25rem 2rem;
    max-width: 480px;
    width: 92%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(168, 85, 247, 0.35), inset 0 1px 2px rgba(255,255,255,0.2);
}

.surprise-step { display: none; }
.surprise-step.active { display: block; animation: stepIn 0.45s ease-out; }
@keyframes stepIn { from { opacity:0; transform:translateY(18px) scale(0.98); } to { opacity:1; transform:translateY(0) scale(1); } }

.surprise-emoji { font-size: 3.8rem; line-height: 1; margin-bottom: 0.75rem; filter: drop-shadow(0 0 12px rgba(244,114,182,0.5)); }

.surprise-card h2 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbcfe8, #f472b6, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.65rem;
}
.surprise-card p {
    color: #e9d5ff;
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Quiz options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1.2rem 0 0.5rem;
}
.quiz-opt {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(244, 114, 182, 0.25);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    color: #f5f3ff;
    font-size: 0.98rem;
    font-weight: 600;
    transition: all 0.25s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.quiz-opt:hover {
    background: rgba(236, 72, 153, 0.25);
    border-color: #f472b6;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}
.quiz-opt.correct {
    background: rgba(16, 185, 129, 0.3);
    border-color: #34d399;
    color: #a7f3d0;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}
.quiz-opt.wrong {
    background: rgba(239, 68, 68, 0.22);
    border-color: #f87171;
    color: #fca5a5;
    animation: shake 0.4s;
}
@keyframes shake {
    0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 60%{transform:translateX(7px)}
}
.quiz-feedback {
    font-size: 0.95rem;
    color: #f472b6;
    min-height: 1.6em;
    margin: 0.6rem 0;
    font-weight: 600;
}

/* Yes/No game */
.yn-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.25rem;
    position: relative;
    height: 75px;
}
.btn-yes {
    padding: 0.85rem 2.2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(16,185,129,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-yes:hover  { transform: scale(1.06); box-shadow: 0 12px 30px rgba(16,185,129,0.6); }
.btn-yes:active { transform: scale(0.97); }

.btn-no {
    padding: 0.85rem 2.2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    color: #e9d5ff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: absolute;
    transition: left 0.15s ease, top 0.15s ease;
    user-select: none;
}

/* Buttons */
.surprise-btn {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.85rem 2.4rem;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px rgba(236,72,153,0.4);
    letter-spacing: 0.03em;
}
.surprise-btn:hover  { opacity: 0.95; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(236,72,153,0.6); }
.surprise-btn:active { transform: scale(0.97); }

/* Progress dots */
.step-dots {
    display: flex; gap: 8px; justify-content: center; margin-top: 1.6rem;
}
.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.3s, width 0.3s;
}
.step-dot.active { background: #f472b6; width: 24px; border-radius: 6px; box-shadow: 0 0 10px #f472b6; }
