:root {
    --neon-orange: #FF6B35;
    --neon-aqua: #00F5FF;
    --neon-blue: #45B7D1;
    --neon-green: #96CEB4;
    --cyber-purple: #8A2BE2;
    --dark-space: #0A0A0F;
    --deep-space: #1A1A2E;
    --void: #000000;
    --matrix: #00FF41;
    --hologram: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 107, 53, 0.3);
    --text-muted: rgba(255, 255, 255, 0.65);
}

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

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--dark-space);
    color: #fff;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
}

h1, h2, h3, .heading-font {
    font-family: 'Orbitron', sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-aqua), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Nav */
.cyber-nav {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neon-orange);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.nav-brand img {
    height: 36px;
    filter: drop-shadow(0 0 8px var(--neon-orange));
}

.nav-brand span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--neon-aqua);
    border-color: rgba(0, 245, 255, 0.3);
    background: rgba(0, 245, 255, 0.08);
}

.nav-links a.active {
    color: var(--neon-orange);
    border-color: rgba(255, 107, 53, 0.4);
    background: rgba(255, 107, 53, 0.1);
}

.nav-links a.logout {
    border-color: rgba(255, 107, 53, 0.5);
    color: var(--neon-orange);
}

.nav-user {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 8px;
}

/* Layout */
.page-wrapper {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 20px 40px;
}

.page-wrapper.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.glass-card-inner {
    padding: 32px;
}

/* Buttons */
.cyber-button {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: 2px solid var(--neon-orange);
    background: transparent;
    color: white;
    font-weight: 600;
    font-family: 'Exo 2', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
}

.cyber-button.primary {
    background: linear-gradient(45deg, var(--neon-orange), rgba(255, 107, 53, 0.4));
}

.cyber-button:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.cyber-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cyber-button.secondary {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.cyber-button.danger {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

.cyber-button.success {
    border-color: var(--neon-green);
    background: rgba(150, 206, 180, 0.15);
}

.cyber-button.block {
    width: 100%;
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    color: white;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Exo 2', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

select.form-control option {
    background: var(--deep-space);
    color: #fff;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff8a80;
}

.alert-success {
    background: rgba(150, 206, 180, 0.15);
    border: 1px solid rgba(150, 206, 180, 0.4);
    color: var(--neon-green);
}

/* Auth pages */
.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer a {
    color: var(--neon-aqua);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(0, 245, 255, 0.08));
    border-bottom: 1px solid var(--glass-border);
    padding: 28px 32px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.dashboard-header p {
    color: var(--text-muted);
}

.user-info-pill {
    display: inline-block;
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.25);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
}

.dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    background: rgba(26, 26, 46, 0.6);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

.dashboard-nav a {
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.dashboard-nav a:hover {
    color: var(--neon-aqua);
    background: rgba(0, 245, 255, 0.05);
}

.dashboard-nav a.active {
    color: var(--neon-orange);
    border-bottom-color: var(--neon-orange);
    background: rgba(255, 107, 53, 0.08);
}

.dashboard-content {
    padding: 28px 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 107, 53, 0.25);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--neon-orange);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 6px;
}

.info-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.info-panel h3 {
    color: var(--neon-aqua);
    margin-bottom: 12px;
    font-size: 1rem;
}

.info-panel ul {
    margin-left: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.info-panel strong {
    color: var(--neon-orange);
}

/* ── Chat (pantalla completa, estilo Gemini + ADEV) ── */
body.chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Nav unificada del chat */
.chat-nav {
    flex-shrink: 0;
    height: 52px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.25);
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
}

.chat-nav-inner {
    height: 100%;
    max-width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}

.chat-nav-logo img {
    height: 30px;
}

.chat-nav-logo span {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
}

.chat-nav-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.chat-nav-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    padding: 14px 16px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}

.chat-nav-tab:hover { color: rgba(255, 255, 255, 0.85); }

.chat-nav-tab.active {
    color: var(--neon-orange);
    border-bottom-color: var(--neon-orange);
}

