@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-latin-400-normal.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
}
@font-face {
    font-family: 'Syne';
    src: url('fonts/Syne-latin-700-normal.woff2') format('woff2');
    font-weight: 700 800;
    font-display: swap;
}

:root {
    --lc-void: #050818;
    --lc-deep: #0c1030;
    --lc-ice: #9ee7ff;
    --lc-gold: #ffd93d;
    --lc-mint: #6bcb77;
    --lc-rose: #f472b6;
    --lc-font: 'Fredoka', system-ui, sans-serif;
    --lc-display: 'Syne', 'Fredoka', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-tap-highlight-color: transparent; }

html { background: var(--lc-void); overflow: hidden; }

body.lc-game {
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    font-family: var(--lc-font);
    color: #fff;
    background: var(--lc-void);
    position: relative;
}

.lc-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.lc-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 36px;
    background: linear-gradient(180deg, rgba(5,8,24,0.95), transparent);
    pointer-events: none;
}
.lc-header > * { pointer-events: auto; }

.lc-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    border: 2px solid rgba(158,231,255,0.35);
    background: rgba(255,255,255,0.06);
    color: var(--lc-ice);
    text-decoration: none;
    font-size: 22px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    transition: transform 0.15s, box-shadow 0.15s;
}
.lc-back:active { transform: scale(0.96); box-shadow: 0 0 20px rgba(255,217,61,0.4); }

.lc-title {
    font-family: var(--lc-display);
    font-size: 42px;
    color: var(--lc-gold);
    text-shadow: 0 0 30px rgba(255,217,61,0.5);
    text-align: center;
}

.lc-stars { display: flex; gap: 10px; font-size: 32px; }
.lc-stars span { opacity: 0.25; filter: grayscale(1); transition: all 0.4s; }
.lc-stars span.on { opacity: 1; filter: none; transform: scale(1.15); }

.lc-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.lc-hud {
    position: absolute;
    z-index: 20;
    pointer-events: none;
}
.lc-hud > * { pointer-events: auto; }

.lc-lumen {
    position: absolute;
    right: 36px;
    top: 110px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 420px;
    z-index: 25;
}
.lc-lumen-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff9c4, #ffd54f 55%, #ff9800);
    border: 4px solid #fff;
    box-shadow: 0 0 40px rgba(255,213,106,0.7), 0 8px 0 rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
    animation: lumen-float 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes lumen-float { 50% { transform: translateY(-10px); } }
.lc-lumen-bubble {
    background: rgba(255,255,255,0.96);
    border: 3px solid #a5d6a7;
    border-radius: 24px;
    padding: 18px 22px;
    font-size: 20px;
    line-height: 1.45;
    color: #333;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.lc-toolbar {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(10,8,30,0.85);
    border: 2px solid rgba(158,231,255,0.2);
    border-radius: 28px;
    backdrop-filter: blur(12px);
    z-index: 20;
}

.lc-tool {
    width: 80px; height: 80px;
    border-radius: 20px;
    border: 3px solid transparent;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 32px;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.lc-tool span { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 600; }
.lc-tool.active {
    border-color: var(--lc-gold);
    transform: scale(1.08);
    box-shadow: 0 0 24px rgba(255,217,61,0.45);
}

.lc-btn {
    padding: 18px 36px;
    border: none;
    border-radius: 999px;
    font-family: var(--lc-font);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #6bcb77, #2d8a3e);
    box-shadow: 0 8px 0 #1a5c28, 0 0 24px rgba(107,203,119,0.35);
    transition: transform 0.12s;
}
.lc-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #1a5c28; }

.lc-celebrate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(0,0,0,0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}
.lc-celebrate.show { opacity: 1; pointer-events: auto; }
.lc-celebrate h2 {
    font-family: var(--lc-display);
    font-size: 64px;
    background: linear-gradient(90deg, #fff, var(--lc-gold), var(--lc-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255,217,61,0.6));
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    padding: 0 40px;
}
.lc-celebrate p { font-size: 28px; color: var(--lc-ice); text-align: center; max-width: 700px; }
@keyframes pop-in {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#fx-canvas {
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
}
