/* chat.css - Extracted from pages\chat.html */

/* === From pages\chat.html === */
:root {
--scrollbar: rgba(255,255,255,0.05);
--scrollbar-hover: rgba(255,255,255,0.1);
--neon-emerald: #00ff00;
--neon-cyan: #22d3ee;
--neon-purple: #a78bfa;
--neon-pink: #f472b6;
--glass-bg: rgba(255,255,255,0.03);
--glass-border: rgba(255,255,255,0.06);
--glass-hover: rgba(255,255,255,0.06);
--input-gradient: linear-gradient(135deg, rgba(0,255,0,0.08), rgba(34,211,238,0.04), rgba(167,139,250,0.06));
--msg-user-bg: linear-gradient(135deg, rgba(0,255,0,0.06), rgba(34,211,238,0.03));
--msg-ai-bg: linear-gradient(135deg, rgba(167,139,250,0.04), rgba(0,255,0,0.02));
--glow-emerald: 0 0 20px rgba(0,255,0,0.15), 0 0 40px rgba(0,255,0,0.05);
}
html, body { touch-action: pan-x pan-y; }
button, input, textarea, select, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover:none){.group .group-hover\:opacity-100,.group .group-focus-within\:opacity-100{opacity:1!important}.group .group-hover\:opacity-0{opacity:0!important}}
.group:hover .group-hover\:opacity-100,.group:focus-within .group-hover\:opacity-100,.group:focus-within .group-focus-within\:opacity-100{opacity:1!important}
#message-container{scroll-padding-bottom:24px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overflow-y:auto;flex:1 1 0%;min-height:0;scroll-behavior:smooth}

#chat-app::before {
content: '';
position: fixed;
inset: 0;
background:
  radial-gradient(ellipse at 15% 20%, rgba(0,255,0,0.08) 0%, transparent 55%),
  radial-gradient(ellipse at 85% 30%, rgba(34,211,238,0.05) 0%, transparent 45%),
  radial-gradient(ellipse at 50% 80%, rgba(167,139,250,0.05) 0%, transparent 50%),
  radial-gradient(ellipse at 20% 70%, rgba(244,114,182,0.03) 0%, transparent 40%),
  radial-gradient(ellipse at 80% 80%, rgba(0,255,0,0.03) 0%, transparent 40%);
pointer-events: none;
z-index: 0;
animation: auroraShift 25s ease-in-out infinite alternate;
}
@keyframes auroraShift {
0% { transform: scale(1) rotate(0deg); opacity: 0.4; }
33% { transform: scale(1.05) rotate(0.5deg); opacity: 0.6; }
66% { transform: scale(0.97) rotate(-0.3deg); opacity: 0.7; }
100% { transform: scale(1.02) rotate(0.2deg); opacity: 0.5; }
}

@keyframes floatParticle {
0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
10% { opacity: 0.5; }
50% { opacity: 0.3; }
90% { opacity: 0.5; }
100% { transform: translateY(-10vh) scale(1.2) rotate(360deg); opacity: 0; }
}
.particle-container {
position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
position: absolute; width: 2px; height: 2px; background: rgba(0,255,0,0.3);
border-radius: 50%; animation: floatParticle 20s linear infinite;
box-shadow: 0 0 6px rgba(0,255,0,0.2);
}
.particle:nth-child(2n) { width: 1.5px; height: 1.5px; background: rgba(34,211,238,0.25); box-shadow: 0 0 6px rgba(34,211,238,0.15); animation-duration: 25s; }
.particle:nth-child(3n) { width: 3px; height: 3px; background: rgba(167,139,250,0.2); box-shadow: 0 0 8px rgba(167,139,250,0.15); animation-duration: 30s; }
.particle:nth-child(5n) { background: rgba(244,114,182,0.15); box-shadow: 0 0 8px rgba(244,114,182,0.1); animation-duration: 22s; }
.particle:nth-child(7n) { background: rgba(250,204,21,0.1); box-shadow: 0 0 6px rgba(250,204,21,0.08); animation-duration: 28s; }
.particle:nth-child(4n) { animation-delay: -5s; }
.particle:nth-child(6n) { animation-delay: -10s; }
.particle:nth-child(8n) { animation-delay: -15s; }

.grid-overlay {
position: fixed; inset: 0; pointer-events: none; z-index: 0;
background-image:
linear-gradient(rgba(0,255,0,0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,255,0,0.025) 1px, transparent 1px),
linear-gradient(rgba(34,211,238,0.01) 1px, transparent 1px),
linear-gradient(90deg, rgba(167,139,250,0.01) 1px, transparent 1px);
background-size: 60px 60px, 60px 60px, 120px 120px, 120px 120px;
animation: gridPulse 8s ease-in-out infinite alternate;
}
@keyframes gridPulse {
0% { opacity: 0.6; }
100% { opacity: 1; }
}

