/* ========================================
   PunkIA - Neural Interface Styles
   Ultra-Modern Cyberpunk Design v2.0
   ======================================== */

/* ========================================
   Clean Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #030305;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-logo-clean {
    margin-bottom: 40px;
}

.logo-main-text {
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    font-weight: 700;
    color: #00f5ff;
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 30px rgba(0, 245, 255, 0.5); }
    50% { opacity: 0.8; text-shadow: 0 0 50px rgba(0, 245, 255, 0.8); }
}

.spinner-clean {
    width: 50px;
    height: 50px;
    margin: 0 auto 30px;
    position: relative;
}

.spinner-ring-clean {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 245, 255, 0.1);
    border-top-color: #00f5ff;
    border-radius: 50%;
    animation: spinClean 1s linear infinite;
}

@keyframes spinClean {
    to { transform: rotate(360deg); }
}

.loading-status-clean {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(0, 245, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

:root {
    /* Primary Neon Colors */
    --neon-cyan: #00f5ff;
    --neon-magenta: #ff00ff;
    --neon-purple: #9d00ff;
    --neon-blue: #0080ff;
    --neon-green: #00ff88;
    --neon-orange: #ff6b00;
    --neon-pink: #ff1493;
    
    /* Dark Theme - Deeper blacks */
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-tertiary: #10101a;
    --bg-card: rgba(10, 10, 20, 0.95);
    --bg-glass: rgba(8, 8, 15, 0.9);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #505068;
    
    /* Gradients */
    --gradient-neon: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    --gradient-purple: linear-gradient(135deg, var(--neon-purple), var(--neon-magenta));
    --gradient-blue: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
    --gradient-hologram: linear-gradient(135deg, rgba(0,245,255,0.1), rgba(157,0,255,0.1), rgba(255,0,255,0.1));
    --gradient-matrix: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,245,255,0.03) 2px, rgba(0,245,255,0.03) 4px);
    
    /* Glows */
    --glow-cyan: 0 0 20px var(--neon-cyan), 0 0 40px rgba(0, 245, 255, 0.4), 0 0 60px rgba(0, 245, 255, 0.2);
    --glow-magenta: 0 0 20px var(--neon-magenta), 0 0 40px rgba(255, 0, 255, 0.4), 0 0 60px rgba(255, 0, 255, 0.2);
    --glow-small: 0 0 10px currentColor, 0 0 20px currentColor;
    --glow-text: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
    
    /* Spacing */
    --nav-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    /* Matrix grid background */
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(0,245,255,0.05) 0%, transparent 50%),
        linear-gradient(rgba(0,245,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,245,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    background-position: 0 0, 0 0, 0 0;
}

/* Selection */
::selection {
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-magenta);
}

/* ========================================
   Neural Network Background
   ======================================== */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ========================================
   Auth Screen
   ======================================== */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-screen.hidden {
    display: none;
}

.auth-container {
    max-width: 450px;
    width: 90%;
    padding: 20px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

.logo-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

.logo-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    animation: rotate 8s linear infinite;
}

.logo-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.5; }
}

.logo-text {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.logo-main {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3em;
    text-shadow: var(--glow-cyan);
}

.logo-sub {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.5em;
    margin-top: 10px;
}

/* Glitch Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-magenta);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 var(--neon-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(51px, 9999px, 28px, 0); }
    10% { clip: rect(70px, 9999px, 63px, 0); }
    20% { clip: rect(37px, 9999px, 33px, 0); }
    30% { clip: rect(56px, 9999px, 89px, 0); }
    40% { clip: rect(30px, 9999px, 47px, 0); }
    50% { clip: rect(64px, 9999px, 41px, 0); }
    60% { clip: rect(26px, 9999px, 67px, 0); }
    70% { clip: rect(43px, 9999px, 16px, 0); }
    80% { clip: rect(87px, 9999px, 95px, 0); }
    90% { clip: rect(17px, 9999px, 55px, 0); }
    100% { clip: rect(58px, 9999px, 72px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    10% { clip: rect(17px, 9999px, 48px, 0); }
    20% { clip: rect(79px, 9999px, 25px, 0); }
    30% { clip: rect(33px, 9999px, 69px, 0); }
    40% { clip: rect(80px, 9999px, 95px, 0); }
    50% { clip: rect(20px, 9999px, 58px, 0); }
    60% { clip: rect(71px, 9999px, 13px, 0); }
    70% { clip: rect(12px, 9999px, 82px, 0); }
    80% { clip: rect(45px, 9999px, 36px, 0); }
    90% { clip: rect(27px, 9999px, 90px, 0); }
    100% { clip: rect(89px, 9999px, 42px, 0); }
}

/* Auth Form Container */
.auth-form-container {
    background: var(--bg-glass);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Auth Form */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
}

.title-icon {
    margin-right: 10px;
    opacity: 0.7;
}

/* Input Groups */
.input-group {
    margin-bottom: 25px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--transition-medium);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.1);
}

.input-wrapper input:focus + .input-line,
.input-wrapper input:focus ~ .input-icon {
    opacity: 1;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-neon);
    transition: var(--transition-medium);
    transform: translateX(-50%);
}

.input-wrapper input:focus + .input-line {
    width: 100%;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.7rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#strength-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--neon-cyan);
    transition: var(--transition-medium);
}

#strength-text {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
}

/* Cyber Button */
.cyber-button {
    position: relative;
    width: 100%;
    padding: 18px 30px;
    margin-top: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    overflow: hidden;
    transition: var(--transition-medium);
}

.cyber-button.primary {
    background: var(--gradient-neon);
}

