/* ══════════════════════════════════════════════════════════════
   Word Shooter — Global Styles
   Extracted from inline <style> with responsive improvements
   ══════════════════════════════════════════════════════════════ */

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

body {
    font-family: 'Fredoka', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: #2d3436;
}

/* ══════════════════════════════════════════
   Dreamy Game World Background
   Duolingo + Nintendo + casual learning vibe
   ══════════════════════════════════════════ */

/* ── Sky base ── */
.sky-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg,
        #1565C0 0%,
        #1E88E5 10%,
        #42A5F5 28%,
        #81C9FA 46%,
        #B3E5FC 63%,
        #E1F5FE 78%,
        #FFF8E1 90%,
        #FFFDE7 100%
    );
    z-index: 0;
    overflow: hidden;
}

/* ── Sun ambient glow ── */
.sky-sun-glow {
    position: absolute;
    top: -60px; right: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle,
        rgba(255,245,100,0.45) 0%,
        rgba(255,220,50,0.2)  35%,
        rgba(255,200,0,0.08)  60%,
        transparent 75%
    );
    border-radius: 50%;
    pointer-events: none;
    animation: sun-amb 6s ease-in-out infinite;
}
@keyframes sun-amb {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.12); opacity: 0.82; }
}

/* ── Sun ── */
.sky-bg .sun {
    position: absolute;
    top: 30px; right: 65px;
    width: 88px; height: 88px;
    background: radial-gradient(circle at 38% 36%,
        #fffde7 0%, #fff176 28%, #FFD600 62%, #F9A825 100%
    );
    border-radius: 50%;
    box-shadow:
        0 0 0 10px rgba(255,236,64,0.18),
        0 0 0 22px rgba(255,236,64,0.11),
        0 0 0 38px rgba(255,236,64,0.06),
        0 0 55px  rgba(255,210,0,0.55),
        0 0 110px rgba(255,210,0,0.25);
    animation: sun-glow 4s ease-in-out infinite;
    z-index: 3;
}
@keyframes sun-glow {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.07);
        box-shadow: 0 0 0 14px rgba(255,236,64,0.22),
                    0 0 0 28px rgba(255,236,64,0.13),
                    0 0 0 48px rgba(255,236,64,0.07),
                    0 0 70px  rgba(255,210,0,0.65),
                    0 0 140px rgba(255,210,0,0.3); }
}

/* ── Sun rays (rotating) ── */
.sky-sun-rays {
    position: absolute;
    top: 30px; right: 65px;
    width: 88px; height: 88px;
    animation: sun-spin 28s linear infinite;
    z-index: 2;
    pointer-events: none;
}
.sky-sun-rays::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 220px; height: 220px;
    transform: translate(-50%,-50%);
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255,240,80,0.28) 0deg 8deg,
        transparent 8deg 22deg
    );
    border-radius: 50%;
    mask: radial-gradient(circle, transparent 44px, rgba(0,0,0,0.8) 55px, rgba(0,0,0,0.8) 100px, transparent 108px);
    -webkit-mask: radial-gradient(circle, transparent 44px, rgba(0,0,0,0.8) 55px, rgba(0,0,0,0.8) 100px, transparent 108px);
}
@keyframes sun-spin { to { transform: rotate(360deg); } }

/* ── Rainbow ── */
.sky-rainbow {
    position: absolute;
    width: 700px; height: 350px;
    bottom: 22%; left: 52%;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse at 50% 100%, transparent 46%, rgba(148,0,211,0.22) 50%, transparent 54%),
        radial-gradient(ellipse at 50% 100%, transparent 52%, rgba(75,0,130,0.18)  56%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, transparent 58%, rgba(0,80,255,0.2)   62%, transparent 66%),
        radial-gradient(ellipse at 50% 100%, transparent 64%, rgba(0,190,70,0.2)   68%, transparent 72%),
        radial-gradient(ellipse at 50% 100%, transparent 70%, rgba(255,230,0,0.22) 74%, transparent 78%),
        radial-gradient(ellipse at 50% 100%, transparent 76%, rgba(255,140,0,0.22) 80%, transparent 84%),
        radial-gradient(ellipse at 50% 100%, transparent 82%, rgba(255,30,30,0.2)  86%, transparent 90%);
    filter: blur(7px);
    opacity: 0.72;
    pointer-events: none;
    animation: rainbow-pulse 18s ease-in-out infinite;
}
@keyframes rainbow-pulse {
    0%,100% { opacity: 0.72; }
    50%      { opacity: 0.48; }
}

