/* ========================================
   N.O.V.A. UI STYLES
   Neural Omniscient Virtual Assistant
   ======================================== */

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

:root {
    --primary: #00e5ff;
    --primary-dark: #00838f;
    --primary-glow: rgba(0, 229, 255, 0.3);
    --secondary: #7c4dff;
    --secondary-glow: rgba(124, 77, 255, 0.28);
    --accent: #ff4081;
    --bg-deep: #05070b;
    --bg-dark: #0d1117;
    --bg-card: #131925;
    --bg-elevated: #1a2230;
    --bg-input: #0d1218;
    --text-primary: #e6edf3;
    --text-secondary: #91a0b3;
    --text-dim: #576170;
    --border: rgba(84, 103, 129, 0.35);
    --border-light: rgba(123, 148, 184, 0.5);
    --success: #3fb950;
    --warning: #f4b942;
    --error: #f85149;
    --glass-bg: rgba(8, 12, 18, 0.74);
    --glass-border: rgba(91, 116, 150, 0.22);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.18);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Code", "Fira Code", "JetBrains Mono", "Consolas", monospace;
}

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#app {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: screenFadeIn 0.45s ease;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   MAIN MENU
   ========================================== */

#mainMenu {
    justify-content: center;
    align-items: center;
    background: transparent;
}

#menuParticles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.menu-content {
    text-align: center;
    z-index: 2;
    padding: 28px 22px;
}

.nova-logo {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
}

.logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring1 {
    width: 180px;
    height: 180px;
    border-color: var(--primary);
    animation: ringRotate1 8s linear infinite;
    box-shadow: 0 0 18px var(--primary-glow), inset 0 0 18px var(--primary-glow);
}

.ring2 {
    width: 140px;
    height: 140px;
    border-color: var(--secondary);
    animation: ringRotate2 6s linear infinite reverse;
    box-shadow: 0 0 12px var(--secondary-glow), inset 0 0 12px var(--secondary-glow);
}

.ring3 {
    width: 100px;
    height: 100px;
    border-color: var(--accent);
    animation: ringRotate1 4s linear infinite;
    box-shadow: 0 0 10px rgba(255, 64, 129, 0.28), inset 0 0 10px rgba(255, 64, 129, 0.28);
}

.logo-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.95) 0%, rgba(0, 10, 16, 0.9) 68%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: corePulse 2s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-shadow: 0 0 12px var(--primary);
}

@keyframes ringRotate1 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringRotate2 {
    from { transform: translate(-50%, -50%) rotate(0deg) scaleX(0.8); }
    to { transform: translate(-50%, -50%) rotate(360deg) scaleX(0.8); }
}

@keyframes corePulse {
    0%, 100% { box-shadow: 0 0 22px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 68px rgba(0, 229, 255, 0.16); }
}

.subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.version {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 38px;
    font-family: var(--font-mono);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 38px;
}

.menu-btn {
    width: 330px;
    padding: 18px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.menu-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent, rgba(0, 229, 255, 0.1), transparent 72%);
    transform: translateX(-110%);
    transition: transform 0.5s ease;
}

.menu-btn:hover::before {
    transform: translateX(110%);
}

.menu-btn:hover {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.primary-btn {
    border-color: rgba(0, 229, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(124, 77, 255, 0.08));
}

.primary-btn:hover {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(124, 77, 255, 0.14));
}

.btn-icon {
    width: 42px;
    text-align: center;
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
}

.btn-text {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.btn-sub {
    font-size: 11px;
    color: var(--text-dim);
    position: absolute;
    bottom: 6px;
    left: 82px;
    font-family: var(--font-mono);
}

.menu-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    font-size: 12px;
    font-family: var(--font-mono);
}

.stat-label {
    color: var(--text-dim);
}

.stat-value {
    color: var(--primary);
    font-weight: 700;
}

/* ==========================================
   HEADER
   ========================================== */

.conv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(8, 12, 18, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    min-height: 64px;
    z-index: 10;
}