.cyber-button.primary .btn-text {
    position: relative;
    z-index: 2;
    mix-blend-mode: difference;
}

.cyber-button .btn-corners span {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    transition: var(--transition-medium);
}

.cyber-button .btn-corners span:nth-child(1) {
    top: 0; left: 0;
    border-top-color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.cyber-button .btn-corners span:nth-child(2) {
    top: 0; right: 0;
    border-top-color: var(--neon-cyan);
    border-right-color: var(--neon-cyan);
}

.cyber-button .btn-corners span:nth-child(3) {
    bottom: 0; left: 0;
    border-bottom-color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.cyber-button .btn-corners span:nth-child(4) {
    bottom: 0; right: 0;
    border-bottom-color: var(--neon-cyan);
    border-right-color: var(--neon-cyan);
}

.cyber-button:hover .btn-corners span {
    width: 100%;
    height: 100%;
}

.cyber-button:hover {
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.cyber-button:active {
    transform: translateY(0);
}

.cyber-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Remember Me Checkbox */
.remember-me-group {
    margin: 15px 0;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 245, 255, 0.4);
    border-radius: 4px;
    background: rgba(0, 245, 255, 0.05);
    position: relative;
    transition: all var(--transition-fast);
}

.remember-checkbox input:checked + .checkbox-custom {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(157, 0, 255, 0.3));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid var(--neon-cyan);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.remember-checkbox input:checked + .checkbox-custom::after {
    opacity: 1;
}

.checkbox-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.remember-checkbox:hover .checkbox-custom {
    border-color: var(--neon-cyan);
}

/* Attempts Warning */
.attempts-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(255, 0, 100, 0.1);
    border: 1px solid rgba(255, 0, 100, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.8rem;
}

.attempts-warning.hidden {
    display: none;
}

.warning-icon {
    font-size: 1.2rem;
}

/* Auth Error */
.auth-error {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(255, 0, 100, 0.1);
    border: 1px solid rgba(255, 0, 100, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
}

.auth-error.hidden {
    display: none;
}

/* Auth Success */
.auth-success {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: var(--neon-green);
    font-size: 0.85rem;
    text-align: center;
}

.auth-success.hidden {
    display: none;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.cyber-label {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.label-icon {
    opacity: 0.6;
    margin-right: 5px;
}

.cyber-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--transition-medium);
}

.cyber-input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.15), inset 0 0 10px rgba(0, 245, 255, 0.05);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .cyber-input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--neon-cyan);
}

.eye-icon {
    font-size: 1rem;
}

/* Cyber Button - Updated */
.cyber-btn {
    position: relative;
    width: 100%;
    padding: 16px 30px;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    overflow: hidden;
    transition: var(--transition-medium);
}

.cyber-btn.primary {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(157, 0, 255, 0.1));
}

.cyber-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.cyber-btn:active {
    transform: translateY(0);
}

.cyber-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cyber-btn .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cyber-btn:hover .btn-glow {
    left: 100%;
}

/* Form Links */
.form-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cyber-link {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: var(--transition-fast);
}

.cyber-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.link-divider {
    color: var(--text-muted);
    opacity: 0.3;
}

/* Form Description */
.form-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

.cyber-highlight {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Verification Code Input */
.code-input-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.code-input {
    width: 50px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 10px;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
    transition: var(--transition-medium);
}

.code-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    transform: scale(1.05);
}

.code-input.filled {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.code-input.error {
    border-color: #ff6b6b;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Resend Timer */
.resend-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.resend-timer.hidden {
    display: none;
}

#resend-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ========================================
   Auth Divider & Google Sign-In
   ======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.3), transparent);
}

.divider-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

/* Google Sign-In Button - Cyberpunk Style */
.google-signin-btn {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.9), rgba(20, 20, 40, 0.8));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Orbitron', monospace;
}

.google-signin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.google-signin-btn:hover::before {
    left: 100%;
}

.google-signin-btn:hover {
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 
        0 0 30px rgba(0, 245, 255, 0.2),
        inset 0 0 20px rgba(0, 245, 255, 0.05);
    transform: translateY(-2px);
}

.google-signin-btn:active {
    transform: translateY(0);
}

.google-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    z-index: 1;
}

.google-icon {
    width: 24px;
    height: 24px;
}

.google-btn-text {
    color: var(--neon-cyan);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    z-index: 1;
}

.google-btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.1) 0%, transparent 50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.google-signin-btn:hover .google-btn-glow {
    opacity: 1;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* Google Button Loading State */
.google-signin-btn.loading {
    pointer-events: none;
}

.google-signin-btn.loading .google-btn-text {
    opacity: 0.5;
}

.google-signin-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* WebGPU-style Particle Effect on Hover */
.google-signin-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 245, 255, 0.1) 0%, transparent 5%),
        radial-gradient(circle at 80% 20%, rgba(157, 0, 255, 0.1) 0%, transparent 5%),
        radial-gradient(circle at 40% 40%, rgba(0, 245, 255, 0.05) 0%, transparent 3%),
        radial-gradient(circle at 60% 60%, rgba(157, 0, 255, 0.05) 0%, transparent 3%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.google-signin-btn:hover::after {
    opacity: 1;
}

/* Form Switcher */
.form-switcher {
    text-align: center;
    margin-top: 25px;
}

.switch-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.switch-btn span {
    color: var(--text-muted);
}

.switch-btn:hover {
    color: var(--neon-cyan);
}

.switch-btn.hidden {
    display: none;
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
}

/* ========================================
   Main App
   ======================================== */
.main-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.main-app.hidden {
    display: none;
}

/* ========================================
   Chat Sidebar
   ======================================== */
.chat-sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-glass);
    border-right: 1px solid rgba(0, 245, 255, 0.15);
    backdrop-filter: blur(20px);
    z-index: 90;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-medium), width var(--transition-medium);
}

