/* ========================================
   SORA.DAY - Candy-Bright Terminal UI
   ======================================== */

:root {
    /* Color Palette - Candy-Bright */
    --color-deep-twilight: #1a1a2e;
    --color-midnight-layer: #16213e;
    --color-hot-coral: #ff6b6b;
    --color-electric-lavender: #b388ff;
    --color-sherbet-yellow: #fff176;
    --color-bubblegum-pink: #f48fb1;
    --color-mint-fizz: #80cbc4;
    --color-soft-white: #f0f0f5;
    --color-sky-wash: #e8eaf6;

    /* Typography */
    --font-display: 'Josefin Sans', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing & Layout */
    --gap-panel: 8px;
    --padding-panel: 4px;
    --border-radius-panel: 2px;
    --border-width: 1px;

    /* Animations */
    --gap-angle: 0deg;
}

/* ========================================
   BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-deep-twilight);
    color: var(--color-soft-white);
    overflow-x: hidden;
    line-height: 1.72;
}

main {
    display: flex;
    flex-direction: column;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2.6rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-electric-lavender);
    margin-bottom: 1.4em;
    text-shadow: 0 0 20px rgba(179, 136, 255, 0.15);
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-electric-lavender);
    margin-bottom: 1em;
    text-shadow: 0 0 20px rgba(179, 136, 255, 0.15);
}

p {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    margin-bottom: 1.4em;
    max-width: 65ch;
    color: var(--color-soft-white);
}

code {
    font-family: var(--font-mono);
    background-color: rgba(179, 136, 255, 0.1);
    color: var(--color-hot-coral);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.9em;
}

/* ========================================
   SPREAD LAYOUT SYSTEM
   ======================================== */

.spread {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.spread-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    position: relative;
}

/* Spread 1 - Hero/Splash */
.spread-1 {
    background: linear-gradient(180deg, var(--color-deep-twilight) 0%, var(--color-midnight-layer) 100%);
    justify-content: center;
    align-items: center;
}

.boot-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 40px;
    position: relative;
}

.boot-text {
    align-self: flex-start;
    margin-right: auto;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.4vw, 0.95rem);
    line-height: 1.8;
    letter-spacing: 0.04em;
    color: var(--color-hot-coral);
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
    opacity: 0.5;
    transition: opacity 600ms ease-out;
}

.boot-text.faded {
    opacity: 0.3;
}

.hero-title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-electric-lavender);
    text-shadow: 0 0 20px rgba(179, 136, 255, 0.15);
    line-height: 1;
    position: relative;
    z-index: 10;
}

.hero-char {
    display: inline-block;
    animation: bounceEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

@keyframes bounceEnter {
    0% {
        transform: scale(0) translateY(40px);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) translateY(-8px);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--color-soft-white);
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 800ms ease-out;
    position: relative;
    z-index: 10;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Spread 2 - Feature Spread */
.spread-2 {
    background-color: var(--color-deep-twilight);
    padding: var(--gap-panel);
}

.spread-2-grid {
    display: grid;
    grid-template:
        "content status" 1fr
        "content bubbles" 1fr
        / 3fr 2fr;
    gap: var(--gap-panel);
    width: 100%;
    height: 100%;
}

.panel-content {
    grid-area: content;
}

.panel-status {
    grid-area: status;
}

.panel-bubbles {
    grid-area: bubbles;
}

/* Spread 3 - Triptych */
.spread-3 {
    background-color: var(--color-deep-twilight);
    padding: var(--gap-panel);
}

.spread-3-grid {
    display: grid;
    grid-template-columns: 1fr 2px 1fr 2px 1fr;
    gap: 0;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

.panel-triptych-a {
    grid-column: 1;
    background-color: #1a1a2e;
}

.panel-triptych-b {
    grid-column: 3;
    background-color: #1e1e34;
}

.panel-triptych-c {
    grid-column: 5;
    background-color: #22223a;
}

.triptych-divider {
    background: linear-gradient(var(--gap-angle), var(--color-hot-coral), var(--color-sherbet-yellow));
    opacity: 0.5;
    animation: dividerPulse 6s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Spread 4 - Inverted Layout */
.spread-4 {
    background-color: var(--color-deep-twilight);
    padding: var(--gap-panel);
    flex-direction: column;
}

.spread-4-grid {
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: var(--gap-panel);
    flex: 1;
    width: 100%;
}

.sidebar-log {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-electric-lavender) var(--color-deep-twilight);
}

.sidebar-log::-webkit-scrollbar {
    width: 8px;
}

.sidebar-log::-webkit-scrollbar-track {
    background-color: var(--color-deep-twilight);
}

.sidebar-log::-webkit-scrollbar-thumb {
    background-color: var(--color-electric-lavender);
    border-radius: 4px;
}

.main-viewport {
    position: relative;
    overflow: hidden;
}

.log-content {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    color: var(--color-mint-fizz);
    opacity: 0.8;
}

.log-entry {
    padding: 6px 12px;
    border-left: 2px solid var(--color-electric-lavender);
    border-left-color: transparent;
}

.log-entry:hover {
    border-left-color: var(--color-electric-lavender);
}

/* Spread 5 - Coda */
.spread-5 {
    background: linear-gradient(180deg, var(--color-deep-twilight) 0%, var(--color-midnight-layer) 100%);
    justify-content: center;
    align-items: center;
}

.coda-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 10;
}

.coda-prompt {
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--color-hot-coral);
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
    letter-spacing: 0.04em;
}