@keyframes messageEnter {
0% { opacity: 0; transform: translateY(12px) scale(0.96); filter: blur(2px); }
60% { transform: translateY(-2px) scale(1.005); }
100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.message-enter {
animation: messageEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-message .render-content,
.user-message > div:last-child {
background: linear-gradient(135deg, rgba(0,255,0,0.08), rgba(34,211,238,0.03)) !important;
border-color: rgba(0,255,0,0.15) !important;
box-shadow: 0 4px 24px rgba(0,255,0,0.04), inset 0 1px 0 rgba(0,255,0,0.08) !important;
}
.assistant-message .render-content,
.assistant-message > div[class*="bg-zinc-800"] {
background: linear-gradient(135deg, rgba(167,139,250,0.04), rgba(0,255,0,0.02)) !important;
border-color: rgba(167,139,250,0.1) !important;
box-shadow: 0 4px 24px rgba(167,139,250,0.03), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
.shimmer-bg {
background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(0,255,0,0.04) 50%, rgba(255,255,255,0.02) 75%);
background-size: 200% 100%;
animation: shimmer 2.5s ease-in-out infinite;
}
.shimmer-slow {
position: relative;
overflow: hidden;
}
.shimmer-slow::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, rgba(0,255,0,0.03), transparent);
background-size: 200% 100%;
animation: shimmer 3s ease-in-out infinite;
pointer-events: none;
}

.glow-border-subtle {
position: relative;
}
.glow-border-subtle::before {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
background: linear-gradient(135deg, rgba(0,255,0,0.2), rgba(34,211,238,0.12), rgba(167,139,250,0.12), rgba(244,114,182,0.08));
z-index: -1;
opacity: 0;
transition: opacity 0.4s ease;
}
.glow-border-subtle:focus-within::before,
.glow-border-subtle:hover::before {
opacity: 1;
}
.glow-border-subtle:focus-within {
box-shadow: 0 0 30px rgba(0,255,0,0.08), 0 0 60px rgba(0,255,0,0.03), 0 0 90px rgba(34,211,238,0.02);
}
.glow-border-subtle:focus-within .glow-active {
opacity: 1;
}