.chat-sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.sidebar-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 0.2em;
}

.new-chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(157, 0, 255, 0.2));
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--neon-cyan);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-chat-btn:hover {
    background: var(--gradient-neon);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border: 1px solid transparent;
    position: relative;
}

.chat-item:hover {
    background: rgba(0, 245, 255, 0.08);
    border-color: rgba(0, 245, 255, 0.2);
}

.chat-item.active {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(157, 0, 255, 0.1));
    border-color: rgba(0, 245, 255, 0.3);
}

.chat-item-icon {
    font-size: 1rem;
    color: var(--neon-cyan);
    opacity: 0.7;
}

.chat-item.active .chat-item-icon {
    opacity: 1;
}

.chat-item-content {
    flex: 1;
    overflow: hidden;
}

.chat-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.chat-item-delete {
    position: absolute;
    right: 10px;
    opacity: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 0, 102, 0.2);
    border: none;
    color: #ff0066;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-item:hover .chat-item-delete {
    opacity: 1;
}

.chat-item-delete:hover {
    background: rgba(255, 0, 102, 0.4);
    transform: scale(1.1);
}

/* Chat item loading state */
.chat-item.loading {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(157, 0, 255, 0.05));
    border-color: rgba(0, 245, 255, 0.2);
}

.chat-item.loading .chat-item-date {
    color: var(--neon-cyan);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Small loading spinner for chat list */
.loading-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Retry pending button */
.retry-pending-btn {
    display: block;
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(157, 0, 255, 0.2));
    border: 1px solid rgba(0, 245, 255, 0.4);
    border-radius: 8px;
    color: var(--neon-cyan);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-pending-btn:hover {
    background: var(--gradient-neon);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
}

/* Thinking bubble */
.thinking-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px !important;
}

.thinking-animation {
    display: flex;
    gap: 6px;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: thinking-bounce 1.4s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.thinking-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Neural Thinking Icons */
.neural-icon,
.neural-thinking-icon {
    width: 28px;
    height: 28px;
}

.neural-icon .spin-slow {
    animation: spinSlow 8s linear infinite;
    transform-origin: center;
}

.neural-thinking-icon .spin-ring {
    animation: spinRing 3s linear infinite;
    transform-origin: center;
}

.neural-thinking-icon .spin-ring-reverse {
    animation: spinRing 2s linear infinite reverse;
    transform-origin: center;
}

.neural-thinking-icon .pulse-core {
    animation: pulseCore 1.5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseCore {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.toggle-sidebar {
    position: absolute;
    top: 50%;
    right: -16px;
    transform: translateY(-50%);
    width: 32px;
    height: 64px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.toggle-sidebar:hover {
    background: rgba(0, 245, 255, 0.1);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform var(--transition-medium);
}

.chat-sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.empty-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-chats-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-chats-text {
    font-size: 0.8rem;
    line-height: 1.6;
}

/* Adjust main content when sidebar is present */
.main-app .top-nav {
    left: 0;
    width: 100%;
    right: 0;
    padding-left: 0;
}

.main-app .nav-left {
    padding-left: 0;
}

.main-app .chat-container {
    margin-left: 280px;
    margin-right: 0;
    max-width: none;
}

.main-app.sidebar-collapsed .top-nav {
    left: 0;
    width: 100%;
    right: 0;
    padding-left: 0;
}

.main-app.sidebar-collapsed .nav-left {
    padding-left: 0;
}

.main-app.sidebar-collapsed .chat-container {
    margin-left: 40px;
    max-width: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(157, 0, 255, 0.2));
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--neon-cyan);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.mobile-menu-btn:hover {
    background: var(--gradient-neon);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 90;
    backdrop-filter: blur(5px);
}

.mobile-overlay.active {
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .chat-sidebar {
        width: 85%;
        max-width: 320px;
        transform: translateX(-100%);
        z-index: 200;
        pointer-events: auto;
    }
    
    .chat-sidebar.open {
        transform: translateX(0);
    }
    
    .chat-sidebar .chat-item {
        pointer-events: auto;
        cursor: pointer;
    }
    
    .chat-sidebar .new-chat-btn {
        pointer-events: auto;
        cursor: pointer;
    }
    
    .chat-sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-app .top-nav,
    .main-app .chat-container,
    .main-app.sidebar-collapsed .top-nav,
    .main-app.sidebar-collapsed .chat-container {
        left: 0;
        margin-left: 0;
    }
    
    .main-app .input-area,
    .main-app.sidebar-collapsed .input-area {
        left: 0;
    }
    
    .toggle-sidebar {
        display: none;
    }
    
    /* Nav adjustments for mobile */
    .top-nav {
        padding: 0 15px;
    }
    
    .nav-left {
        margin-left: 0 !important;
        gap: 10px !important;
    }
    
    .nav-logo .glitch-text {
        font-size: 1.2rem !important;
    }
    
    .nav-status {
        display: none;
    }
    
    .credits-display {
        padding: 6px 12px !important;
    }
    
    .credits-label {
        display: none;
    }
    
    .nav-right {
        gap: 8px !important;
    }
    
    .lang-switcher {
        display: none;
    }
    
    /* Chat container mobile */
    .chat-container {
        padding: 10px !important;
    }
    
    .message-bubble {
        max-width: 95% !important;
        padding: 12px 14px !important;
    }
    
    /* Input area mobile */
    .input-area {
        padding: 10px 15px !important;
    }
    
    .input-wrapper {
        padding: 8px 12px !important;
    }
    
    #messageInput {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Mode selector mobile */
    .mode-selector {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 5px !important;
    }
    
    .mode-btn {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
    }
    
    /* Model selector mobile */
    .model-selector-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .nav-logo .glitch-text {
        font-size: 1rem !important;
    }
    
    .credits-value {
        font-size: 0.9rem !important;
    }
    
    .mode-btn .mode-label {
        display: none;
    }
    
    .mode-btn .mode-icon {
        font-size: 1rem;
    }
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px 0 0;
    background: var(--bg-glass);
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-left {
    margin-left: 25px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo .glitch-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2em;
}

.nav-logo .glitch-text::before,
.nav-logo .glitch-text::after {
    background: transparent;
}

.nav-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-status.online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}

/* Credits Display */
.credits-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 30px;
}

.credits-icon {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    animation: pulse 2s ease-in-out infinite;
}

.credits-info {
    display: flex;
    flex-direction: column;
}

.credits-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
}

.credits-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.credits-add {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-neon);
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
}

