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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0b0e2a;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e8ecff;
    -webkit-user-select: none;
    user-select: none;
}

#app {
    width: 100%;
    height: 100%;
}

/* ---------- Game shell ---------- */

.game-shell {
    position: relative;
    width: 100%;
    height: 100%;
    outline: none;
    touch-action: none;
    cursor: crosshair;
    overflow: hidden;
}

.game-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- HUD ---------- */

.hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 26px;
    pointer-events: none;
    font-size: 13px;
    letter-spacing: 3px;
    color: #7d8ac7;
    text-shadow: 0 0 12px rgba(61, 139, 255, 0.6);
}

.hud-item span {
    margin-left: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #e8ecff;
    letter-spacing: 1px;
}

.hud-center {
    position: relative;
    text-align: center;
}

.hud-center .combo {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    white-space: nowrap;
    font-style: normal;
    font-weight: 700;
    color: #ffd23d;
    text-shadow: 0 0 14px rgba(255, 210, 61, 0.9);
    animation: comboPopCentered 0.25s ease-out;
}

@keyframes comboPopCentered {
    from { opacity: 0; transform: translateX(-50%) scale(1.6); }
    to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes comboPop {
    from { opacity: 0; transform: scale(1.6); }
    to   { opacity: 1; transform: scale(1); }
}

.lives {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.lives i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff, #3df5ff 55%, #3d8bff);
    box-shadow: 0 0 10px rgba(61, 245, 255, 0.8);
}

.muted-flag {
    margin-right: 14px;
    font-weight: 700;
    color: #ff3e7f;
    text-shadow: 0 0 10px rgba(255, 62, 127, 0.8);
}

/* ---------- Active power-up chips ---------- */

.effects {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    pointer-events: none;
}

.effect {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    border: 1px solid currentColor;
    background: rgba(11, 14, 42, 0.7);
}

.effect.laser {
    color: #ff3d5e;
    box-shadow: 0 0 12px rgba(255, 61, 94, 0.6);
}

.effect.wide {
    color: #4dff7c;
    box-shadow: 0 0 12px rgba(77, 255, 124, 0.6);
}

.effect.stun {
    color: #ffd23d;
    box-shadow: 0 0 12px rgba(255, 210, 61, 0.6);
    animation: pulse 0.4s ease-in-out infinite;
}

/* ---------- Overlays ---------- */

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    pointer-events: none;
    text-align: center;
}

.title {
    font-size: clamp(40px, 9vw, 88px);
    font-weight: 900;
    letter-spacing: 14px;
    line-height: 0.95;
    color: #e8ecff;
    text-shadow:
        0 0 18px rgba(61, 245, 255, 0.9),
        0 0 60px rgba(61, 139, 255, 0.55);
}

.title span {
    display: block;
    background: linear-gradient(90deg, #ff3e7f, #ffd23d, #4dff7c, #3df5ff, #a03dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner {
    font-size: clamp(32px, 6vw, 60px);
    font-weight: 900;
    letter-spacing: 10px;
    color: #4dff7c;
    text-shadow: 0 0 24px rgba(77, 255, 124, 0.8);
    animation: comboPop 0.35s ease-out;
}

.banner.gameover {
    color: #ff3e7f;
    text-shadow: 0 0 24px rgba(255, 62, 127, 0.8);
}

.finalscore {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
}

.newhigh {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #ffd23d;
    text-shadow: 0 0 18px rgba(255, 210, 61, 0.9);
}

.hint {
    font-size: 15px;
    letter-spacing: 5px;
    color: #3df5ff;
    text-shadow: 0 0 14px rgba(61, 245, 255, 0.8);
}

.subhint {
    font-size: 12px;
    letter-spacing: 3px;
    color: #7d8ac7;
}

.pulse {
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* ---------- Boot / loading screen ---------- */

.boot {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.boot-title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 10px;
    text-shadow: 0 0 18px rgba(61, 245, 255, 0.9);
}

.boot-title span {
    display: block;
    text-align: center;
    background: linear-gradient(90deg, #ff3e7f, #ffd23d, #4dff7c, #3df5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.loading-progress {
    width: 8rem;
    height: 8rem;
}

.loading-progress circle {
    fill: none;
    stroke: #1d2352;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #3df5ff;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    font-size: 14px;
    letter-spacing: 4px;
    color: #7d8ac7;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "LOADING");
}

/* ---------- Blazor error UI ---------- */

#blazor-error-ui {
    background: #2a0b1e;
    color: #ffb3cd;
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 2.5rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 10;
    font-size: 14px;
}

#blazor-error-ui .reload {
    color: #3df5ff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