/* ── Stars / sparkle layer ── */
.sky-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 2px   at  7% 10%, rgba(255,255,255,0.95) 100%, transparent),
        radial-gradient(circle 1.5px at 14%  6%, rgba(255,255,220,0.9)  100%, transparent),
        radial-gradient(circle 2px   at 24% 18%, rgba(255,255,255,0.85) 100%, transparent),
        radial-gradient(circle 1px   at 33%  4%, rgba(255,255,200,0.95) 100%, transparent),
        radial-gradient(circle 2.5px at 43% 13%, rgba(255,255,255,0.8)  100%, transparent),
        radial-gradient(circle 1.5px at 57%  7%, rgba(255,255,220,0.9)  100%, transparent),
        radial-gradient(circle 2px   at 65% 16%, rgba(255,255,255,0.75) 100%, transparent),
        radial-gradient(circle 1px   at 74%  3%, rgba(255,255,200,0.9)  100%, transparent),
        radial-gradient(circle 2px   at 84%  9%, rgba(255,255,255,0.85) 100%, transparent),
        radial-gradient(circle 1.5px at 93% 14%, rgba(255,255,220,0.9)  100%, transparent),
        radial-gradient(circle 1px   at  2% 22%, rgba(255,255,255,0.7)  100%, transparent),
        radial-gradient(circle 2px   at 30% 28%, rgba(255,255,220,0.65) 100%, transparent),
        radial-gradient(circle 1.5px at 51% 20%, rgba(255,255,255,0.72) 100%, transparent),
        radial-gradient(circle 1px   at 79% 25%, rgba(255,255,200,0.75) 100%, transparent),
        radial-gradient(circle 2px   at 97%  5%, rgba(255,255,255,0.9)  100%, transparent);
    animation: stars-twinkle 5s ease-in-out infinite alternate;
}
@keyframes stars-twinkle {
    0%   { opacity: 0.55; }
    100% { opacity: 1; }
}

/* ── Clouds — 3D puffy style ── */
.sky-cloud {
    position: absolute;
    pointer-events: none;
    animation: cloud-float linear infinite;
    will-change: transform;
}
/* Cloud body */
.sky-cloud-body {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #EEF6FF 100%);
    border-radius: 100px;
    box-shadow:
        0 6px 20px rgba(80,130,200,0.14),
        inset 0 -3px 6px rgba(180,210,255,0.25),
        inset 0 3px 6px rgba(255,255,255,0.8);
}
/* Top bumps (::before = left bump, ::after = right bump) */
.sky-cloud-body::before {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
    top: -48%; left: 12%;
    width: 52%; height: 175%;
    box-shadow: inherit;
}
.sky-cloud-body::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
    top: -30%; left: 44%;
    width: 38%; height: 135%;
}
/* Far/small clouds — slightly blurred + muted */
.sky-cloud.far .sky-cloud-body {
    background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(220,236,255,0.7) 100%);
    filter: blur(1.5px);
}

@keyframes cloud-float {
    0%   { transform: translateX(-350px); }
    100% { transform: translateX(calc(100vw + 350px)); }
}

/* ── Far hills (distant, blurred) ── */
.sky-hills-far {
    position: absolute;
    bottom: 62px; left: -5%; right: -5%;
    height: 110px;
    background:
        radial-gradient(ellipse 380px 95px at 18% 100%, rgba(165,214,167,0.55) 45%, transparent 100%),
        radial-gradient(ellipse 320px 85px at 48% 100%, rgba(165,214,167,0.5)  45%, transparent 100%),
        radial-gradient(ellipse 400px 100px at 78% 100%, rgba(165,214,167,0.55) 45%, transparent 100%),
        radial-gradient(ellipse 250px 70px at 95% 100%, rgba(165,214,167,0.4)  45%, transparent 100%);
    filter: blur(10px);
    pointer-events: none;
}