.prompt-prefix {
    color: var(--color-hot-coral);
}

.prompt-text {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.coda-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--color-sherbet-yellow);
    opacity: 0.8;
    text-align: center;
}

/* ========================================
   PANEL STYLING
   ======================================== */

.panel {
    position: relative;
    border: var(--border-width) solid var(--color-electric-lavender);
    border-radius: var(--border-radius-panel);
    padding: var(--padding-panel);
    background-color: var(--color-midnight-layer);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: panelStagger 500ms ease-out backwards;
}

@keyframes panelStagger {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel::before,
.panel::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-electric-lavender);
    opacity: 0.4;
    pointer-events: none;
    transition: all 300ms ease-in-out;
}

.panel::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.panel::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.panel:hover::before,
.panel:hover::after {
    opacity: 0.8;
    width: 20px;
    height: 20px;
}

.panel::before {
    box-shadow: inset 0 0 0 1px rgba(179, 136, 255, 0.2);
}

.panel::after {
    box-shadow: inset 0 0 0 1px rgba(179, 136, 255, 0.2);
}

/* Scanline Overlay */
.panel::before {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(179, 136, 255, 0.03) 2px,
        rgba(179, 136, 255, 0.03) 4px
    );
    border: none;
    opacity: 1;
    z-index: 1;
}

/* Terminal Window */
.terminal-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--color-midnight-layer);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(179, 136, 255, 0.2);
    min-height: 28px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 300ms ease-in-out;
    cursor: pointer;
}

.dot-pink {
    background-color: var(--color-bubblegum-pink);
    box-shadow: 0 0 0 0 rgba(244, 143, 177, 0.3);
}

.dot-yellow {
    background-color: var(--color-sherbet-yellow);
    box-shadow: 0 0 0 0 rgba(255, 241, 118, 0.3);
}

.dot-mint {
    background-color: var(--color-mint-fizz);
    box-shadow: 0 0 0 0 rgba(128, 203, 196, 0.3);
}

.terminal-window:hover .dot {
    box-shadow: 0 0 4px currentColor;
    transform: scale(1.3);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-soft-white);
    opacity: 0.6;
    margin-left: 8px;
    flex-grow: 1;
    text-align: right;
    padding-right: 8px;
}

.panel-body {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.viewport-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    height: 100%;
}

.viewport-body ul {
    list-style: none;
    margin-left: 20px;
}

.viewport-body li {
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--color-soft-white);
}

.viewport-body li::before {
    content: '> ';
    color: var(--color-hot-coral);
    font-weight: 700;
    margin-right: 8px;
}

/* ========================================
   STATUS DISPLAY & METRICS
   ======================================== */

.status-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.4vw, 0.95rem);
    color: var(--color-mint-fizz);
    text-shadow: 0 0 8px rgba(128, 203, 196, 0.2);
}

.status-line {
    letter-spacing: 0.04em;
    display: flex;
    justify-content: space-between;
}

.stat-accent {
    color: var(--color-sherbet-yellow);
    font-weight: 700;
}

.env-metric {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-left: 2px solid var(--color-hot-coral);
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.env-label {
    color: var(--color-electric-lavender);
    font-weight: 600;
}

.env-value {
    color: var(--color-mint-fizz);
}

.protocol-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 8px;
}