.credits-add:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-cyan);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-btn:hover {
    border-color: var(--neon-cyan);
}

.user-avatar {
    font-size: 1.2rem;
    color: var(--neon-cyan);
}

.user-name {
    font-size: 0.8rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.user-btn:hover .dropdown-arrow {
    opacity: 1;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    animation: dropdownSlide 0.2s ease;
}

.user-dropdown.hidden {
    display: none;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.user-dropdown a:hover {
    background: rgba(0, 245, 255, 0.1);
    color: var(--neon-cyan);
}

.user-dropdown .menu-icon {
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(157, 0, 255, 0.15));
    border-radius: 6px;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
    transition: all var(--transition-fast);
}

.user-dropdown a:hover .menu-icon {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(157, 0, 255, 0.3));
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
    transform: scale(1.1);
}

.user-dropdown .logout .menu-icon {
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 100, 100, 0.5);
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.15), rgba(255, 50, 50, 0.15));
}

.user-dropdown .logout:hover .menu-icon {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.3), rgba(255, 50, 50, 0.3));
    box-shadow: 0 0 10px rgba(255, 100, 100, 0.4);
}

.user-dropdown .logout {
    color: #ff6b6b;
}

.user-dropdown .logout:hover {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* ========================================
   Chat Container
   ======================================== */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-height);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* Messages Area */
.messages-area {
    flex: 1;
    padding: 30px 20px 250px; /* Increased bottom padding for input area */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Container */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.welcome-container.hidden {
    display: none;
}

.welcome-orb {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
}

.orb-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    animation: orbRing 3s linear infinite;
}

.orb-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}

@keyframes orbRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orb-core {
    position: absolute;
    inset: 20px;
    background: radial-gradient(circle at 30% 30%, 
        var(--neon-cyan) 0%, 
        var(--neon-purple) 50%, 
        var(--neon-magenta) 100%);
    border-radius: 50%;
    animation: orbPulse 2s ease-in-out infinite;
    box-shadow: 0 0 40px var(--neon-cyan),
                0 0 80px rgba(0, 245, 255, 0.3);
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.welcome-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-title .glitch-text::before,
.welcome-title .glitch-text::after {
    background: transparent;
}

.welcome-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.welcome-stats {
    display: flex;
    gap: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

/* Message Bubble */
.message {
    display: flex;
    gap: 15px;
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.message-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: var(--gradient-neon);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, rgba(0,245,255,0.2), rgba(157,0,255,0.1));
    box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0,245,255,0.1);
}

/* 3D Skull Avatar for AI */
.skull-3d {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px rgba(0,255,136,0.6)) 
            drop-shadow(0 0 15px rgba(0,212,255,0.4))
            drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: skullFloat 3s ease-in-out infinite, skullGlow 2s ease-in-out infinite alternate;
    transform-style: preserve-3d;
    perspective: 1000px;
}

@keyframes skullFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    25% { transform: translateY(-2px) rotateY(5deg); }
    50% { transform: translateY(-4px) rotateY(0deg); }
    75% { transform: translateY(-2px) rotateY(-5deg); }
}

@keyframes skullGlow {
    0% { 
        filter: drop-shadow(0 0 8px rgba(0,255,136,0.6)) 
                drop-shadow(0 0 15px rgba(0,212,255,0.4))
                drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }
    100% { 
        filter: drop-shadow(0 0 12px rgba(255,0,255,0.7)) 
                drop-shadow(0 0 20px rgba(0,255,136,0.5))
                drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }
}

.message.assistant .message-avatar:hover .skull-3d {
    animation: skullSpin 0.8s ease-in-out;
}

@keyframes skullSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg); }
}

.message.user .message-avatar {
    background: linear-gradient(135deg, rgba(157,0,255,0.2), rgba(255,0,255,0.1));
    box-shadow: var(--glow-magenta), inset 0 0 20px rgba(255,0,255,0.1);
}

.message-content {
    max-width: 80%;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    line-height: 1.7;
    position: relative;
    overflow: hidden;
}

/* Holographic scan effect */
.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    animation: hologramScan 4s ease-in-out infinite;
}

@keyframes hologramScan {
    0%, 100% { left: -100%; }
    50% { left: 200%; }
}