.back-btn,
.ctrl-btn {
    background: rgba(7, 11, 16, 0.72);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: var(--font-main);
}

.back-btn {
    font-size: 14px;
    padding: 8px 14px;
}

.ctrl-btn {
    font-size: 15px;
    padding: 8px 12px;
    min-width: 44px;
}

.back-btn:hover,
.ctrl-btn:hover {
    color: var(--primary);
    border-color: rgba(0, 229, 255, 0.5);
}

.ctrl-btn.muted {
    color: var(--error);
    border-color: rgba(248, 81, 73, 0.55);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nova-status {
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 1.2px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(63, 185, 80, 0.25);
    background: rgba(63, 185, 80, 0.08);
}

.status-online {
    color: var(--success);
    border-color: rgba(63, 185, 80, 0.32);
    background: rgba(63, 185, 80, 0.08);
}

.status-thinking {
    color: var(--warning);
    border-color: rgba(244, 185, 66, 0.38);
    background: rgba(244, 185, 66, 0.08);
}

.status-speaking {
    color: var(--primary);
    border-color: rgba(0, 229, 255, 0.38);
    background: rgba(0, 229, 255, 0.09);
}

.nova-name {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
}

.header-controls {
    display: flex;
    gap: 8px;
}

/* ==========================================
   CONVERSATION LAYOUT
   ========================================== */

.conversation-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 18px;
    padding: 18px 20px 0;
}

.npc-panel {
    flex: 0 0 clamp(300px, 34vw, 420px);
    min-width: 0;
    min-height: 0;
    display: flex;
}

.npc-stage {
    position: relative;
    flex: 1;
    min-height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.16);
    background:
        radial-gradient(circle at top, rgba(0, 229, 255, 0.12), transparent 42%),
        radial-gradient(circle at bottom right, rgba(124, 77, 255, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(10, 16, 24, 0.88), rgba(4, 7, 11, 0.96));
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}

.npc-stage::before,
.npc-stage::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
    opacity: 0.35;
}

.npc-stage::before {
    background: radial-gradient(circle, rgba(0, 229, 255, 0.22), transparent 46%);
    animation: stageAura 6s ease-in-out infinite;
}

.npc-stage::after {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 229, 255, 0.08) 48%, transparent 100%);
    transform: translateY(-55%);
    animation: stageSweep 5.6s linear infinite;
    opacity: 0.2;
}

.npc-stage-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 229, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
    opacity: 0.3;
    transform: perspective(700px) rotateX(72deg) translateY(44%);
    transform-origin: bottom center;
}

.npc-viewport {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.npc-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.npc-stage-overlay {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 18px;
    pointer-events: none;
}

.npc-chip {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(5, 10, 16, 0.78);
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: var(--shadow-sm);
}

.npc-chip-label {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    letter-spacing: 1.3px;
}

.npc-chip-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.npc-caption {
    max-width: 84%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(5, 10, 16, 0.72);
    border: 1px solid rgba(124, 77, 255, 0.14);
    box-shadow: var(--shadow-sm);
}

.npc-caption-title {
    font-size: 11px;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.npc-caption-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.voice-visualizer {
    align-self: flex-end;
    display: flex;
    align-items: end;
    gap: 6px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(5, 10, 16, 0.72);
    border: 1px solid rgba(0, 229, 255, 0.14);
    box-shadow: var(--shadow-sm);
}

.voice-visualizer span {
    width: 6px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), rgba(124, 77, 255, 0.75));
    opacity: 0.35;
    transform-origin: bottom center;
    animation: equalizer 1.1s ease-in-out infinite paused;
}

.voice-visualizer span:nth-child(2) { animation-delay: 0.1s; }
.voice-visualizer span:nth-child(3) { animation-delay: 0.2s; }
.voice-visualizer span:nth-child(4) { animation-delay: 0.3s; }
.voice-visualizer span:nth-child(5) { animation-delay: 0.4s; }

