/* ============================================================
   UNC Calc — style.css
   © 2026 Sanchar Koirala
   Neon · White · Capsule · Glowing · Animated PWA Theme
   ============================================================ */

/* ── View Transitions ──────────────────────────────────────── */
@view-transition {
    navigation: auto;
}

::view-transition-group(*) {
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
    animation: vt-fade-out 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
::view-transition-new(root) {
    animation: vt-fade-in  1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes vt-fade-out {
    from { opacity: 1; filter: blur(0); }
    to   { opacity: 0; filter: blur(8px); }
}
@keyframes vt-fade-in {
    from { opacity: 0; filter: blur(8px); }
    to   { opacity: 1; filter: blur(0); }
}

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Palette */
    --bg-deep:         #060b18;
    --bg-card:         rgba(10, 18, 40, 0.82);
    --bg-glass:        rgba(255, 255, 255, 0.04);
    --bg-glass-hover:  rgba(255, 255, 255, 0.09);

    --neon-cyan:       #00e5ff;
    --neon-blue:       #2979ff;
    --neon-ice:        #80d8ff;
    --neon-white:      #f0f8ff;
    --neon-glow:       rgba(0, 229, 255, 0.35);
    --neon-glow-soft:  rgba(0, 229, 255, 0.15);

    --op-color:        #00e5ff;
    --op-bg:           rgba(0, 229, 255, 0.12);
    --op-glow:         0 0 18px rgba(0, 229, 255, 0.55), 0 0 40px rgba(0, 229, 255, 0.2);

    --eq-color:        #060b18;
    --eq-bg:           linear-gradient(135deg, #00e5ff 0%, #2979ff 100%);
    --eq-glow:         0 0 25px rgba(0, 229, 255, 0.8), 0 0 60px rgba(41, 121, 255, 0.4);

    --fn-color:        rgba(255, 255, 255, 0.75);
    --fn-bg:           rgba(255, 255, 255, 0.08);

    --num-color:       #f0f8ff;
    --num-bg:          rgba(255, 255, 255, 0.06);

    --display-color:   #ffffff;
    --expr-color:      rgba(180, 220, 255, 0.55);

    /* Typography */
    --font-display:    'Space Mono', monospace;
    --font-ui:         'Outfit', sans-serif;

    /* Radii */
    --r-card:          28px;
    --r-btn:           9999px;   /* pure capsule */

    /* Shadows */
    --shadow-card:     0 24px 80px rgba(0, 0, 0, 0.7),
    0 4px 24px  rgba(0, 229, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

    /* Transitions */
    --t-fast:   0.15s ease;
    --t-med:    0.3s cubic-bezier(0.22, 1, 0.36, 1);
    --t-slow:   1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100dvh;
    background: var(--bg-deep);
    font-family: var(--font-ui);
    color: var(--neon-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* ── Particle Canvas ────────────────────────────────────────── */
#particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* ── Mesh Blobs ─────────────────────────────────────────────── */
.bg-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: blob-drift 18s ease-in-out infinite alternate;
}

.blob-1 {
    width: 55vw; height: 55vw;
    top: -15%;  left: -10%;
    background: radial-gradient(circle, #00e5ff 0%, #2979ff 60%, transparent 100%);
    animation-duration: 20s;
}

.blob-2 {
    width: 45vw; height: 45vw;
    bottom: -10%; right: -5%;
    background: radial-gradient(circle, #2979ff 0%, #00e5ff 60%, transparent 100%);
    animation-duration: 16s;
    animation-delay: -8s;
}

.blob-3 {
    width: 30vw; height: 30vw;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #80d8ff 0%, transparent 70%);
    opacity: 0.06;
    animation-duration: 24s;
    animation-delay: -12s;
}

@keyframes blob-drift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(4%, 6%) scale(1.05); }
    66%  { transform: translate(-3%, 3%) scale(0.97); }
    100% { transform: translate(2%, -4%) scale(1.03); }
}

/* ── App Shell ──────────────────────────────────────────────── */
.app-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 16px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* ── Top Bar ────────────────────────────────────────────────── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    animation: slide-down 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 0 14px var(--neon-glow);
    animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { box-shadow: 0 0 14px var(--neon-glow); }
    50%       { box-shadow: 0 0 28px var(--neon-glow), 0 0 50px rgba(0,229,255,0.12); }
}

.brand-name {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    color: var(--neon-white);
    text-shadow: 0 0 20px var(--neon-glow);
}

.brand-name em {
    font-style: normal;
    color: var(--neon-cyan);
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--r-btn);
    border: 1.5px solid rgba(0, 229, 255, 0.2);
    background: var(--bg-glass);
    color: var(--neon-ice);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    backdrop-filter: blur(10px);
}

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 16px var(--neon-glow-soft);
    transform: scale(1.08);
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: var(--op-glow);
    color: var(--neon-cyan);
}

/* ── History Panel ──────────────────────────────────────────── */
.history-panel {
    background: var(--bg-card);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--r-card);
    backdrop-filter: blur(20px);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px) scaleY(0.96);
    transform-origin: top center;
    transition:
            max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            opacity    0.45s cubic-bezier(0.22, 1, 0.36, 1),
            transform  0.45s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.3s ease;
    pointer-events: none;
}