.message.assistant .message-content {
    background: linear-gradient(135deg, rgba(0,245,255,0.08), rgba(10,10,20,0.95));
    border: 1px solid rgba(0, 245, 255, 0.25);
    border-bottom-left-radius: 6px;
    box-shadow: 
        0 4px 30px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 0 40px rgba(0,245,255,0.05);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(157,0,255,0.15), rgba(255,0,255,0.08));
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-bottom-right-radius: 6px;
    box-shadow: 
        0 4px 30px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 40px rgba(255,0,255,0.05);
}

/* User Image Preview */
.user-image-preview {
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(157,0,255,0.1), rgba(255,0,255,0.05));
    border: 1px solid rgba(255, 0, 255, 0.3);
    padding: 8px;
}

.user-image-preview img {
    max-width: 280px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: block;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.user-image-preview img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255,0,255,0.4);
}

.user-image-preview .image-label {
    display: block;
    font-size: 0.7rem;
    color: var(--neon-magenta);
    margin-top: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,245,255,0.3);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.image-modal-close:hover {
    color: var(--neon-magenta);
    transform: scale(1.2);
}

/* Mode Notification */
.mode-notification {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, rgba(0,245,255,0.2), rgba(157,0,255,0.2));
    border: 1px solid var(--neon-cyan);
    border-radius: 25px;
    padding: 10px 20px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0,245,255,0.3);
}

.mode-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* AI Response Notification */
.response-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(0,20,30,0.95), rgba(0,245,255,0.1));
    border: 1px solid rgba(0, 245, 255, 0.4);
    border-radius: 8px;
    padding: 12px 18px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    overflow: hidden;
}

.response-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    animation: lineGlow 1s ease-in-out infinite;
}

.response-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.response-notification .notif-icon {
    color: var(--neon-green);
    animation: iconPulse 0.5s ease-out;
}

.response-notification .notif-text {
    font-weight: 500;
}

.response-notification .notif-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    animation: lineExpand 1.5s ease-out forwards;
}

@keyframes iconPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes lineExpand {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 10px var(--neon-cyan); }
}

.message-content pre {
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,245,255,0.02));
    padding: 18px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 12px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid rgba(0,245,255,0.1);
    position: relative;
}

.message-content pre::before {
    content: 'CODE';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.6rem;
    color: var(--neon-cyan);
    opacity: 0.5;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.1em;
}

.message-content code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 245, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.88em;
    border: 1px solid rgba(0,245,255,0.1);
    color: var(--neon-cyan);
}

.message-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

/* Message Wrapper - for actions positioning */
.message-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Message Actions - Regenerate & Copy buttons */
.message-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    padding-left: 4px;
}

.message:hover .message-actions {
    opacity: 1;
}

.msg-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(0, 245, 255, 0.08);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.msg-action-btn:hover {
    background: rgba(0, 245, 255, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-1px);
}

.msg-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.msg-action-btn svg {
    flex-shrink: 0;
}

.msg-action-btn svg.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.regenerate-btn:hover {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.1);
}

.regenerate-btn:hover svg {
    stroke: var(--neon-magenta);
}

/* Translate Button */
.translate-btn {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.2);
}

.translate-btn:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(0, 255, 136, 0.15);
}

.translate-btn:hover svg {
    fill: var(--neon-green);
}

.translate-btn[data-translated="true"] {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

/* Regenerate Success Toast */
.regenerate-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 245, 255, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 10px;
    color: var(--neon-green);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    z-index: 9999;
    animation: toastSlide 0.3s ease, toastFade 0.3s ease 2.7s forwards;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

@keyframes toastSlide {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes toastFade {
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Typing Indicator - Enhanced */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 18px 24px;
    align-items: center;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: var(--gradient-neon);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    30% { 
        transform: translateY(-12px) scale(1.1);
        opacity: 1;
    }
}

/* ========================================
   Scroll to Bottom Button
   ======================================== */
.scroll-to-bottom-btn {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(157, 0, 255, 0.15));
    border: 2px solid rgba(0, 245, 255, 0.5);
    color: var(--neon-cyan);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3);
}

.scroll-to-bottom-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--neon-cyan);
    transition: all var(--transition-fast);
}

.scroll-to-bottom-btn:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(157, 0, 255, 0.3));
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateX(-50%) scale(1.1);
}

.scroll-to-bottom-btn:hover svg {
    stroke: #fff;
}

.scroll-to-bottom-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* ========================================
   Input Area - Futuristic Terminal Style
   ======================================== */
.input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 25px 20px 30px;
    background: linear-gradient(180deg, transparent 0%, rgba(5,5,8,0.98) 30%);
    z-index: 50;
}

/* Adjust input-area when sidebar is present */
.main-app .input-area {
    left: 280px;
}

.main-app.sidebar-collapsed .input-area {
    left: 40px;
}

.input-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

.input-container {
    max-width: 850px;
    margin: 0 auto;
}

/* Chat Mode Selector */
.chat-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,245,255,0.05));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0,245,255,0.1), rgba(0,0,0,0.6));
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(0,245,255,0.2), rgba(157,0,255,0.1));
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0,245,255,0.3);
}

.mode-btn .mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.mode-btn .mode-icon svg {
    transition: all var(--transition-fast);
}

.mode-btn:hover .mode-icon svg,
.mode-btn.active .mode-icon svg {
    filter: drop-shadow(0 0 4px var(--neon-cyan));
}

.mode-btn .mode-label {
    display: inline;
}

/* ========================================
   AI Model Selector
   ======================================== */
.model-selector-container {
    margin-left: auto;
}

.model-selector {
    position: relative;
}

