/* ============================================================
   AZTEK — Stage CSS (Light + Dark)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root,
[data-theme="light"] {
    --bg-0: #f1ecdd;
    --bg-1: #faf6ea;
    --bg-aura-color: rgba(255, 168, 60, 0.35);

    --text-primary: #1a1a2a;
    --text-dim: #8a8678;

    --grid-line: rgba(120, 100, 60, 0.10);
    --scanline: rgba(0, 0, 0, 0.025);

    --card-bg: rgba(255, 252, 244, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 30px 80px -20px rgba(60, 40, 10, 0.18);

    --input-bg: rgba(0, 0, 0, 0.04);
    --input-border: rgba(0, 0, 0, 0.12);
    --input-text: #1a1a2a;
    --input-placeholder: #a8a290;

    --bubble-bg: #1a1a2a;
    --bubble-text-gradient-from: #ffaa3d;
    --bubble-text-gradient-to: #ff6b1a;

    --hint-blink-color: #1a1a2a;

    --entra-bg: #ffffff;
    --entra-bg-hover: #f5f5f5;
    --entra-border: rgba(0, 0, 0, 0.15);
    --entra-text: #1a1a2a;
}

[data-theme="dark"] {
    --bg-0: #0a0a14;
    --bg-1: #11111d;
    --bg-aura-color: rgba(255, 107, 26, 0.55);

    --text-primary: #f0e6d2;
    --text-dim: #6a6a85;

    --grid-line: rgba(120, 100, 200, 0.06);
    --scanline: rgba(255, 255, 255, 0.015);

    --card-bg: rgba(20, 18, 30, 0.92);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);

    --input-bg: rgba(0, 0, 0, 0.4);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-text: #f0e6d2;
    --input-placeholder: #6a6a85;

    --bubble-bg: #f0e6d2;
    --bubble-text-gradient-from: #ff6b1a;
    --bubble-text-gradient-to: #d6440f;

    --hint-blink-color: #6a6a85;

    --entra-bg: #2a2735;
    --entra-bg-hover: #36323f;
    --entra-border: rgba(255, 255, 255, 0.1);
    --entra-text: #f0e6d2;
}

:root {
    --amber: #ff6b1a;
    --amber-bright: #ffaa3d;
    --amber-glow: rgba(255, 107, 26, 0.55);
    --cyan: #00b8d4;
    --cyan-soft: rgba(0, 184, 212, 0.35);

    --speaker-shell: #1f1d28;
    --speaker-shell-2: #2a2735;
    --speaker-trim: #3d3a4d;
    --speaker-text: #f0e6d2;

    --font-display: 'Audiowide', system-ui;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-theme: background 380ms ease, color 380ms ease, border-color 380ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; overflow: hidden; }

body {
    background: var(--bg-0);
    color: var(--text-primary);
    font-family: var(--font-mono);
    -webkit-font-smoothing: antialiased;
    transition: var(--transition-theme);
}
/* ============================================================
   BULB TOGGLE — sarkan lamba (ip çekilince yanar/söner)
   ============================================================ */
.bulb-toggle {
    position: fixed;
    top: 0; right: 24px;
    z-index: 60;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 200ms;
    transform-origin: top center;
}
.bulb-toggle:hover { transform: rotate(2deg); }
.erp-topbar .bulb-toggle { position: static; top: auto; right: auto; }

.bulb-svg { display: block; overflow: visible; transform-origin: 30px 0; }

/* İp çekilirken lamba aşağı doğru salınır */
.bulb-toggle.pulling .bulb-svg { animation: bulb-swing 0.7s cubic-bezier(.4,.2,.4,1) 1; }
@keyframes bulb-swing {
    0%   { transform: rotate(0); }
    25%  { transform: rotate(8deg); }
    55%  { transform: rotate(-5deg); }
    80%  { transform: rotate(2deg); }
    100% { transform: rotate(0); }
}

/* İp çekilme: knot aşağı sarkar */
.bulb-toggle .bulb-string,
.bulb-toggle .bulb-knot { transition: transform 280ms cubic-bezier(.5,0,.5,1); }
.bulb-toggle.pulling .bulb-string { transform: scaleY(1.4); transform-origin: top; }
.bulb-toggle.pulling .bulb-knot { transform: translateY(8px); }