.history-panel.open {
    max-height: 340px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    pointer-events: all;
    box-shadow: 0 8px 40px rgba(0, 229, 255, 0.1), var(--shadow-card);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 10px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.history-title {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow: 0 0 12px var(--neon-glow);
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 90, 90, 0.8);
    background: rgba(255, 80, 80, 0.07);
    border: 1px solid rgba(255, 80, 80, 0.2);
    border-radius: var(--r-btn);
    padding: 5px 12px;
    cursor: pointer;
    transition: all var(--t-fast);
    letter-spacing: 0.05em;
}

.clear-btn svg { width: 13px; height: 13px; }

.clear-btn:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.5);
    box-shadow: 0 0 14px rgba(255, 80, 80, 0.25);
    color: #ff6b6b;
}

.clear-btn:active { transform: scale(0.95); }

.clear-btn.pulse-once {
    animation: pulse-btn 0.5s ease both;
}

@keyframes pulse-btn {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.history-list {
    list-style: none;
    overflow-y: auto;
    max-height: 262px;
    padding: 8px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.2) transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.2); border-radius: 2px; }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--bg-glass);
    border: 1px solid rgba(0, 229, 255, 0.06);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    animation: item-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
    gap: 10px;
}

@keyframes item-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.history-item:hover {
    background: rgba(0, 229, 255, 0.07);
    border-color: rgba(0, 229, 255, 0.2);
    transform: translateX(3px);
}

.history-expr {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: rgba(180, 220, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.history-eq {
    font-family: var(--font-display);
    font-size: 0.88rem;
    color: var(--neon-ice);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-eq strong {
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px var(--neon-glow);
}

.history-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    font-style: italic;
}

/* ── Calculator Card ────────────────────────────────────────── */
.calculator {
    background: var(--bg-card);
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
    overflow: hidden;
    animation: calc-appear 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.1s;
    position: relative;
    transition: box-shadow var(--t-med);
}

/* Ambient top edge glow */
.calculator::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-blue), var(--neon-cyan), transparent);
    opacity: 0.6;
    animation: top-glow 3s ease-in-out infinite;
}

@keyframes top-glow {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.9; }
}