.model-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(157,0,255,0.15), rgba(0,0,0,0.6));
    border: 1px solid rgba(157, 0, 255, 0.4);
    border-radius: 20px;
    color: var(--neon-purple);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-selector-btn:hover {
    background: linear-gradient(135deg, rgba(157,0,255,0.25), rgba(0,0,0,0.6));
    border-color: var(--neon-magenta);
    box-shadow: 0 0 15px rgba(157,0,255,0.3);
}

.model-selector-btn .model-icon {
    color: var(--neon-magenta);
    font-size: 1rem;
    text-shadow: 0 0 10px var(--neon-magenta);
}

.model-selector-btn .model-name {
    font-weight: 600;
    color: var(--text-primary);
}

.model-selector-btn .model-credits {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(0, 245, 255, 0.15);
    border-radius: 10px;
    color: var(--neon-cyan);
}

.model-selector-btn .model-arrow {
    font-size: 0.6rem;
    transition: transform var(--transition-fast);
}

.model-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: var(--bg-secondary);
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(157, 0, 255, 0.2);
    z-index: 1000;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.model-option:last-child {
    border-bottom: none;
}

.model-option:hover {
    background: linear-gradient(135deg, rgba(157,0,255,0.1), rgba(0,245,255,0.05));
}

.model-option.selected {
    background: linear-gradient(135deg, rgba(157,0,255,0.2), rgba(0,245,255,0.1));
    border-left: 3px solid var(--neon-magenta);
}

.model-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.model-option-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-option-credits {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(0, 245, 255, 0.15);
    border-radius: 10px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
}

.model-option-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.input-border {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(0,245,255,0.03), rgba(10,10,20,0.95));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: var(--radius-xl);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

/* Animated border glow */
.input-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: conic-gradient(from 0deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple), var(--neon-cyan));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: borderColorShift 4s linear infinite;
    transition: opacity var(--transition-medium);
}

.input-border:focus-within::before {
    opacity: 0.6;
}

@keyframes borderColorShift {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.input-border:focus-within {
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 40px rgba(0, 245, 255, 0.15),
        inset 0 0 20px rgba(0, 245, 255, 0.03);
}

#message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Inter', sans-serif;
    font-size: 1rem;
    resize: none;
    max-height: 150px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

#message-input::placeholder {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

#message-input:focus {
    outline: none;
}

/* File Upload Button */
.file-upload-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(157, 0, 255, 0.1));
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: var(--radius-sm);
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.file-upload-btn svg {
    stroke: currentColor;
    transition: all var(--transition-fast);
}

.file-upload-btn:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(157, 0, 255, 0.2));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    transform: scale(1.05);
}

.file-upload-btn.has-file {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 245, 255, 0.2));
    border-color: #00ff88;
    color: #00ff88;
}

.file-name-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #00ff88;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name-display:empty {
    display: none;
}

/* Drag and Drop Effect */
.input-area.drag-over::before {
    content: '📂 Solte o arquivo aqui';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 245, 255, 0.15);
    border: 2px dashed var(--neon-cyan);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--neon-cyan);
    z-index: 100;
    backdrop-filter: blur(4px);
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(0, 245, 255, 0.3); }
    50% { border-color: var(--neon-magenta); box-shadow: 0 0 20px rgba(157, 0, 255, 0.3); }
}

.send-button {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-neon);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.send-button:hover:not(:disabled)::before {
    opacity: 1;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: var(--glow-cyan);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Input processing state */
.input-border.processing {
    border-color: var(--neon-purple) !important;
    animation: processing-pulse 1.5s ease-in-out infinite;
    overflow: hidden;
    position: relative;
}

.input-border.processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(157, 0, 255, 0.2), transparent);
    animation: processing-sweep 1.5s linear infinite;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes processing-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(157, 0, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(157, 0, 255, 0.6); }
}

@keyframes processing-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#message-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-muted);
}

.send-button .send-icon {
    position: relative;
    z-index: 1;
}

.send-button.loading .send-icon {
    display: none;
}

.send-button.loading .send-loader {
    display: block;
}

.send-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    gap: 15px;
}

.input-footer .char-counter {
    transition: color 0.2s ease;
}

.input-footer .char-counter #char-count.over-limit {
    color: var(--neon-magenta);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   Modals
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-title.glitch-text::before,
.modal-title.glitch-text::after {
    background: transparent;
}

.modal-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.package-card {
    position: relative;
    padding: 25px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-medium);
}

.package-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
}

.package-card.selected {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
    box-shadow: var(--glow-cyan);
}

.package-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--gradient-neon);
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--bg-primary);
    font-family: 'Orbitron', monospace;
}