.holographic-text {
background: linear-gradient(135deg, #00ff00 0%, #22d3ee 30%, #a78bfa 60%, #f472b6 100%);
background-size: 300% 300%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: holographicShift 6s ease-in-out infinite;
}
@keyframes holographicShift {
0% { background-position: 0% 50%; }
25% { background-position: 50% 50%; }
50% { background-position: 100% 50%; }
75% { background-position: 50% 50%; }
100% { background-position: 0% 50%; }
}
.glow-text {
text-shadow: 0 0 20px rgba(0,255,0,0.25), 0 0 40px rgba(0,255,0,0.1), 0 0 80px rgba(0,255,0,0.04);
}

.glow-text {
text-shadow: 0 0 20px rgba(0,255,0,0.2), 0 0 40px rgba(0,255,0,0.1);
}

.custom-scrollbar::-webkit-scrollbar {
width: 3px;
height: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: var(--scrollbar);
border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-hover);
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.animate-spin {
animation: spin 1s linear infinite;
}
@keyframes spin {
100% { transform: rotate(360deg); }
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.message-enter {
animation: slideUp 0.25s ease forwards;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.step-dot {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
border: 1.5px solid currentColor;
flex-shrink: 0;
}
.step-active .step-dot {
background: rgba(0,255,0,0.3);
border-color: rgba(0,255,0,0.5);
box-shadow: 0 0 8px rgba(0,255,0,0.3);
}
.step-done .step-dot {
display: none;
}
.step-done::before {
content: '';
display: inline-block;
width: 14px;
height: 14px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
background-size: contain;
background-repeat: no-repeat;
flex-shrink: 0;
}
.progress-step {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
border-radius: 12px;
border: 1px solid;
padding: 8px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
transition: all .2s;
min-height: 52px;
justify-content: center;
}
.step-inactive {
border-color: rgba(255,255,255,0.05);
background: rgba(0,0,0,0.2);
color: rgb(113,113,122);
}
.step-active {
border-color: rgba(0,255,0,0.2);
background: rgba(255,255,255,0.05);
color: white;
}
.step-done {
border-color: rgba(0,255,0,0.3);
background: rgba(0,255,0,0.1);
color: rgb(110,231,183);
}
.typing-cursor {
display: inline-block;
width: 7px;
height: 18px;
background: linear-gradient(180deg, #00ff00, #22d3ee);
margin-left: 3px;
vertical-align: middle;
animation: blink 0.8s step-end infinite;
border-radius: 3px;
box-shadow: 0 0 15px #00ff00, 0 0 30px rgba(0,255,0,0.3);
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.1; }
}
.search-mode-btn, .reasoning-mode-btn, .toolbar-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 9999px;
border: 1px solid rgba(255,255,255,0.05);
font-size: 10px;
color: rgb(113,113,122);
transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
cursor: pointer;
background: transparent;
white-space: nowrap;
position: relative;
overflow: hidden;
}
.search-mode-btn::after, .reasoning-mode-btn::after, .toolbar-btn::after {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at center, rgba(0,255,0,0.1), transparent 70%);
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
}
.search-mode-btn:hover::after, .reasoning-mode-btn:hover::after, .toolbar-btn:hover::after {
opacity: 1;
}
.reasoning-mode-btn[data-active="1"] {
color: #33ff33;
border-color: rgba(0,255,0,0.3);
box-shadow: 0 0 15px rgba(0,255,0,0.06);
}
.render-content a {
color: #33ff33;
text-decoration: underline;
text-underline-offset: 2px;
}
.render-content code {
background: rgba(255,255,255,0.08);
padding: 2px 7px;
border-radius: 5px;
color: #f0c674;
font-size: 13px;
font-family: 'JetBrains Mono', 'Fira Code', monospace;
border: 1px solid rgba(255,255,255,0.07);
}
.render-content pre code {
background: none;
padding: 0;
border: none;
color: #d4d4d4;
font-size: 13px;
line-height: 1.7;
}
.render-content pre {
padding: 16px 20px;
margin: 0;
overflow-x: auto;
font-size: 13px;
line-height: 1.7;
background: #1a1a2e;
color: #d4d4d4;
}
.code-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: #16162a;
border-bottom: 1px solid rgba(255,255,255,0.04);
}
.code-lang {
font-size: 11px;
font-weight: 600;
padding: 3px 10px;
border-radius: 6px;
color: #818cf8;
background: rgba(129,140,248,0.12);
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0.02em;
text-transform: lowercase;
}
.code-copy-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
border-radius: 6px;
font-size: 11px;
color: #71717a;
background: transparent;
border: none;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
font-family: inherit;
position: relative;
}
.code-copy-btn:hover {
color: #e4e4e7;
background: rgba(255,255,255,0.08);
}
.code-copy-btn:active {
transform: scale(0.95);
}
.code-copy-btn.copied {
color: #33ff33;
text-shadow: 0 0 10px rgba(0,255,0,0.3);
}
.render-content strong {
color: white;
font-weight: 600;
}
.render-content em {
color: rgba(167,243,208,0.8);
font-style: italic;
}
.render-content h1 {
font-size: 24px;
font-weight: 700;
color: white;
margin: 32px 0 16px;
letter-spacing: -0.02em;
}
.render-content h2 {
font-size: 20px;
font-weight: 700;
color: white;
margin: 28px 0 12px;
border-bottom: 1px solid rgba(255,255,255,0.1);
padding-bottom: 8px;
}
.render-content h3 {
font-size: 18px;
font-weight: 700;
color: white;
margin: 20px 0 8px;
}
.render-content blockquote {
border-left: 2px solid rgba(0,255,0,0.6);
padding-left: 12px;
color: rgba(212,212,216,0.9);
font-style: italic;
background: rgba(255,255,255,0.03);
border-radius: 0 8px 8px 0;
padding: 4px 12px;
margin: 8px 0;
}
.render-content ul, .render-content ol {
margin: 8px 0 8px 20px;
padding: 0;
}
.render-content li {
color: rgb(212,212,216);
padding-left: 4px;
margin: 2px 0;
}
.render-content ul { list-style: disc; }
.render-content ul li::marker { color: #00ff00; }
.render-content ol { list-style: decimal; }
.render-content ol li::marker { color: rgb(113,113,122); }
.render-content p { margin: 4px 0; word-break: break-word; }
.glow-text { text-shadow: 0 0 20px rgba(0,255,0,0.3), 0 0 60px rgba(0,255,0,0.1); }
.render-content h1, .render-content h2, .render-content h3 {
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 60%, rgba(0,255,0,0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.toast-enter { animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes toastIn {
0% { opacity: 0; transform: translateX(30px) scale(0.9); filter: blur(4px); }
100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
.toast-exit { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut {
0% { opacity: 1; transform: translateX(0) scale(1); }
100% { opacity: 0; transform: translateX(20px) scale(0.95); }
}
select option { background: #18181b; color: white; }
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0,255,0,0.03);
}
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse-anim {
    animation: pulse 2s ease-in-out infinite;
}
button:active:not(:disabled) {
transform: scale(0.95);
}
#send-btn:not(.cursor-not-allowed):hover {
box-shadow: 0 0 25px rgba(0,255,0,0.15);
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0,255,0,0.3), rgba(34,211,238,0.2), rgba(167,139,250,0.2));
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0,255,0,0.5), rgba(34,211,238,0.3), rgba(167,139,250,0.3));
}
::-webkit-scrollbar-corner {
    background: transparent;
}
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
button, input, textarea, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
  .search-mode-btn:hover, .reasoning-mode-btn:hover, .toolbar-btn:hover {
    color: #00ff00;
    border-color: rgba(0,255,0,0.3);
  }
  .render-content a:hover { color: #66ff66; }
}

.thinking-status-badge {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid;
    transition: all 0.25s ease;
    cursor: pointer;
    background: transparent;
}
.thinking-status-badge.thinking-on {
    color: #15803d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.thinking-status-badge.thinking-on .status-dot {
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}
.thinking-status-badge.thinking-off {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.thinking-status-badge.thinking-off .status-dot {
    background: #94a3b8;
    animation: none;
}
.thinking-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}


.toggle-switch {
    width: 36px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
}
.toggle-switch.active {
    background: var(--accent, #4f46e5);
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch.active::after {
    transform: translateX(16px);
}