.protocol-marker {
    font-family: var(--font-mono);
    color: var(--color-hot-coral);
    font-weight: 700;
    flex-shrink: 0;
}

.freq-bar {
    margin-bottom: 12px;
}

.freq-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-electric-lavender);
    margin-bottom: 4px;
    display: block;
}

.freq-indicator {
    height: 4px;
    background: linear-gradient(90deg, var(--color-hot-coral), var(--color-bubblegum-pink));
    border-radius: 2px;
}

/* ========================================
   RADAR & HUD ELEMENTS
   ======================================== */

.radar-sweep {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    margin-top: 16px;
    opacity: 0.6;
}

.radar-sweep::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--color-hot-coral) 30deg,
        transparent 120deg
    );
    opacity: 0.3;
    animation: sweep 4s linear infinite;
}

@keyframes sweep {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   BUBBLE SYSTEM
   ======================================== */

.bubble-zone {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.6),
        rgba(180, 136, 255, 0.15),
        transparent
    );
    box-shadow:
        inset 0 -4px 8px rgba(244, 143, 177, 0.2),
        0 0 12px rgba(179, 136, 255, 0.15);
    will-change: transform;
    contain: strict;
    pointer-events: none;
}

.bubble-zone-descending .bubble {
    animation: bubbleFloat-descending linear infinite;
}

.bubble {
    animation: bubbleFloat linear infinite;
}

@keyframes bubbleFloat {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0.25;
    }
    to {
        transform: translateY(-10vh) translateX(0);
        opacity: 0.25;
    }
}

@keyframes bubbleFloat-descending {
    from {
        transform: translateY(-10vh) translateX(0);
        opacity: 0.15;
    }
    to {
        transform: translateY(100vh) translateX(0);
        opacity: 0.15;
    }
}

/* ========================================
   STATUS TICKER
   ======================================== */

.status-ticker {
    height: 32px;
    background-color: var(--color-midnight-layer);
    border-top: 1px solid rgba(179, 136, 255, 0.3);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: var(--gap-panel);
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    color: var(--color-mint-fizz);
    opacity: 0.7;
    letter-spacing: 0.04em;
    padding: 0 16px;
    animation: tickerScroll linear infinite;
    animation-duration: 30s;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.status-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* ========================================
   FLOATING TERMINAL PROMPT
   ======================================== */

.floating-terminal {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 280px;
    z-index: 1000;
    pointer-events: auto;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    background-color: rgba(26, 26, 46, 0.95);
    border: 1px solid var(--color-electric-lavender);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    cursor: text;
    transition: all 300ms ease-out;
}

.terminal-prompt:hover {
    border-color: var(--color-hot-coral);
    background-color: rgba(26, 26, 46, 0.98);
}

.terminal-prompt:focus-within {
    border-color: var(--color-sherbet-yellow);
    box-shadow: 0 0 12px rgba(255, 241, 118, 0.2);
}

.prompt-prefix {
    color: var(--color-hot-coral);
    margin-right: 4px;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

.prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-soft-white);
    font-family: var(--font-mono);
    font-size: inherit;
    outline: none;
    margin: 0 4px;
    width: 100%;
}

.prompt-input::placeholder {
    color: var(--color-electric-lavender);
    opacity: 0.5;
}

.prompt-cursor {
    width: 1px;
    height: 1em;
    background-color: var(--color-hot-coral);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

.command-output {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(26, 26, 46, 0.95);
    border: 1px solid var(--color-electric-lavender);
    border-radius: 2px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-mint-fizz);
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--color-electric-lavender) transparent;
}

.command-output.visible {
    display: block;
    animation: fadeReveal 300ms ease-out;
}

@keyframes fadeReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output-line {
    padding: 4px 0;
    border-left: 2px solid transparent;
    padding-left: 8px;
    transition: border-color 300ms ease-out;
}

.output-line.command {
    color: var(--color-hot-coral);
    border-left-color: var(--color-hot-coral);
}

.output-line.response {
    color: var(--color-mint-fizz);
    border-left-color: var(--color-mint-fizz);
}

/* ========================================
   COMMAND PALETTE
   ======================================== */

.command-palette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 300ms ease-out;
}

.command-palette.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.palette-content {
    background-color: var(--color-midnight-layer);
    border: 1px solid var(--color-electric-lavender);
    border-radius: var(--border-radius-panel);
    padding: 32px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: paletteReveal 300ms ease-out;
}