.chat-nav-end {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.chat-nav-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.chat-nav-status.online { color: #6ee7a0; background: rgba(110, 231, 160, 0.1); }
.chat-nav-status.offline { color: #fca5a5; background: rgba(252, 165, 165, 0.1); }
.chat-nav-status.checking { color: #fcd34d; background: rgba(252, 211, 77, 0.1); }

.chat-nav-user {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.chat-nav-logout {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
}

.chat-nav-logout:hover { color: var(--neon-orange); }

/* Layout principal */
.chat-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-view[hidden] { display: none !important; }

.chat-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 0;
}

.chat-scroll::-webkit-scrollbar { width: 5px; }
.chat-scroll::-webkit-scrollbar-thumb { background: rgba(255, 107, 53, 0.25); border-radius: 4px; }

.chat-column {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Bienvenida */
.chat-hero {
    text-align: center;
    padding: 12vh 0 8vh;
}

.chat-hero h1 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 10px;
}

.chat-hero p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Burbujas */
.chat-bubble {
    margin-bottom: 24px;
}

.chat-bubble--user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-bubble--user .chat-bubble-text {
    max-width: 85%;
    background: rgba(255, 107, 53, 0.14);
    border: 1px solid rgba(255, 107, 53, 0.22);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #fff;
}

.chat-bubble--ai .chat-bubble-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.chat-bubble-time {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.22);
    margin-top: 5px;
}

.chat-bubble--user .chat-bubble-time { text-align: right; }

.chat-bubble--streaming .chat-bubble-text {
    position: relative;
}

.stream-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--neon-aqua);
    margin-left: 2px;
    vertical-align: text-bottom;
    border-radius: 1px;
    animation: stream-blink 0.8s step-end infinite;
}

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

.chat-bubble--streaming.chat-bubble--ai .chat-bubble-text {
    border-left: 2px solid rgba(0, 245, 255, 0.35);
    padding-left: 12px;
    transition: border-color 0.2s;
}

/* Chat avanzado - panel de parametros */
.adv-settings {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.adv-settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--neon-aqua);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adv-reset-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.adv-reset-btn:hover:not(:disabled) {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.adv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
}

.adv-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.adv-field--full {
    margin-top: 12px;
    grid-column: 1 / -1;
}

.adv-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adv-control input[type="range"] {
    flex: 1;
    accent-color: var(--neon-orange);
    height: 4px;
    cursor: pointer;
}

.adv-control output {
    min-width: 42px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--neon-orange);
    font-weight: 600;
}

.adv-system-prompt {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    padding: 10px 12px;
    resize: vertical;
    min-height: 52px;
}

.adv-system-prompt:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.4);
}

/* Tooltip parametro (↑) */
.param-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(0, 245, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 245, 255, 0.08);
    color: var(--neon-aqua);
    font-size: 0.65rem;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
}

.param-tip:hover,
.param-tip:focus {
    background: rgba(0, 245, 255, 0.18);
    border-color: var(--neon-aqua);
    outline: none;
}

.param-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    padding: 10px 12px;
    background: #1a1a28;
    border: 1px solid rgba(0, 245, 255, 0.35);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.param-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 245, 255, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 201;
}

.param-tip:hover::after,
.param-tip:focus::after,
.param-tip:hover::before,
.param-tip:focus::before {
    opacity: 1;
    visibility: visible;
}

/* Markdown */
.chat-bubble-text p { margin: 0 0 0.6em; }
.chat-bubble-text p:last-child { margin-bottom: 0; }
.chat-bubble-text strong { font-weight: 600; color: #fff; }
.chat-bubble-text ul, .chat-bubble-text ol { margin: 0.4em 0 0.4em 1.4em; }
.chat-bubble-text li { margin-bottom: 0.25em; }
.chat-bubble-text li::marker { color: var(--neon-orange); }
.chat-bubble-text a { color: var(--neon-aqua); }
.chat-bubble-text code:not(pre code) {
    background: rgba(0, 245, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--neon-aqua);
}
.chat-bubble-text pre {
    margin: 0.7em 0;
    border-radius: 8px;
    overflow: hidden;
    background: #14141c;
}
.chat-bubble-text pre code {
    display: block;
    padding: 14px;
    font-size: 0.83em;
    line-height: 1.5;
    overflow-x: auto;
}
.chat-bubble-text h1, .chat-bubble-text h2, .chat-bubble-text h3 {
    margin: 0.8em 0 0.35em;
    font-weight: 600;
    color: #fff;
}
.chat-bubble-text blockquote {
    border-left: 2px solid var(--neon-orange);
    padding-left: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0.5em 0;
}

/* Input fijo abajo */
.chat-input-wrap {
    flex-shrink: 0;
    padding: 16px 0 24px;
    background: linear-gradient(transparent, var(--dark-space) 30%);
}

.chat-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.28);
    border-radius: 16px;
    padding: 8px 8px 8px 16px;
}