.package-credits {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.package-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.package-price {
    font-size: 1.1rem;
    font-weight: 600;
}

.package-bonus {
    font-size: 0.75rem;
    color: var(--neon-green);
    margin-top: 8px;
}

/* Checkout Section */
.checkout-section {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-align: center;
}

.payment-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* CPF Input Section */
.cpf-input-section {
    margin-bottom: 20px;
}

.cpf-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpf-input-section .cyber-input-field {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 2px;
    font-family: 'JetBrains Mono', monospace;
}

.payment-option {
    flex: 1;
    cursor: pointer;
}

.payment-option input {
    display: none;
}

.payment-option .option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.payment-option input:checked + .option-content {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.option-icon {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    margin-bottom: 5px;
}

.option-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.option-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cyber-button.full {
    width: 100%;
}

/* API Key Box */
.apikey-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 25px;
}

.apikey-box code {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    overflow-x: auto;
    white-space: nowrap;
}

.copy-btn {
    padding: 8px 15px;
    background: var(--gradient-neon);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    transform: scale(1.05);
}

/* Password Modal Styles */
.password-field-group {
    margin-bottom: 16px;
}

.password-label {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.password-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 10px;
    padding: 4px;
    transition: border-color 0.3s;
}

.password-input-wrap:focus-within {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
}

.cyber-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.cyber-input-field::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.toggle-pass-btn {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 1rem;
    border-radius: 8px;
    transition: 0.2s;
}

.toggle-pass-btn:hover {
    background: rgba(0, 245, 255, 0.15);
    color: #fff;
    filter: drop-shadow(0 0 6px var(--neon-cyan));
}

.password-error {
    background: rgba(255, 50, 50, 0.15);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff5555;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.password-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
}

.strength-fill.weak { background: #ff3333; }
.strength-fill.medium { background: #ffaa00; }
.strength-fill.strong { background: #00ff88; }

.strength-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    min-width: 50px;
}

.api-docs {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
}

.api-docs h4 {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-bottom: 15px;
}

.api-docs pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   Responsive
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .chat-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .messages-area {
        padding: 20px 15px 250px; /* Bottom padding for fixed input area */
    }
    
    .message-content {
        max-width: 85%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
    
    .top-nav {
        padding: 0 12px 0 0;
    }
    
    .nav-left {
        padding-left: 0;
    }
    
    .nav-logo .glitch-text {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }
    
    .credits-display {
        padding: 5px 12px;
        gap: 8px;
    }
    
    .credits-label {
        display: none;
    }
    
    .credits-value {
        font-size: 0.95rem;
    }
    
    .credits-add {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .user-name {
        display: none;
    }
    
    .user-btn {
        padding: 6px 10px;
    }
    
    .welcome-container {
        padding: 40px 15px;
    }
    
    .welcome-title {
        font-size: 1rem;
    }
    
    .welcome-sub {
        font-size: 0.8rem;
    }
    
    .welcome-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .welcome-orb {
        width: 80px;
        height: 80px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .logo-main {
        font-size: 2.5rem;
        letter-spacing: 0.2em;
    }
    
    .logo-sub {
        font-size: 0.6rem;
    }
    
    .auth-form-container {
        padding: 25px 18px;
        border-radius: 16px;
    }
    
    .cyber-button {
        padding: 15px 20px;
        font-size: 0.85rem;
    }
    
    .modal-content {
        padding: 25px 18px;
        width: 95%;
        border-radius: 16px;
    }
    
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .package-card {
        padding: 18px 12px;
    }
    
    .package-credits {
        font-size: 1.5rem;
    }
    
    /* Messages */
    .message {
        gap: 10px;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 14px 16px;
        font-size: 0.9rem;
        border-radius: 16px;
    }
    
    /* Input */
    .input-area {
        padding: 15px 12px 20px;
        left: 0 !important;
    }
    
    /* Scroll to Bottom Button Mobile */
    .scroll-to-bottom-btn {
        top: -50px;
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-bottom-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .input-border {
        padding: 12px 16px;
        border-radius: 20px;
    }
    
    #message-input {
        font-size: 0.95rem;
    }
    
    .send-button {
        width: 44px;
        height: 44px;
    }
    
    .input-footer {
        padding: 6px 12px 0;
        font-size: 0.65rem;
    }
    
    .security-badge-enhanced {
        font-size: 0.6rem;
        padding: 6px 12px;
    }
    
    /* Chat Mode Selector Mobile */
    .chat-mode-selector {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .mode-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
        gap: 4px;
    }
    
    .mode-btn .mode-icon {
        width: 14px;
        height: 14px;
    }
    
    .mode-btn .mode-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .mode-btn .mode-label {
        display: none;
    }
    
    /* Response Notification Mobile */
    .response-notification {
        top: 70px;
        right: 10px;
        padding: 10px 14px;
        font-size: 0.65rem;
    }
    
    .mode-btn.active .mode-label {
        display: inline;
    }
    
    /* User Image Preview Mobile */
    .user-image-preview {
        padding: 6px;
    }
    
    .user-image-preview img {
        max-width: 200px;
        max-height: 150px;
    }
    
    /* Image Modal Mobile */
    .image-modal img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
    
    /* See More Button Mobile */
    .see-more-btn {
        padding: 6px 12px;
        font-size: 0.65rem;
    }
    
    /* Message Actions Mobile */
    .message-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .msg-action-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
    }
    
    .msg-action-btn span {
        display: none;
    }
    
    /* Language Switcher Mobile */
    .lang-switcher {
        padding: 4px 8px;
    }
    
    .lang-btn {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .nav-logo .glitch-text {
        font-size: 1rem;
    }
    
    .nav-status {
        display: none;
    }
    
    .credits-display {
        padding: 4px 10px;
    }
    
    .credits-icon {
        font-size: 1rem;
    }
    
    .credits-value {
        font-size: 0.85rem;
    }
    
    .logo-main {
        font-size: 2rem;
    }
    
    .welcome-title {
        font-size: 0.9rem;
    }
    
    .message-content {
        max-width: 90%;
        padding: 12px 14px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        flex-direction: column;
    }
}

/* ========================================
   Enhanced Futuristic Effects v2.0
   ======================================== */

/* Neon Text Glow */
.neon-text {
    text-shadow: var(--glow-text);
}

/* Data Pulse Animation */
@keyframes dataPulse {
    0%, 100% { 
        opacity: 0.5;
        filter: brightness(1);
    }
    50% { 
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* Screen Flicker Effect - subtle */
@keyframes screenFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.85; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

.message:nth-child(odd) {
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1), screenFlicker 8s linear infinite;
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0,0,0,0.4);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: dataPulse 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.status-dot.processing {
    background: var(--neon-orange);
    box-shadow: 0 0 10px var(--neon-orange);
}

.status-dot.offline {
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
}

/* Holographic Card Effect */
.holo-card {
    position: relative;
    overflow: hidden;
}

.holo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.03) 45%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0.03) 55%,
        transparent 60%
    );
    transform: translateX(-100%);
    animation: holoShine 4s ease-in-out infinite;
}

@keyframes holoShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Corner Accents */
.corner-accent {
    position: relative;
}

.corner-accent::before,
.corner-accent::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-cyan);
    opacity: 0.5;
}