@keyframes paletteReveal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.palette-content h2 {
    margin-bottom: 24px;
    color: var(--color-electric-lavender);
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: rgba(255, 107, 107, 0.05);
    border-left: 2px solid var(--color-hot-coral);
    border-radius: 2px;
    transition: all 300ms ease-out;
    cursor: pointer;
    animation: commandSlide 300ms ease-out backwards;
}

@keyframes commandSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.command-item:hover {
    background-color: rgba(255, 107, 107, 0.15);
    padding-left: 16px;
}

.command-name {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-hot-coral);
    font-size: 0.9rem;
}

.command-desc {
    font-family: var(--font-body);
    color: var(--color-mint-fizz);
    font-size: 0.85rem;
    opacity: 0.8;
}

.palette-hint {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-electric-lavender);
    opacity: 0.5;
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .spread-2-grid {
        grid-template:
            "content" 1fr
            "status" auto
            "bubbles" 1fr
            / 1fr;
    }

    .spread-3-grid {
        grid-template-columns: 1fr 2px 1fr;
    }

    .panel-triptych-c {
        display: none;
    }

    .triptych-divider:last-child {
        display: none;
    }

    .spread-4-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-log {
        max-height: 150px;
        margin-bottom: var(--gap-panel);
    }
}

@media (max-width: 768px) {
    .spread {
        min-height: auto;
    }

    .spread-2-grid,
    .spread-3-grid,
    .spread-4-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        min-height: 300px;
    }

    .boot-screen {
        padding: 40px 20px;
    }

    .floating-terminal {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .terminal-prompt {
        width: 100%;
    }

    .palette-content {
        margin: 20px;
        max-width: none;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    h1 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
    }

    p {
        font-size: clamp(0.95rem, 1.5vw, 1rem);
    }

    .terminal-titlebar {
        padding: 6px;
        min-height: 24px;
    }

    .dot {
        width: 6px;
        height: 6px;
    }

    .panel-body {
        padding: 12px;
    }

    .status-ticker {
        height: 28px;
    }

    .ticker-content {
        font-size: 0.7rem;
        padding: 0 12px;
    }
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */

a {
    color: var(--color-bubblegum-pink);
    text-decoration: none;
    position: relative;
    transition: color 300ms ease-out;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-bubblegum-pink);
    transition: width 250ms ease-out;
    transform-origin: left;
}

a:hover {
    color: var(--color-sherbet-yellow);
}

a:hover::after {
    width: 100%;
}

/* Spread transition blur effect */
.spread.blur-out {
    filter: blur(6px);
    opacity: 0.7;
    pointer-events: none;
}

.spread.blur-in {
    filter: blur(6px);
}

.spread.blur-clear {
    filter: blur(0);
    opacity: 1;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark Terminal Mode - default */
.dark-mode {
    background-color: var(--color-deep-twilight);
    color: var(--color-soft-white);
}

/* Bright Spread Mode */
.bright-mode {
    background-color: var(--color-sky-wash);
    color: var(--color-deep-twilight);
}

.bright-mode h1,
.bright-mode h2 {
    color: var(--color-deep-twilight);
}

.bright-mode p {
    color: var(--color-deep-twilight);
}

.bright-mode .panel {
    background-color: var(--color-sky-wash);
    border-color: var(--color-electric-lavender);
}

.bright-mode .panel-body {
    color: var(--color-deep-twilight);
}

.bright-mode .status-display {
    color: var(--color-deep-twilight);
}

.bright-mode .status-line {
    color: var(--color-deep-twilight);
}

/* Color shift animation */
@keyframes hueShift {
    from {
        filter: hue-rotate(0deg);
    }
    to {
        filter: hue-rotate(30deg);
    }
}

body.color-shift-active {
    animation: hueShift 1s ease-out forwards;
}

/* Sky shift animation */
@keyframes skyShift {
    0% {
        background-color: var(--color-deep-twilight);
    }
    50% {
        background-color: #64b5f6;
    }
    100% {
        background-color: var(--color-deep-twilight);
    }
}

body.sky-shift-active {
    animation: skyShift 5s ease-in-out;
}

/* Bubble density increase */
.bubble-overdrive .bubble {
    opacity: 0.4;
}

/* Typewriter effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-hot-coral);
    white-space: nowrap;
    animation: typewriter 0.75s steps(40, end);
}