@keyframes calc-appear {
    from { opacity: 0; transform: translateY(32px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── FX: display-wrapper glow on = (no card transform/animation) ── */
.display-wrapper.display-glow-flash {
    /* Only box-shadow and background shift — compositor-safe, no repaint flash */
    transition: box-shadow 0.08s ease, background 0.08s ease;
    box-shadow:
            inset 0 0 40px rgba(0, 229, 255, 0.22),
            inset 0 0 80px rgba(0, 229, 255, 0.08);
    background: linear-gradient(
            180deg,
            rgba(0, 229, 255, 0.09) 0%,
            transparent 100%
    );
    animation: display-glow-anim 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes display-glow-anim {
    0%   { box-shadow: inset 0 0 60px rgba(0, 229, 255, 0.38), inset 0 0 100px rgba(0, 229, 255, 0.14); }
    100% { box-shadow: none; }
}

/* ── FX: display-wrapper dim-flash on C (clear) ── */
.display-wrapper.display-pulse-clear {
    animation: display-clear-anim 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes display-clear-anim {
    0%   { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%); }
    50%  { background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%); }
    100% { background: linear-gradient(180deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%); }
}

/* ── Display Area ───────────────────────────────────────────── */
.display-wrapper {
    padding: 28px 28px 18px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    background: linear-gradient(
            180deg,
            rgba(0, 229, 255, 0.03) 0%,
            transparent 100%
    );
    border-bottom: 1px solid rgba(0, 229, 255, 0.07);
    position: relative;
    overflow: hidden;
    /* Isolate compositing so FX animations never bubble up to the card */
    isolation: isolate;
    will-change: box-shadow, background;
}

.expression {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--expr-color);
    min-height: 1.4em;
    text-align: right;
    letter-spacing: 0.04em;
    transition: all var(--t-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.display {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4rem);
    color: var(--display-color);
    text-align: right;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow:
            0 0 30px rgba(255, 255, 255, 0.3),
            0 0 60px rgba(0, 229, 255, 0.15);
    transition: font-size var(--t-fast), color var(--t-fast);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.display.ripple {
    animation: ripple-text 0.18s ease both;
}

@keyframes ripple-text {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.025); }
    100% { transform: scale(1); }
}

.display.shake {
    animation: shake-err 0.45s cubic-bezier(.36,.07,.19,.97) both;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 80, 80, 0.6);
}

@keyframes shake-err {
    10%, 90%  { transform: translateX(-4px); }
    20%, 80%  { transform: translateX(6px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60%  { transform: translateX(6px); }
    100%      { transform: translateX(0); }
}

/* ── Key Grid ───────────────────────────────────────────────── */
.keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 18px;
}

/* ── Buttons — Base ─────────────────────────────────────────── */
.key-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: var(--r-btn);
    border: 1.5px solid transparent;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    cursor: pointer;
    transition:
            background   0.18s ease,
            border-color 0.18s ease,
            box-shadow   0.18s ease,
            transform    0.12s cubic-bezier(0.22, 1, 0.36, 1),
            color        0.18s ease;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* Capsule sheen line */
.key-btn::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 18%;
    width: 64%;
    height: 28%;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Pressed press ring */
.key-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: opacity 0.15s;
}

.key-btn:active::after,
.key-btn.key-pressed::after { opacity: 1; }

.key-btn:active {
    transform: scale(0.91);
}

/* SVG icons inside backspace btn */
.key-btn svg {
    width: 40%;
    height: 40%;
}

/* ── Number buttons ─────────────────────────────────────────── */
.key-num {
    background: var(--num-bg);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--num-color);
}

.key-num:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.05);
}

/* ── Operator buttons ───────────────────────────────────────── */
.key-op {
    background: var(--op-bg);
    border-color: rgba(0, 229, 255, 0.25);
    color: var(--neon-cyan);
    text-shadow: 0 0 12px var(--neon-glow);
}

.key-op:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: var(--op-glow);
    color: #fff;
}

/* ── Function buttons ───────────────────────────────────────── */
.key-fn {
    background: var(--fn-bg);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--fn-color);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.key-fn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ── Equals button ──────────────────────────────────────────── */
.key-eq {
    background: var(--eq-bg);
    border-color: transparent;
    color: var(--eq-color);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    box-shadow: var(--eq-glow);
    animation: eq-pulse 2.8s ease-in-out infinite;
}

@keyframes eq-pulse {
    0%, 100% { box-shadow: var(--eq-glow); }
    50%       {
        box-shadow:
                0 0 35px rgba(0, 229, 255, 0.95),
                0 0 80px rgba(41, 121, 255, 0.55),
                0 0 4px rgba(255,255,255,0.4) inset;
    }
}