/* ── Mid hills ── */
.sky-hills-mid {
    position: absolute;
    bottom: 62px; left: -5%; right: -5%;
    height: 80px;
    background:
        radial-gradient(ellipse 420px 80px at 25% 100%, rgba(102,187,106,0.65) 45%, transparent 100%),
        radial-gradient(ellipse 350px 70px at 62% 100%, rgba(102,187,106,0.6)  45%, transparent 100%),
        radial-gradient(ellipse 280px 65px at 90% 100%, rgba(102,187,106,0.5)  45%, transparent 100%);
    filter: blur(4px);
    pointer-events: none;
}

/* ── Left scene: treehouse + trees ── */
.sky-scene-left {
    position: absolute;
    bottom: 62px; left: 0;
    width: 200px; height: 320px;
    pointer-events: none;
    z-index: 1;
}
.sky-scene-left .s-tree-big {
    position: absolute; bottom: 0; left: 8px;
    font-size: 5.5rem; line-height: 1;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
    animation: scene-sway 7s ease-in-out infinite;
}
.sky-scene-left .s-house {
    position: absolute; bottom: 72px; left: 35px;
    font-size: 2.2rem; line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.sky-scene-left .s-tree-mid {
    position: absolute; bottom: 0; left: 95px;
    font-size: 4rem; line-height: 1;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,0.15));
    animation: scene-sway 9s ease-in-out infinite reverse;
}
.sky-scene-left .s-flower {
    position: absolute; bottom: 0; left: 155px;
    font-size: 1.8rem; line-height: 1;
    animation: sway 5s ease-in-out infinite;
}
@keyframes scene-sway {
    0%,100% { transform: rotate(-1deg); }
    50%      { transform: rotate(1.5deg); }
}

/* ── Right scene: windmill + tree ── */
.sky-scene-right {
    position: absolute;
    bottom: 62px; right: 0;
    width: 200px; height: 340px;
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
    opacity: 0.88;
}
.sky-scene-right .s-castle {
    position: absolute; bottom: 0; right: 10px;
    font-size: 3.8rem; line-height: 1;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,0.14));
}
.sky-scene-right .s-windmill {
    position: absolute; bottom: 0; right: 90px;
    font-size: 3rem; line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
    animation: windmill-spin 4s linear infinite;
    transform-origin: center 80%;
}
@keyframes windmill-spin {
    to { transform: rotate(360deg); }
}
.sky-scene-right .s-tree-right {
    position: absolute; bottom: 0; right: 140px;
    font-size: 4.5rem; line-height: 1;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,0.15));
    animation: scene-sway 8s ease-in-out infinite;
}

/* ── Balloon ── */
.sky-balloon {
    position: absolute;
    font-size: 3.2rem;
    top: 12%; left: 18%;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.18));
    animation: balloon-rise 9s ease-in-out infinite;
}
@keyframes balloon-rise {
    0%,100% { transform: translateY(0)    rotate(-4deg); }
    30%      { transform: translateY(-22px) rotate(3deg); }
    60%      { transform: translateY(-10px) rotate(-2deg); }
    80%      { transform: translateY(-28px) rotate(4deg); }
}