.npc-stage.is-speaking {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 229, 255, 0.12);
}

.npc-stage.is-speaking .voice-visualizer span {
    opacity: 1;
    animation-play-state: running;
}

.npc-stage.is-thinking .voice-visualizer span {
    opacity: 0.7;
    animation-play-state: running;
    animation-duration: 1.8s;
}

.npc-stage.model-fallback .voice-visualizer,
.npc-stage.model-fallback .npc-chip-value {
    color: var(--warning);
}

.npc-fallback {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(82%, 280px);
    padding: 18px;
    border-radius: 20px;
    background: rgba(6, 10, 14, 0.8);
    border: 1px solid rgba(244, 185, 66, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4;
    box-shadow: var(--shadow-md);
}

.npc-fallback strong {
    color: var(--warning);
    font-size: 14px;
}

.npc-fallback span {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

@keyframes stageAura {
    0%, 100% { transform: scale(0.96); opacity: 0.25; }
    50% { transform: scale(1.04); opacity: 0.45; }
}

@keyframes stageSweep {
    from { transform: translateY(-60%); }
    to { transform: translateY(68%); }
}

@keyframes equalizer {
    0%, 100% { height: 10px; }
    30% { height: 28px; }
    60% { height: 18px; }
}

.chat-area {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 20px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    background: rgba(8, 12, 18, 0.74);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(91, 116, 150, 0.4);
    border-radius: 999px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.message {
    display: flex;
    gap: 12px;
    animation: msgSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: min(90%, 760px);
}

.message.nova {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.has-code {
    max-width: min(96%, 1080px);
}

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

.msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    border: 2px solid;
}

.nova .msg-avatar {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    border-color: rgba(0, 229, 255, 0.56);
    color: white;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.22);
}

.user .msg-avatar {
    background: linear-gradient(135deg, #2c3745, #49586a);
    border-color: rgba(91, 116, 150, 0.55);
    color: var(--text-primary);
}

.msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.msg-sender {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.msg-bubble {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    word-break: break-word;
}

.nova .msg-bubble {
    background: linear-gradient(180deg, rgba(21, 30, 43, 0.98), rgba(14, 20, 29, 0.98));
    border: 1px solid rgba(91, 116, 150, 0.35);
    border-top-left-radius: 6px;
    color: var(--text-primary);
}

.user .msg-bubble {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(124, 77, 255, 0.14));
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-top-right-radius: 6px;
    color: var(--text-primary);
}

.msg-paragraph + .msg-paragraph {
    margin-top: 12px;
}

.msg-line {
    min-height: 1.4em;
}

.msg-list-item {
    position: relative;
    padding-left: 16px;
    color: var(--text-primary);
}

.msg-list-item::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-family: var(--font-mono);
}

.inline-code {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 0.92em;
}

.code-card {
    margin-top: 14px;
    border: 1px solid rgba(91, 116, 150, 0.35);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(4, 10, 18, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-card-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
    width: 100%;
}

.copy-code-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 229, 255, 0.26);
    border-radius: 12px;
    padding: 9px 14px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(124, 77, 255, 0.12));
    color: #eafcff;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.code-card-file {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.code-card-lang {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.12);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.copy-code-btn:hover {
    border-color: rgba(0, 229, 255, 0.55);
    color: white;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.14);
}

.code-card pre {
    margin: 0;
    padding: 16px;
    overflow: auto;
    max-height: 440px;
    background: rgba(2, 6, 12, 0.96);
}

.code-card code {
    display: block;
    white-space: pre;
    color: #dff4ff;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .copy-code-btn {
        width: 100%;
        justify-content: center;
    }
}

.msg-time {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
}

.typing-indicator.hidden {
    display: none;
}

.typing-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    border: 2px solid rgba(0, 229, 255, 0.56);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(17, 25, 36, 0.98);
    border: 1px solid rgba(91, 116, 150, 0.35);
    border-radius: var(--radius-lg);
    border-top-left-radius: 6px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ==========================================
   INPUT AREA
   ========================================== */