.key-eq:hover {
    background: linear-gradient(135deg, #33eeff 0%, #4d94ff 100%);
    transform: scale(1.04);
}

/* ── Wide zero button ───────────────────────────────────────── */
.key-zero {
    grid-column: span 1;
}

/* ── Keyboard highlight ─────────────────────────────────────── */
.key-btn.key-pressed {
    transform: scale(0.91);
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 20px var(--neon-glow) !important;
}

/* ── Staggered button appear ────────────────────────────────── */
.key-btn {
    animation: btn-appear 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.keys .key-btn:nth-child(1)  { animation-delay: 0.15s; }
.keys .key-btn:nth-child(2)  { animation-delay: 0.18s; }
.keys .key-btn:nth-child(3)  { animation-delay: 0.21s; }
.keys .key-btn:nth-child(4)  { animation-delay: 0.24s; }
.keys .key-btn:nth-child(5)  { animation-delay: 0.27s; }
.keys .key-btn:nth-child(6)  { animation-delay: 0.30s; }
.keys .key-btn:nth-child(7)  { animation-delay: 0.33s; }
.keys .key-btn:nth-child(8)  { animation-delay: 0.36s; }
.keys .key-btn:nth-child(9)  { animation-delay: 0.39s; }
.keys .key-btn:nth-child(10) { animation-delay: 0.42s; }
.keys .key-btn:nth-child(11) { animation-delay: 0.45s; }
.keys .key-btn:nth-child(12) { animation-delay: 0.48s; }
.keys .key-btn:nth-child(13) { animation-delay: 0.51s; }
.keys .key-btn:nth-child(14) { animation-delay: 0.54s; }
.keys .key-btn:nth-child(15) { animation-delay: 0.57s; }
.keys .key-btn:nth-child(16) { animation-delay: 0.60s; }
.keys .key-btn:nth-child(17) { animation-delay: 0.63s; }
.keys .key-btn:nth-child(18) { animation-delay: 0.66s; }
.keys .key-btn:nth-child(19) { animation-delay: 0.69s; }
.keys .key-btn:nth-child(20) { animation-delay: 0.72s; }

@keyframes btn-appear {
    from { opacity: 0; transform: translateY(18px) scale(0.88); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    padding: 0 16px 16px;
}

.footer-inner {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: rgba(10, 18, 40, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    overflow: hidden;
    animation: footer-appear 1s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.6s;
}

@keyframes footer-appear {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Animated top glow bar */
.footer-glow-bar {
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
    transparent 0%,
    var(--neon-cyan) 30%,
    var(--neon-blue) 60%,
    var(--neon-cyan) 80%,
    transparent 100%
    );
    animation: glow-bar-sweep 3s ease-in-out infinite;
}

@keyframes glow-bar-sweep {
    0%   { opacity: 0.3; transform: scaleX(0.7); }
    50%  { opacity: 1;   transform: scaleX(1); }
    100% { opacity: 0.3; transform: scaleX(0.7); }
}

.footer-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: rgba(180, 220, 255, 0.6);
    white-space: nowrap;
}

.footer-copy strong {
    color: var(--neon-ice);
    font-weight: 700;
    text-shadow: 0 0 12px var(--neon-glow-soft);
    animation: name-glow 4s ease-in-out infinite;
}

@keyframes name-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(0,229,255,0.2); }
    50%       { text-shadow: 0 0 22px rgba(0,229,255,0.55), 0 0 40px rgba(0,229,255,0.15); }
}

.footer-copy-icon {
    color: var(--neon-cyan);
    font-size: 0.65rem;
    animation: star-spin 6s linear infinite;
    display: inline-block;
    text-shadow: 0 0 10px var(--neon-glow);
}

.footer-copy-icon:last-child {
    animation-direction: reverse;
}

@keyframes star-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Orbiting dots inside footer */
.footer-orbs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.f-orb {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--neon-cyan);
    opacity: 0.5;
    animation: orb-blink 1.8s ease-in-out infinite;
    box-shadow: 0 0 8px var(--neon-glow);
}

.f-orb:nth-child(1) { animation-delay: 0s;    background: var(--neon-cyan); }
.f-orb:nth-child(2) { animation-delay: 0.36s; background: var(--neon-ice); }
.f-orb:nth-child(3) { animation-delay: 0.72s; background: var(--neon-blue); }
.f-orb:nth-child(4) { animation-delay: 1.08s; background: var(--neon-ice); }
.f-orb:nth-child(5) { animation-delay: 1.44s; background: var(--neon-cyan); }

@keyframes orb-blink {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50%       { opacity: 1;    transform: scale(1.4); box-shadow: 0 0 14px var(--neon-glow); }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.25);
    border-radius: 2px;
}

/* ── Accessibility ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 400px) {
    .keys { gap: 7px; padding: 14px; }
    .display-wrapper { padding: 20px 20px 14px; }
}

@media (min-height: 800px) {
    .app-shell { padding-top: 24px; }
}