/* Renkler */
.bulb-cord     { stroke: #555; }
.bulb-string   { stroke: #777; }
.bulb-knot     { fill: #ffaa3d; }
.bulb-cap      { fill: #666; }
.bulb-glass    { fill: #2a2735; stroke: #555; stroke-width: 1; transition: fill 320ms, stroke 320ms; }
.bulb-filament { stroke: #444; transition: stroke 320ms, filter 320ms; }
.bulb-glow     { fill: var(--amber-bright); opacity: 0; transition: opacity 360ms; filter: blur(10px); }

/* AÇIK (dark modda lamba yanıyor) */
.bulb-toggle.on .bulb-glass    { fill: #fff4c2; stroke: #d8a116; }
.bulb-toggle.on .bulb-filament { stroke: #ff6b1a; filter: drop-shadow(0 0 4px #ffaa3d); }
.bulb-toggle.on .bulb-glow     { opacity: 0.9; animation: bulb-pulse 2s ease-in-out infinite; }
@keyframes bulb-pulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
}

/* KAPALI (light modda sönük) */
.bulb-toggle.off .bulb-glass    { fill: #d8d4c8; stroke: #888; }
.bulb-toggle.off .bulb-filament { stroke: #888; }
.bulb-toggle.off .bulb-glow     { opacity: 0; }

/* Müzik notası */
.music-note {
    display: inline-block;
    color: var(--amber);
    font-size: 16px;
    margin-left: 4px;
    animation: note-dance 1.6s ease-in-out infinite;
}
@keyframes note-dance {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50%      { transform: rotate(8deg)  translateY(-3px); }
}

/* Ortalama yardımcıları */
.card-h1.centered { justify-content: center; text-align: center; }
.card-sub.centered { text-align: center; }
.entra-signin.centered { justify-content: center; }
.entra-signin.centered .entra-label { flex: 0; text-align: center; }


/* ============================================================
   STAGE
   ============================================================ */
.stage {
    position: relative;
    width: 100vw; height: 100vh;
    background:
        radial-gradient(ellipse at 50% 120%, var(--bg-1) 0%, var(--bg-0) 60%),
        var(--bg-0);
    overflow: hidden;
    transition: filter 800ms ease, var(--transition-theme);
    filter: brightness(0.95) saturate(0.85);
}
.stage.awake { filter: brightness(1) saturate(1); }

.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%);
    opacity: 0.7;
}

.bg-aura {
    position: absolute;
    left: 50%; top: 50%;
    width: 900px; height: 900px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--bg-aura-color) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 1200ms ease;
    pointer-events: none;
    mix-blend-mode: screen;
}
.stage.awake .bg-aura {
    opacity: 1;
    animation: aura-breathe 3.2s ease-in-out infinite;
}
@keyframes aura-breathe {
    0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

.scanlines {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(to bottom,
        transparent 0, transparent 2px,
        var(--scanline) 3px, var(--scanline) 3px);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.scene {
    position: relative;
    width: 100%; height: 100%;
    display: grid; place-items: center;
}

/* ============================================================
   SPEAKER
   ============================================================ */
.speaker {
    position: relative;
    appearance: none; border: 0; background: transparent;
    cursor: pointer; padding: 0;
    transform: translateY(0);
    transition: transform 900ms cubic-bezier(.2,.9,.2,1);
    z-index: 5;
    outline: 0;
    color: var(--speaker-text);
}
.speaker:focus-visible .speaker-body {
    box-shadow: 0 0 0 3px var(--cyan-soft), 0 30px 60px -10px rgba(0,0,0,0.5);
}
.stage.awake .speaker { transform: translateY(-180px) scale(0.78); }

.speaker-body {
    position: relative; display: block;
    width: 360px;
    padding: 28px 26px 22px;
    border-radius: 26px;
    background: linear-gradient(180deg, var(--speaker-shell-2) 0%, var(--speaker-shell) 100%);
    border: 1px solid var(--speaker-trim);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5),
        0 30px 60px -10px rgba(0,0,0,0.4),
        0 12px 22px -8px rgba(0,0,0,0.3);
}
.speaker-body::after {
    content: "";
    position: absolute; left: 16px; right: 16px; bottom: 16px;
    height: 18px;
    border-radius: 6px;
    background: repeating-linear-gradient(90deg,
        #3a2517 0px, #4a3020 3px, #3a2517 6px, #2e1d11 9px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.4);
    opacity: 0.85;
}

.speaker-base {
    display: block;
    width: 180px; height: 12px;
    margin: 6px auto 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #15131c, #07070b);
    box-shadow: 0 18px 22px -10px rgba(0,0,0,0.5);
}

.brand {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.42em;
    color: var(--speaker-text);
    opacity: 0.65;
    text-align: center;
    margin-bottom: 14px;
}
.stage.awake .brand { color: var(--amber-bright); opacity: 1; }

.led-strip { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.led {
    width: 24px; height: 8px;
    border-radius: 2px;
    background: #2a1810;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: background 200ms ease, box-shadow 200ms ease;
}
.speaker.playing .led { animation: led-vu 0.9s ease-in-out infinite; }
.speaker.playing .led.l1 { animation-delay: 0s;    background: var(--amber);        box-shadow: 0 0 10px var(--amber); }
.speaker.playing .led.l2 { animation-delay: 0.08s; background: var(--amber);        box-shadow: 0 0 10px var(--amber); }
.speaker.playing .led.l3 { animation-delay: 0.16s; background: var(--amber-bright); box-shadow: 0 0 12px var(--amber-bright); }
.speaker.playing .led.l4 { animation-delay: 0.24s; background: var(--amber);        box-shadow: 0 0 10px var(--amber); }
.speaker.playing .led.l5 { animation-delay: 0.32s; background: var(--amber);        box-shadow: 0 0 10px var(--amber); }
@keyframes led-vu { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.cone {
    position: relative; display: grid; place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #2a2735 0%, #14131c 60%, #08080d 100%);
    box-shadow:
        inset 0 4px 8px rgba(0,0,0,0.7),
        inset 0 -2px 6px rgba(255,255,255,0.03),
        0 0 0 6px var(--speaker-shell),
        0 0 0 7px var(--speaker-trim);
}
.cone-big   { width: 220px; height: 220px; margin-bottom: 14px; }
.cone-small { width: 78px;  height: 78px;  margin-bottom: 16px; }
.cone::before {
    content: ""; position: absolute; inset: 8px;
    border-radius: 50%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0.8;
}
.cone-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,0.04); transition: border-color 300ms; }
.cone-big .r1 { inset: 14px; } .cone-big .r2 { inset: 36px; } .cone-big .r3 { inset: 58px; }
.cone-small .r1 { inset: 10px; }

.cone-center {
    position: relative; width: 64px; height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #4a4658 0%, #1a1820 70%);
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.08),
        inset 0 -2px 4px rgba(0,0,0,0.6),
        0 2px 6px rgba(0,0,0,0.4);
    transition: box-shadow 300ms;
}
.cone-small .cone-center { width: 22px; height: 22px; }

.speaker.playing .cone-big   { animation: cone-pump 0.42s ease-in-out infinite; }
.speaker.playing .cone-small { animation: cone-pump 0.28s ease-in-out infinite; }
@keyframes cone-pump { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }

.speaker.playing .cone-center {
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.12),
        inset 0 -2px 4px rgba(0,0,0,0.6),
        0 0 22px var(--amber-glow);
    background: radial-gradient(circle at 40% 35%, #ff8a3d 0%, #5a2410 70%);
}
.speaker.playing .cone-ring { border-color: rgba(255, 107, 26, 0.15); }

.knobs { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 4px; padding-bottom: 22px; }
.knob {
    width: 22px; height: 22px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #4a4658 0%, #1c1a26 75%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 2px rgba(0,0,0,0.6), 0 2px 3px rgba(0,0,0,0.5);
    position: relative;
}
.knob::after {
    content: ""; position: absolute; left: 50%; top: 3px;
    width: 2px; height: 6px; border-radius: 1px;
    background: var(--speaker-text); opacity: 0.6;
    transform: translateX(-50%);
}
.power-led { width: 7px; height: 7px; border-radius: 50%; background: #2a1810; transition: background 200ms, box-shadow 200ms; }
.speaker.playing .power-led { background: var(--amber-bright); box-shadow: 0 0 8px var(--amber-bright); }

.hint {
    position: absolute; left: 50%; bottom: -28px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.4em;
    color: var(--hint-blink-color);
    opacity: 0.5;
    white-space: nowrap;
    animation: hint-blink 1.6s ease-in-out infinite;
}
.stage.awake .hint { opacity: 0; }
@keyframes hint-blink { 0%,100% { opacity: 0.3; } 50% { opacity: 0.85; } }

.speaker.playing { animation: speaker-shake 0.42s ease-out 1; }
@keyframes speaker-shake {
    0%   { transform: translateY(-180px) scale(0.78) translateX(0); }
    15%  { transform: translateY(-180px) scale(0.78) translateX(-4px) rotate(-0.4deg); }
    30%  { transform: translateY(-180px) scale(0.78) translateX(4px)  rotate(0.4deg); }
    45%  { transform: translateY(-180px) scale(0.78) translateX(-3px) rotate(-0.3deg); }
    60%  { transform: translateY(-180px) scale(0.78) translateX(3px)  rotate(0.3deg); }
    75%  { transform: translateY(-180px) scale(0.78) translateX(-2px); }
    100% { transform: translateY(-180px) scale(0.78) translateX(0); }
}

.wave {
    position: absolute; left: 50%; top: 50%;
    width: 360px; height: 360px;
    border: 2px solid var(--amber);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    pointer-events: none;
}
.speaker.playing .wave-1 { animation: wave-out 1.6s ease-out infinite; }
.speaker.playing .wave-2 { animation: wave-out 1.6s ease-out 0.5s infinite; }
.speaker.playing .wave-3 { animation: wave-out 1.6s ease-out 1s   infinite; }
@keyframes wave-out {
    0%   { transform: translate(-50%, -50%) scale(0.55); opacity: 0.85; border-width: 3px; }
    100% { transform: translate(-50%, -50%) scale(1.9);  opacity: 0;    border-width: 1px; }
}

/* ============================================================
   SPEECH BUBBLE
   ============================================================ */
.bubble {
    position: absolute;
    left: calc(50% + 200px);
    top: calc(50% - 320px);
    background: var(--bubble-bg);
    padding: 14px 22px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.18em;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.4), inset 0 -2px 0 rgba(0,0,0,0.12);
    opacity: 0;
    transform: scale(0.4) rotate(-6deg);
    transform-origin: 0% 100%;
    pointer-events: none;
    z-index: 6;
}
.bubble.show {
    animation: bubble-pop 480ms cubic-bezier(.34,1.56,.64,1) forwards,
               bubble-wobble 2.6s ease-in-out 480ms infinite;
}
.bubble-text {
    background: linear-gradient(90deg, var(--bubble-text-gradient-from) 0%, var(--bubble-text-gradient-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bubble-tail {
    position: absolute; left: -10px; bottom: 14px;
    width: 22px; height: 22px;
    background: var(--bubble-bg);
    transform: rotate(45deg);
    border-radius: 4px;
    z-index: -1;
}
@keyframes bubble-pop {
    0%   { opacity: 0; transform: scale(0.3)  rotate(-10deg); }
    60%  { opacity: 1; transform: scale(1.12) rotate(2deg); }
    100% { opacity: 1; transform: scale(1)    rotate(-3deg); }
}
@keyframes bubble-wobble {
    0%,100% { transform: scale(1)    rotate(-3deg) translateY(0); }
    50%     { transform: scale(1.02) rotate(-1deg) translateY(-4px); }
}

/* ============================================================
   LOGIN CARD
   ============================================================ */
.login-card {
    position: absolute;
    left: 50%; top: calc(50% + 80px);
    transform: translate(-50%, 30px);
    width: 420px;
    padding: 28px 30px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255,255,255,0.04);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        opacity 600ms cubic-bezier(.2,.9,.2,1),
        transform 700ms cubic-bezier(.2,.9,.2,1),
        visibility 0s linear 600ms,
        background 380ms, border-color 380ms;
}
.stage.login-on .login-card {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
    transition-delay: 0s, 0s, 0s, 0s, 0s;
}

.card-head {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-bottom: 22px;
}
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--amber-bright);
    box-shadow: 0 0 8px var(--amber-bright);
    animation: dot-pulse 1.4s ease-in-out infinite;
}
@keyframes dot-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.card-title { color: var(--cyan); }
.card-id    { margin-left: auto; opacity: 0.6; }

.card-h1 {
    font-family: var(--font-display);
    font-size: 38px; line-height: 1; letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex; gap: 14px; align-items: baseline;
}
.word.accent {
    color: transparent;
    background: linear-gradient(180deg, var(--amber-bright) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.card-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 24px; letter-spacing: 0.02em; }

/* ============================================================
   ENTRA ID BUTTON (Microsoft sign-in)
   ============================================================ */
.entra-signin {
    width: 100%;
    appearance: none;
    border: 1px solid var(--entra-border);
    background: var(--entra-bg);
    color: var(--entra-text);
    padding: 14px 18px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 6px 16px -8px rgba(0,0,0,0.2);
    transition: background 180ms, transform 160ms, border-color 180ms;
    margin-bottom: 16px;
}
.entra-signin:hover {
    background: var(--entra-bg-hover);
    border-color: var(--amber);
    transform: translateY(-1px);
}
.entra-icon { display: inline-flex; flex-shrink: 0; }
.entra-label { flex: 1; text-align: left; }
.entra-signin .arrow { font-family: var(--font-mono); font-size: 18px; transition: transform 200ms; }
.entra-signin:hover .arrow { transform: translateX(4px); }

.entra-domain {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-align: center;
    margin-bottom: 4px;
}
.entra-domain .dim { color: var(--amber); margin-right: 6px; }

.entra-already-in { display: flex; flex-direction: column; gap: 10px; }
.entra-already-in .status { font-size: 12px; color: var(--cyan); font-family: var(--font-mono); }
.entra-already-in .status strong { color: var(--text-primary); font-weight: 700; }

.entra-logout-link {
    appearance: none; border: 0; background: transparent;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 160ms, border-color 160ms;
    align-self: flex-start;
    padding: 4px 0;
}
.entra-logout-link:hover { color: var(--amber); border-bottom-color: var(--amber); }

.submit {
    appearance: none; border: 0;
    background: linear-gradient(180deg, var(--amber-bright) 0%, var(--amber) 100%);
    color: #1a1a2a;
    padding: 14px 18px;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 13px; letter-spacing: 0.22em;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 8px 20px -6px var(--amber-glow), inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform 160ms, box-shadow 220ms;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -6px var(--amber-glow), inset 0 1px 0 rgba(255,255,255,0.3); }
.submit:active { transform: translateY(0); }
.submit .arrow { font-family: var(--font-mono); font-size: 18px; transition: transform 200ms; }
.submit:hover .arrow { transform: translateX(4px); }

.card-foot { margin-top: 20px; text-align: center; font-size: 11px; color: var(--text-dim); letter-spacing: 0.1em; }

/* ============================================================
   AUTH LOADING PAGE (Microsoft callback)
   ============================================================ */
.auth-loading {
    position: fixed; inset: 0;
    background: var(--bg-0);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px;
    z-index: 100;
}
.auth-spinner {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid var(--card-border);
    border-top-color: var(--amber);
    animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-msg {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.12em;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .speaker-body { width: 280px; padding: 22px 18px 16px; }
    .cone-big     { width: 170px; height: 170px; }
    .cone-small   { width: 60px;  height: 60px; }
    .wave         { width: 280px; height: 280px; }

    .stage.awake .speaker { transform: translateY(-220px) scale(0.7); }

    .login-card {
        width: calc(100vw - 32px);
        top: calc(50% + 40px);
        padding: 22px 22px 20px;
    }
    .bubble {
        left: calc(50% + 110px);
        top: calc(50% - 280px);
        font-size: 16px; padding: 10px 16px;
    }
    .card-h1 { font-size: 30px; }

    @keyframes speaker-shake {
        0%   { transform: translateY(-220px) scale(0.7) translateX(0); }
        15%  { transform: translateY(-220px) scale(0.7) translateX(-3px) rotate(-0.4deg); }
        30%  { transform: translateY(-220px) scale(0.7) translateX(3px)  rotate(0.4deg); }
        60%  { transform: translateY(-220px) scale(0.7) translateX(2px)  rotate(0.3deg); }
        100% { transform: translateY(-220px) scale(0.7) translateX(0); }
    }
}