.input-area {
    padding: 16px 20px 20px;
    background: rgba(8, 12, 18, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#userInput {
    flex: 1;
    background: rgba(10, 16, 24, 0.98);
    border: 1px solid rgba(91, 116, 150, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    resize: none;
    max-height: 120px;
    min-height: 46px;
    transition: var(--transition);
    line-height: 1.5;
}

#userInput:focus {
    outline: none;
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.16);
}

#userInput::placeholder {
    color: var(--text-dim);
}

.send-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 12px 24px rgba(0, 229, 255, 0.12);
}

.send-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--shadow-glow);
}

.send-btn:active {
    transform: scale(0.96);
}

.input-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ==========================================
   SETTINGS / ABOUT
   ========================================== */

.settings-content,
.about-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 20px;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

.setting-group {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(13, 19, 28, 0.88);
    border: 1px solid rgba(91, 116, 150, 0.24);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.setting-group h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.setting-group input[type="range"] {
    flex: 1;
    max-width: 220px;
    accent-color: var(--primary);
}

.setting-group select {
    background: rgba(10, 16, 24, 0.98);
    border: 1px solid rgba(91, 116, 150, 0.35);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
}

.setting-group input[type="checkbox"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.warning {
    color: var(--warning);
    font-size: 13px;
    margin-top: 10px;
    font-style: italic;
}

.about-content h2 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 24px;
}

.about-content h3 {
    color: var(--secondary);
    margin: 22px 0 10px;
    font-size: 17px;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.about-content li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.about-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-dim);
    font-size: 13px;
}

/* ==========================================
   THEME VARIANTS
   ========================================== */

body.theme-light {
    --bg-deep: #ecf2f9;
    --bg-dark: #ffffff;
    --bg-card: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-input: #eef3f8;
    --text-primary: #122033;
    --text-secondary: #44556b;
    --text-dim: #75859a;
    --border: rgba(140, 160, 185, 0.4);
    --border-light: rgba(140, 160, 185, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(140, 160, 185, 0.24);
}

body.theme-cyber {
    --primary: #ff0055;
    --primary-dark: #990033;
    --primary-glow: rgba(255, 0, 85, 0.28);
    --secondary: #ffdd00;
    --secondary-glow: rgba(255, 221, 0, 0.24);
    --accent: #00f5ff;
    --bg-deep: #0a000f;
    --bg-dark: #120018;
    --bg-card: #180322;
    --bg-elevated: #220030;
    --bg-input: #180322;
}

/* ==========================================
   GLOBAL SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(91, 116, 150, 0.4);
    border-radius: 999px;
}

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

@media (max-width: 1040px) {
    .conversation-layout {
        flex-direction: column;
        padding: 16px 16px 0;
    }

    .npc-panel {
        flex: 0 0 340px;
    }

    .npc-stage {
        min-height: 340px;
    }

    .chat-area {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        width: min(100%, 320px);
    }

    .menu-stats {
        flex-direction: column;
        gap: 8px;
    }

    .nova-logo {
        width: 144px;
        height: 144px;
    }

    .ring1 { width: 144px; height: 144px; }
    .ring2 { width: 112px; height: 112px; }
    .ring3 { width: 82px; height: 82px; }
    .logo-core { width: 62px; height: 62px; }
    .logo-text { font-size: 11px; }

    .conv-header {
        padding: 12px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .header-info {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .message {
        max-width: 100%;
    }

    .input-area {
        padding: 12px;
    }

    .npc-caption {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .menu-content {
        padding: 20px 14px;
    }

    .subtitle {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .btn-icon {
        width: 36px;
        font-size: 11px;
    }

    .btn-sub {
        left: 74px;
    }

    .chat-area {
        border-radius: 22px;
    }

    .msg-bubble {
        padding: 12px 14px;
        font-size: 13px;
    }

    .typing-dots {
        padding: 10px 14px;
    }
}