.chat-input-box:focus-within {
    border-color: var(--neon-orange);
    box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.15);
}

.chat-input-box textarea {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    padding: 8px 0;
    max-height: 160px;
}

.chat-input-box textarea:focus { outline: none; }
.chat-input-box textarea::placeholder { color: rgba(255, 255, 255, 0.32); }
.chat-input-box textarea:disabled { opacity: 0.4; }

.chat-send-btn {
    flex-shrink: 0;
    height: 40px;
    min-width: 88px;
    padding: 0 18px;
    border: none;
    border-radius: 10px;
    background: var(--neon-orange);
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-send-btn:hover:not(:disabled) { background: #ff7f4d; }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Codigo: selector compacto a la izquierda, textarea ocupa el resto */
.chat-input-box--code .chat-lang-select {
    flex: 0 0 120px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    padding: 0 8px;
    cursor: pointer;
}

.chat-input-box--code .chat-lang-select:focus {
    outline: none;
    border-color: rgba(0, 245, 255, 0.4);
}

.chat-input-box--code .chat-lang-select option {
    background: #1a1a24;
}

.chat-input-note {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.22);
    margin-top: 8px;
}

.chat-input-note.is-active {
    color: var(--neon-aqua);
}

.img-settings {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    margin-top: 10px;
}

.img-select {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f0f0f5;
    padding: 0 10px;
    font-family: inherit;
    font-size: 0.85rem;
}

.img-select:focus {
    outline: none;
    border-color: rgba(0, 245, 255, 0.4);
}

.img-select option {
    background: #1a1a24;
}

.img-seed-input {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f0f0f5;
    padding: 0 10px;
    font-family: inherit;
    font-size: 0.85rem;
}

.img-seed-input:focus {
    outline: none;
    border-color: rgba(0, 245, 255, 0.4);
}

.img-seed-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.img-model-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.img-model-note--ok {
    color: rgba(0, 245, 255, 0.75);
}

.img-model-note--warn {
    color: rgba(255, 107, 53, 0.9);
}

.img-progress {
    margin-top: 10px;
}

.img-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.img-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--neon-orange), var(--neon-aqua));
    border-radius: 999px;
    transition: width 0.25s ease;
}

.img-progress-text {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: rgba(0, 245, 255, 0.8);
    text-align: center;
}

.img-result .chat-bubble-text {
    max-width: 100%;
}

.img-result-prompt {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.img-result-frame {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 245, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
}

.img-result-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.img-download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.35);
    color: var(--neon-orange);
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.img-download-btn:hover {
    background: rgba(255, 107, 53, 0.28);
}

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

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .message {
        max-width: 90%;
    }

    .chat-nav-inner {
        padding: 0 12px;
        gap: 10px;
    }

    .chat-nav-logo span { display: none; }

    .chat-nav-user { display: none; }

    .chat-nav-tab {
        padding: 14px 10px;
        font-size: 0.8rem;
    }

    .chat-column { padding: 0 14px; }

    .chat-input-box--code {
        flex-wrap: wrap;
    }

    .chat-input-box--code .chat-lang-select {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .chat-input-box--code textarea {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .chat-bubble--user .chat-bubble-text { max-width: 92%; }

    .adv-grid,
    .img-grid {
        grid-template-columns: 1fr;
    }

    .param-tip::after {
        max-width: 200px;
        left: auto;
        right: 0;
        transform: none;
    }

    .param-tip::before {
        left: auto;
        right: 8px;
        transform: none;
    }

    .dashboard-content,
    .glass-card-inner {
        padding: 20px;
    }
}