.corner-accent::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner-accent::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Tech Grid Lines */
.tech-grid {
    background-image: 
        linear-gradient(rgba(0,245,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,245,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Input Warning State */
.input-border.warning {
    border-color: var(--neon-orange) !important;
    animation: warningPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255,107,0,0.2); }
    50% { box-shadow: 0 0 40px rgba(255,107,0,0.4); }
}

/* Input Error State */
.input-border.error {
    border-color: #ff4444 !important;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Security Badge Enhanced */
.security-badge-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0,255,136,0.05), rgba(0,245,255,0.05));
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--neon-green);
}

.security-badge-enhanced .shield-icon {
    font-size: 1.2rem;
    animation: dataPulse 3s ease-in-out infinite;
}

/* Message timestamp */
.message-timestamp {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.message:hover .message-timestamp {
    opacity: 1;
}

/* Cyber Lines */
.cyber-lines {
    position: relative;
}

.cyber-lines::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

/* Neural Link Animation */
@keyframes neuralPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0,245,255,0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0,245,255,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0,245,255,0);
    }
}

.neural-pulse {
    animation: neuralPulse 2s infinite;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeletonWave 1.5s ease-in-out infinite;
}

@keyframes skeletonWave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tool tip cyberpunk */
.cyber-tooltip {
    position: relative;
}

.cyber-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.cyber-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* Scrollbar Enhanced */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
    border: 1px solid rgba(0,245,255,0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
}
/* ========================================
   Image Preview & File Attachment Styles
   ======================================== */
.image-preview-container {
    padding: 10px 20px;
    margin-bottom: 5px;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.image-preview img {
    display: block;
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
}

.image-preview .remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 0, 100, 0.9);
    border: 1px solid var(--neon-magenta);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
}

.image-preview:hover .remove-preview {
    opacity: 1;
}

/* ==========================================
   Collapsible Messages - See More Button
   ========================================== */
.message-content.collapsed {
    max-height: 200px !important;
    overflow: hidden !important;
    position: relative;
}

.message-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-secondary));
    pointer-events: none;
}

.message.user .message-content.collapsed::after {
    background: linear-gradient(to bottom, transparent, rgba(157, 0, 255, 0.3));
}

.see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(157, 0, 255, 0.1));
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--neon-cyan);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.see-more-btn:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(157, 0, 255, 0.2));
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-1px);
}

.see-more-btn svg {
    transition: transform var(--transition-fast);
}

/* ==========================================
   Language Switcher - Modern Cyberpunk Style
   ========================================== */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(157, 0, 255, 0.08));
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--neon-cyan);
    padding: 8px 14px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(157, 0, 255, 0.15));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3), inset 0 0 20px rgba(0, 245, 255, 0.05);
    transform: translateY(-1px);
}

.lang-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: all var(--transition-fast);
}

.lang-btn:hover .lang-icon {
    filter: drop-shadow(0 0 4px currentColor);
}

.lang-code {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.lang-arrow {
    width: 10px;
    height: 10px;
    transition: transform var(--transition-fast);
    opacity: 0.7;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown Panel */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 12, 0.98));
    border: 1px solid rgba(0, 245, 255, 0.25);
    border-radius: 14px;
    padding: 6px;
    display: none;
    z-index: 1000;
    min-width: 160px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 245, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: rgba(10, 10, 20, 0.98);
    border-left: 1px solid rgba(0, 245, 255, 0.25);
    border-top: 1px solid rgba(0, 245, 255, 0.25);
    transform: rotate(45deg);
}

.lang-dropdown.show {
    display: block;
    animation: langDropdownIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Language Option Buttons */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    border-radius: 10px;
    transition: all var(--transition-fast);
    position: relative;
}

.lang-option:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(157, 0, 255, 0.05));
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.lang-option.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--neon-cyan);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Flag Icons */
.flag-icon {
    width: 28px;
    height: 18px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.lang-option:hover .flag-icon {
    transform: scale(1.1);
}

.lang-name {
    flex: 1;
}

/* Check Icon */
.check-icon {
    width: 16px;
    height: 16px;
    opacity: 0;
    color: var(--neon-cyan);
    transition: all var(--transition-fast);
    filter: drop-shadow(0 0 4px currentColor);
}

.lang-option.active .check-icon {
    opacity: 1;
}

@keyframes langDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.remove-preview:hover {
    transform: scale(1.1);
    background: var(--neon-magenta);
}

/* Clear file button in file name display */
.clear-file-btn {
    margin-left: 8px;
    color: var(--neon-magenta);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition-fast);
}

.clear-file-btn:hover {
    color: #ff0066;
    text-shadow: 0 0 10px var(--neon-magenta);
}

/* Input area with drag over */
.input-area.drag-over {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 245, 255, 0.1) !important;
}

/* File name display styling */
#file-name-display {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin-bottom: 5px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#file-name-display:empty {
    display: none;
}