/* ── Grass ── */
.grass {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(180deg,
        #88D46A 0%, #6DC250 25%, #55AB3C 55%, #4A9A32 100%
    );
    z-index: 0;
    box-shadow: 0 -5px 24px rgba(0,80,0,0.12);
}
/* Wavy top edge */
.grass::before {
    content: '';
    position: absolute;
    top: -22px; left: -2%; right: -2%;
    height: 44px;
    background:
        radial-gradient(ellipse 160px 28px at  8% 100%, #88D46A 48%, transparent 52%),
        radial-gradient(ellipse 200px 35px at 24% 100%, #88D46A 48%, transparent 52%),
        radial-gradient(ellipse 170px 30px at 40% 100%, #88D46A 48%, transparent 52%),
        radial-gradient(ellipse 210px 32px at 58% 100%, #88D46A 48%, transparent 52%),
        radial-gradient(ellipse 180px 28px at 74% 100%, #88D46A 48%, transparent 52%),
        radial-gradient(ellipse 195px 33px at 90% 100%, #88D46A 48%, transparent 52%);
}
/* Flowers */
.grass::after {
    content: '🌸🌼🌺🌻🌷🌸🌼🌺🌻🌼🌸🌺🌷🌼';
    position: absolute;
    top: -20px; left: 0; right: 0;
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: 22px;
    animation: sway 5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sway {
    0%,100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}

/* ── Floating decorations ── */
.floating-deco {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.floating-deco.butterfly { animation: butterfly-fly 7s ease-in-out infinite; }
.floating-deco.bee       { animation: bee-buzz 5s ease-in-out infinite; }
.floating-deco.sparkle   { animation: sparkle-pop 4s ease-in-out infinite; }
.floating-deco.star      { animation: star-float 6s ease-in-out infinite; }
.floating-deco.balloon   { animation: balloon-rise 8s ease-in-out infinite; }

@keyframes butterfly-fly {
    0%,100% { transform: translateY(0) rotate(-8deg) scaleX(1); }
    25%      { transform: translateY(-18px) rotate(6deg) scaleX(-1); }
    50%      { transform: translateY(-8px)  rotate(-4deg) scaleX(1); }
    75%      { transform: translateY(-24px) rotate(8deg) scaleX(-1); }
}
@keyframes bee-buzz {
    0%,100% { transform: translateY(0) translateX(0) rotate(-5deg); }
    20%      { transform: translateY(-12px) translateX(8px) rotate(5deg); }
    40%      { transform: translateY(-6px)  translateX(-6px) rotate(-3deg); }
    60%      { transform: translateY(-16px) translateX(4px) rotate(6deg); }
    80%      { transform: translateY(-4px)  translateX(-8px) rotate(-4deg); }
}
@keyframes sparkle-pop {
    0%,100% { transform: scale(1) rotate(0deg);   opacity: 0.8; }
    50%      { transform: scale(1.4) rotate(180deg); opacity: 1; }
}
@keyframes star-float {
    0%,100% { transform: translateY(0) rotate(0deg);  opacity: 0.75; }
    50%      { transform: translateY(-14px) rotate(20deg); opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sky-bg .sun { width: 58px; height: 58px; top: 16px; right: 28px; }
    .sky-sun-glow { width: 200px; height: 200px; }
    .sky-sun-rays { width: 58px; height: 58px; top: 16px; right: 28px; }
    .sky-rainbow { width: 380px; height: 190px; }
    .sky-scene-left { width: 130px; }
    .sky-scene-left .s-tree-big { font-size: 3.8rem; }
    .sky-scene-left .s-tree-mid { font-size: 2.8rem; left: 65px; }
    .sky-scene-left .s-house { font-size: 1.6rem; }
    .sky-scene-right { width: 120px; }
    .sky-scene-right .s-castle { font-size: 2.6rem; }
    .sky-scene-right .s-tree-right { font-size: 3rem; right: 85px; }
    .sky-scene-right .s-windmill { font-size: 2.2rem; right: 60px; }
    .sky-balloon { font-size: 2.2rem; left: 10%; top: 14%; }
    .grass { height: 50px; }
    .floating-deco { opacity: 0.7; }
}

/* ── Navbar ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #6C63FF 0%, #48dbfb 100%);
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 25px rgba(108,99,255,0.25);
    border-radius: 0 0 24px 24px;
    gap: 8px;
}

.navbar .logo {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 1px 2px 3px rgba(0,0,0,0.15);
    white-space: nowrap;
}

.navbar .logo .logo-icon {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    animation: rocket-bounce 2s infinite;
}

@keyframes rocket-bounce {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-6px) rotate(10deg); }
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    transition: background 0.2s, transform 0.2s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-2px) scale(1.08);
}

/* ── Container ── */
.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(10px, 3vw, 25px) clamp(8px, 2.5vw, 20px) 80px;
}

/* ── Buttons ── */
.btn-fun {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(8px, 1.5vw, 12px) clamp(14px, 3vw, 24px);
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.25s ease;
    text-decoration: none;
    box-shadow: 0 5px 0 rgba(0,0,0,0.12), 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
    top: 0;
    letter-spacing: 0.3px;
}

.btn-fun:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 0 rgba(0,0,0,0.12), 0 14px 35px rgba(0,0,0,0.12);
}

.btn-fun:active {
    top: 4px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
}

.btn-primary { background: linear-gradient(135deg, #FF6B6B, #ee5a24); color: white; }
.btn-success { background: linear-gradient(135deg, #00b894, #55efc4); color: white; }
.btn-warning { background: linear-gradient(135deg, #fdcb6e, #f39c12); color: white; }
.btn-danger { background: linear-gradient(135deg, #fd79a8, #e84393); color: white; }
.btn-info { background: linear-gradient(135deg, #74b9ff, #6c5ce7); color: white; }

/* ── Card ── */
.card {
    background: rgba(255,255,255,0.95);
    border-radius: clamp(14px, 3vw, 24px);
    padding: clamp(14px, 3vw, 28px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 3px solid rgba(108,99,255,0.1);
    backdrop-filter: blur(10px);
}

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: #2d3436;
}

.form-control {
    width: 100%;
    padding: 13px 18px;
    border: 3px solid #e8daef;
    border-radius: 16px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: #6C63FF;
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
    background: white;
}

/* ── Table ── */
.table-fun {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-fun th {
    background: linear-gradient(135deg, #6C63FF, #48dbfb);
    color: white;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
}

.table-fun th:first-child { border-radius: 14px 0 0 14px; }
.table-fun th:last-child { border-radius: 0 14px 14px 0; }

.table-fun td {
    background: white;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.table-fun tr td:first-child { border-radius: 14px 0 0 14px; }
.table-fun tr td:last-child { border-radius: 0 14px 14px 0; }

.table-fun tbody tr {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.table-fun tbody tr:hover { transform: scale(1.01); }

/* ── Table Responsive Wrapper ── */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { border-radius: 0 0 16px 16px; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .nav-links a { width: 36px; height: 36px; font-size: 1.2rem; }
    .card { max-width: 100% !important; }
    .form-control { padding: 10px 14px; }
    .table-fun th, .table-fun td { padding: 10px; font-size: 0.85rem; white-space: nowrap; }
    .sky-bg .sun { width: 50px; height: 50px; top: 15px; right: 25px; }
    .grass { height: 40px; }
    .floating-deco { display: none; }
}

@media (max-width: 480px) {
    .nav-links { gap: 6px; }
    .nav-links a { width: 34px; height: 34px; font-size: 1.1rem; }
    .table-fun { min-width: 400px; }
    .table-fun th, .table-fun td { padding: 8px; font-size: 0.78rem; }
    .sky-bg .sun { width: 35px; height: 35px; }
    .grass { height: 30px; }
}

@media (max-width: 360px) {
    .navbar { padding: 8px 10px; }
    .grass { display: none; }
}

/* ── Prevent iOS input zoom ── */
input, textarea, select { font-size: max(16px, 1em) !important; }

/* ── Profile Dropdown ── */
.profile-wrap { position: relative; }
.profile-btn {
    color: #fff; font-weight: 600; font-size: 0.85rem;
    padding: 5px 10px; border-radius: 30px; cursor: pointer;
    background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
    font-family: 'Fredoka', sans-serif; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 4px;
}
.profile-btn:hover { background: rgba(255,255,255,0.35); transform: translateY(-1px); }
.profile-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: white; border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 180px; z-index: 200;
}
.profile-menu.open { display: block; }
.profile-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.profile-name { font-weight: 700; color: #2d3436; font-size: 0.9rem; }
.profile-email { font-size: 0.75rem; color: #636e72; }
.profile-logout {
    width: 100%; padding: 8px 12px; border: none; border-radius: 8px;
    background: #fee2e2; color: #ef4444; font-family: 'Fredoka', sans-serif;
    font-weight: 600; font-size: 0.82rem; cursor: pointer; transition: background 0.2s;
}
.profile-logout:hover { background: #fecaca; }
.nav-login-btn {
    color: #fff; font-weight: 600; font-size: 0.85rem;
    padding: 5px 10px; border-radius: 30px; cursor: pointer;
    background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
    font-family: 'Fredoka', sans-serif; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 4px;
}
.nav-login-btn:hover { background: rgba(255,255,255,0.35); transform: translateY(-1px); }

/* ── Login Modal ── */
.login-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(30,20,60,0.55); backdrop-filter: blur(6px);
    z-index: 300; align-items: center; justify-content: center; padding: 16px;
}
.login-backdrop.open { display: flex; }
.login-modal {
    background: white; border-radius: 24px; width: 100%; max-width: 380px;
    box-shadow: 0 24px 64px rgba(108,99,255,0.22);
    overflow: hidden;
    will-change: transform;
    animation: modal-pop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.login-modal-header {
    background: linear-gradient(135deg, #6C63FF 0%, #a855f7 100%);
    padding: 22px 20px 18px;
    text-align: center; position: relative;
}
.login-modal-header .lm-icon { font-size: 2.4rem; display: block; margin-bottom: 4px; }
.login-modal-header h3 {
    color: white; font-size: 1.15rem; font-weight: 700; margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.login-modal-header .lm-sub {
    color: rgba(255,255,255,0.8); font-size: 0.78rem; margin-top: 2px;
}
.login-modal-close {
    position: absolute; top: 12px; right: 14px;
    background: rgba(255,255,255,0.2); border: none; border-radius: 50%;
    width: 28px; height: 28px; color: white; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.login-modal-close:hover { background: rgba(255,255,255,0.35); }
.login-modal-body { padding: 20px 22px 22px; }
.login-tabs {
    display: flex; gap: 6px; margin-bottom: 18px;
    background: #f3f0ff; border-radius: 12px; padding: 4px;
}
.login-tab {
    flex: 1; padding: 9px; text-align: center; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; background: transparent; border: none;
    font-family: 'Fredoka', sans-serif; color: #6C63FF;
    border-radius: 9px; transition: all 0.2s;
}
.login-tab.active {
    background: white; color: #6C63FF;
    box-shadow: 0 2px 8px rgba(108,99,255,0.18);
}
.login-form { display: none; }
.login-form.active { display: block; }
.login-form .form-group { margin-bottom: 12px; text-align: left; }
.login-form label {
    font-size: 0.78rem; font-weight: 600; color: #636e72;
    display: block; margin-bottom: 5px; padding-left: 2px;
}
.login-input-wrap { position: relative; }
.login-input-wrap .li-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 1rem; pointer-events: none;
}
.login-form input {
    width: 100%; padding: 11px 14px 11px 36px; border: 2px solid #ede8ff;
    border-radius: 12px; font-family: 'Fredoka', sans-serif;
    font-size: 16px !important; outline: none; box-sizing: border-box;
    background: #faf9ff; color: #2d3436; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-form input:focus { border-color: #6C63FF; background: white; box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }
.login-form .login-error {
    color: #ef4444; font-size: 0.78rem; margin-bottom: 10px;
    display: none; background: #fff0f0; border-radius: 8px; padding: 7px 10px;
}
.login-form .login-desc {
    color: #999; font-size: 0.78rem; margin-bottom: 14px; line-height: 1.5;
    background: #f8f9fa; border-radius: 8px; padding: 8px 10px;
}
.login-submit-btn {
    width: 100%; padding: 12px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #6C63FF, #a855f7); color: white;
    font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1rem;
    cursor: pointer; margin-top: 4px;
    box-shadow: 0 4px 14px rgba(108,99,255,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}
.login-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,0.4); }
.login-submit-btn:active { transform: translateY(1px); }

/* ── Global Fullpage Loading Overlay ── */
#page-loading-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s;
}
#page-loading-overlay.active {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
}
.loading-spinner {
    display: flex; flex-direction: column; align-items: center;
    position: relative; padding-top: 64px;
    animation: spinner-fade-in 0.35s ease-out;
}
@keyframes spinner-fade-in {
    from { transform: scale(0.85) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.spinner-ring {
    position: absolute; border-radius: 50%; border: 3px solid transparent;
    left: 50%; top: 0;
    animation: ring-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.spinner-ring:nth-child(1) {
    width: 52px; height: 52px; margin-left: -26px; margin-top: 4px;
    border-top-color: #6C63FF;
    animation-delay: -0.3s;
}
.spinner-ring:nth-child(2) {
    width: 40px; height: 40px; margin-left: -20px; margin-top: 10px;
    border-top-color: #a855f7;
    animation-delay: -0.15s;
}
.spinner-ring:nth-child(3) {
    width: 28px; height: 28px; margin-left: -14px; margin-top: 16px;
    border-top-color: #48dbfb;
}
@keyframes ring-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner-text {
    margin-top: 12px; font-size: 0.88rem; font-weight: 500;
    color: #6C63FF; letter-spacing: 0.02em;
    animation: text-pulse 1.8s ease-in-out infinite;
}
@keyframes text-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Modal pop animation (shared) ── */
@keyframes modal-pop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
