:root {
    /* Theme - Obsidian & Emerald Cyber Palette */
    --bg-page: #060908;
    --bg-card: rgba(13, 20, 16, 0.85);
    --bg-card-border: rgba(16, 185, 129, 0.2);
    --bg-terminal: #090d0b;
    --bg-terminal-header: #0f1713;
    
    /* Text Colors */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Emerald & Neon Accents */
    --primary-green: #10b981;
    --emerald-glow: #00ff9d;
    --emerald-dark: #047857;
    --emerald-soft: #34d399;
    
    /* Terminal Colors */
    --term-text: #e2e8f0;
    --term-error: #f43f5e;
    --term-warning: #fbbf24;
    --term-border: rgba(16, 185, 129, 0.2);

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Monaco, monospace;

    /* Radius & Transitions */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Cyber Grid Overlay */
.bg-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

/* Capa ambiental sutil de la estación de trabajo Linux */
.bg-ambient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../assets/developer-station.webp') center center / cover no-repeat;
    opacity: 0.07;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1280px;
    height: 86vh;
    min-height: 640px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(16, 185, 129, 0.12);
    overflow: hidden;
}

/* =========================================
   Panel Izquierdo: Tarjeta de Identidad (34%)
   ========================================= */
.identity-card {
    width: 34%;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    border-right: 1px solid var(--bg-card-border);
    background: linear-gradient(180deg, rgba(15, 23, 19, 0.95) 0%, rgba(9, 13, 11, 0.98) 100%);
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.identity-card::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Avatar con Halo Esmeralda */
.avatar-wrapper {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 0.85rem auto;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--emerald-glow), var(--primary-green), #0f172a);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35), 0 0 40px rgba(0, 255, 157, 0.15);
    transition: var(--transition);
}

.avatar-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.5), 0 0 60px rgba(16, 185, 129, 0.25);
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: #111a16;
}

/* Status Indicator Dot */
.status-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #090d0b;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.6);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--emerald-glow);
    border-radius: 50%;
}

.pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 255, 157, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

/* Perfil y Títulos */
.name {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, var(--emerald-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--emerald-soft);
    margin-bottom: 0.2rem;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.location {
    font-size: 0.78rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: rgba(16, 185, 129, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.icon-svg {
    stroke: var(--primary-green);
}

/* Métricas Académicas y Clave del CV */
.metrics-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.5rem 0 0.35rem 0;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: var(--transition);
}

.metric-pill:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--emerald-glow);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.metric-svg {
    stroke: var(--emerald-soft);
    flex-shrink: 0;
}

/* Tech Tags / Badges */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.65rem 0 0.5rem 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: var(--primary-green);
    color: var(--emerald-glow);
    transform: translateY(-1px);
}

.tag-omniverse {
    border-color: rgba(118, 185, 0, 0.4);
    color: #a3e635;
    background: rgba(118, 185, 0, 0.1);
}

.tag-omniverse .tag-icon-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #76b900;
    box-shadow: 0 0 6px #76b900;
}

.tag-gemini {
    border-color: rgba(0, 255, 157, 0.4);
    color: var(--emerald-glow);
    background: rgba(0, 255, 157, 0.1);
}

.tag-agentic {
    border-color: rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.08);
}

.tag-devops {
    border-color: rgba(14, 165, 233, 0.4);
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.1);
}

.tag-java {
    border-color: rgba(249, 115, 22, 0.4);
    color: #fb923c;
    background: rgba(249, 115, 22, 0.1);
}

.tag-python {
    border-color: rgba(234, 179, 8, 0.4);
    color: #facc15;
    background: rgba(234, 179, 8, 0.1);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 19, 0.8);
    color: var(--text-muted);
    border: 1px solid var(--bg-card-border);
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-btn:hover {
    transform: translateY(-2px);
    color: var(--emerald-glow);
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary-green);
    box-shadow: 0 6px 16px rgba(0, 255, 157, 0.2);
}

.card-footer {
    margin-top: 0.5rem;
}

.engine-badge {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.engine-badge strong {
    color: var(--emerald-soft);
}

/* =========================================
   Panel Derecho: Terminal Linux (66%)
   ========================================= */
/* =========================================
   Panel Derecho: Contenedor Interactivo Dual (66%)
   ========================================= */
.terminal-container,
.interactive-panel {
    width: 66%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-terminal);
    position: relative;
    border-left: none;
    overflow: hidden;
}

/* Header interactivo compartido - 3-Zone Decoupled Layout */
.terminal-header,
.interactive-header {
    background-color: var(--bg-terminal-header);
    padding: 0.75rem 1.25rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid var(--term-border);
    user-select: none;
    gap: 0.75rem;
    z-index: 10;
    min-width: 0;
    width: 100%;
}

.header-controls-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-title-center {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.header-actions,
.header-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
}

/* Identidad del Bot en Header */
.chat-header-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.header-avatar-bot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.header-avatar-bot svg {
    display: block;
    stroke: var(--emerald-glow);
}

.header-avatar-bot img,
.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bot-header-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-header-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--emerald-soft);
    font-family: var(--font-sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pulse-mini {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-glow);
    display: inline-block;
    animation: pulse-glow 1.8s infinite;
}

/* Botón Easter Egg CLI Mode */
.easteregg-cli-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 19, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.easteregg-cli-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.cli-prompt-sym {
    color: #38bdf8;
    font-weight: 700;
}

/* Botón Volver al Chat Normal */
.return-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--primary-green);
    color: var(--emerald-glow);
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.return-chat-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--emerald-glow);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.4);
    transform: translateY(-1px);
}

.window-controls {
    display: flex;
    gap: 7px;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.control-dot.close { background: #ff5f56; }
.control-dot.minimize { background: #ffbd2e; }
.control-dot.maximize { background: #27c93f; }

.control-dot:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
}

.terminal-user { color: var(--emerald-soft); }
.terminal-path { color: #38bdf8; }

.terminal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.terminal-badge.badge-nano,
.terminal-badge.badge-tier1 {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
}

.terminal-badge.badge-nano .badge-dot,
.terminal-badge.badge-tier1 .badge-dot {
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.terminal-badge.badge-nano .badge-text,
.terminal-badge.badge-tier1 .badge-text {
    color: #38bdf8;
}

.terminal-badge.badge-gemma,
.terminal-badge.badge-tier2 {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.35);
}

.terminal-badge.badge-gemma .badge-dot,
.terminal-badge.badge-tier2 .badge-dot {
    background: #c084fc;
    box-shadow: 0 0 6px #c084fc;
}

.terminal-badge.badge-gemma .badge-text,
.terminal-badge.badge-tier2 .badge-text {
    color: #c084fc;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--emerald-glow);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--emerald-glow);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.badge-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--emerald-glow);
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Selector Interactivo de Motor de IA */
.ai-selector-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ai-selector-btn {
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.3);
    outline: none;
    background: rgba(16, 185, 129, 0.12);
    font-family: inherit;
    position: relative;
}

.ai-selector-btn:hover {
    border-color: var(--emerald-glow);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.ai-selector-btn:focus-visible {
    outline: 2px solid var(--emerald-glow);
    outline-offset: 2px;
}

.badge-arrow {
    font-size: 0.65rem;
    color: var(--emerald-soft);
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.ai-selector-wrapper.is-open .badge-arrow {
    transform: rotate(180deg);
}

.ai-selector-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: rgba(10, 15, 12, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(16, 185, 129, 0.15);
    padding: 0.4rem;
    list-style: none;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    animation: fadeInDropdown 0.18s ease-out;
}

.ai-selector-menu[hidden] {
    display: none !important;
}

.ai-option-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    border: 1px solid transparent;
}

.ai-option-item:hover,
.ai-option-item:focus-visible {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.ai-option-item.active {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--primary-green);
}

.ai-option-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ai-option-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.ai-option-meta {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-family: var(--font-sans);
    white-space: nowrap;
}

.ai-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #64748b;
    box-shadow: 0 0 4px #64748b;
}

.ai-status-indicator.online {
    background: var(--emerald-glow);
    box-shadow: 0 0 6px var(--emerald-glow);
}

.ai-status-indicator.checking {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
    animation: pulse-checking 1.2s infinite ease-in-out;
}

.ai-status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

@keyframes pulse-checking {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Modos de Estado en Cabecera */
.bot-header-status.status-nano {
    color: #7dd3fc;
}
.bot-header-status.status-nano .pulse-mini {
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.bot-header-status.status-gemma {
    color: #d8b4fe;
}
.bot-header-status.status-gemma .pulse-mini {
    background: #c084fc;
    box-shadow: 0 0 6px #c084fc;
}

/* Píldoras de Atribución Resiliente en Burbujas */
.resilient-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    margin-bottom: 0.55rem;
    letter-spacing: 0.02em;
    user-select: none;
    line-height: 1.4;
}

.resilient-pill.tier1-pill {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.resilient-pill.tier2-pill {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

/* =========================================
   VISTA 1: Chat Convencional de IA
   ========================================= */
.chat-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(180deg, #070c09 0%, #050806 100%);
    position: relative;
    overflow: hidden;
}

.chat-messages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--emerald-dark) transparent;
}

.chat-messages-scroll::-webkit-scrollbar {
    width: 6px;
}
.chat-messages-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(16, 185, 129, 0.25);
    border-radius: 3px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* Filas de burbujas */
.chat-bubble-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    animation: fadeInBubble 0.28s ease-out;
}

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

.chat-bubble-row.bot-row {
    align-self: flex-start;
    max-width: 90%;
}

.chat-bubble-row.user-row {
    align-self: flex-end;
    flex-direction: row-reverse;
    max-width: 85%;
}

.chat-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-avatar-icon {
    stroke: var(--emerald-glow);
    display: block;
}

.user-row .chat-msg-avatar {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
}

.user-row .chat-avatar-icon {
    stroke: #38bdf8;
}

.chat-avatar-icon.error {
    stroke: #f43f5e;
}

/* Burbujas */
.chat-bubble {
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.6;
    word-break: break-word;
}

.bot-bubble {
    background: rgba(15, 23, 19, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #f1f5f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    border-top-left-radius: 2px;
}

.user-bubble {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-top-right-radius: 2px;
}

/* Markdown dentro de bot-bubble */
.bot-bubble p {
    margin-bottom: 0.65rem;
}
.bot-bubble p:last-child {
    margin-bottom: 0;
}
.bot-bubble strong {
    color: var(--emerald-glow);
    font-weight: 600;
}
.bot-bubble em {
    color: #a7f3d0;
}
.bot-bubble ul, .bot-bubble ol {
    margin: 0.5rem 0 0.65rem 1.25rem;
}
.bot-bubble li {
    margin-bottom: 0.3rem;
}
.bot-bubble a {
    color: var(--emerald-glow);
    text-decoration: underline;
}
.bot-bubble pre {
    background: #080c0a;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin: 0.65rem 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.bot-bubble code {
    font-family: var(--font-mono);
    color: var(--emerald-soft);
    font-size: 0.88em;
}

/* Mensaje de Bienvenida */
.welcome-message-row .bot-bubble {
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(13, 20, 16, 0.95) 100%);
}
.welcome-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}
.welcome-body {
    color: #cbd5e1;
    margin-bottom: 0.65rem;
}
.welcome-cta {
    font-weight: 600;
    color: var(--emerald-soft);
}

/* Indicador de Escritura (Typing indicator) */
.chat-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.95rem;
    background: rgba(15, 23, 19, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
    align-self: flex-start;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-soft);
    animation: typingPulse 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* Chips de Sugerencias Rápidas */
.chat-chips-container {
    padding: 0.5rem 1.25rem 0.35rem 1.25rem;
    overflow: hidden;
    position: relative;
    background: rgba(7, 12, 9, 0.6);
}

.chat-chips-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, rgba(7, 12, 9, 0.85));
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.chat-chips-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 185, 129, 0.4) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: grab;
}

.chat-chips-scroll.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.chat-chips-scroll::-webkit-scrollbar {
    height: 4px;
    display: block;
}

.chat-chips-scroll::-webkit-scrollbar-track {
    background: rgba(16, 185, 129, 0.05);
    border-radius: 9999px;
}

.chat-chips-scroll::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.35);
    border-radius: 9999px;
    transition: background 0.2s ease;
}

.chat-chips-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-glow);
    box-shadow: 0 0 6px rgba(0, 255, 157, 0.5);
}

/* Espaciador seguro al final para evitar corte en el último chip */
.chat-chips-scroll::after {
    content: '';
    flex: 0 0 1rem;
}

body.high-contrast .chat-chips-scroll {
    scrollbar-color: #00ff9d #000000;
}

body.high-contrast .chat-chips-scroll::-webkit-scrollbar-thumb {
    background: #00ff9d;
}

body.high-contrast .chat-chips-container::after {
    display: none;
}

.chat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-family: var(--font-sans);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.chip-svg {
    stroke: var(--emerald-soft);
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-chip:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary-green);
    color: var(--emerald-glow);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 255, 157, 0.2);
}

.chat-chip:hover .chip-svg {
    stroke: var(--emerald-glow);
    transform: scale(1.1);
}

/* Barra de Entrada de Chat */
.chat-input-bar {
    padding: 0.75rem 1.25rem 1rem 1.25rem;
    background: rgba(9, 13, 11, 0.95);
    border-top: 1px solid var(--term-border);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.chat-input-box {
    display: flex;
    align-items: center;
    background: #0d1411;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 28px;
    padding: 0.3rem 0.5rem 0.3rem 1.15rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.chat-input-box:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 16px rgba(0, 255, 157, 0.25);
}

.chat-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    padding: 0.45rem 0;
}

.chat-input-field::placeholder {
    color: var(--text-dim);
}

/* Botón de Narrador de Voz en Chat Form */
.chat-voice-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-right: 0.35rem;
    outline: none;
    padding: 0;
}

.chat-voice-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--emerald-glow);
    color: #ffffff;
    transform: scale(1.06);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

.chat-voice-toggle-btn:focus-visible {
    outline: 2px solid var(--emerald-glow);
    outline-offset: 2px;
}

.chat-voice-toggle-btn.voice-active {
    background: rgba(16, 185, 129, 0.35);
    border-color: var(--emerald-glow);
    color: var(--emerald-glow);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.6);
}

.chat-voice-toggle-btn.voice-active .voice-off {
    display: none !important;
}

.chat-voice-toggle-btn.voice-active .voice-on {
    display: block !important;
}

.chat-submit-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-green);
    border: none;
    color: #060908;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-submit-btn:hover {
    background: var(--emerald-glow);
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.6);
}

.chat-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Aviso de Privacidad en Chat */
.chat-privacy-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
}

.chat-privacy-warning .privacy-icon {
    flex-shrink: 0;
    stroke: var(--emerald-glow);
    opacity: 0.85;
}

/* =========================================
   VISTA 2: Terminal View Container
   ========================================= */
.terminal-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* =========================================
   Diálogo Cyberpunk de Confirmación (Easter Egg)
   ========================================= */
.cyber-dialog {
    margin: auto;
    padding: 0;
    border: 1px solid var(--emerald-glow);
    border-radius: var(--radius-md);
    background: rgba(10, 16, 13, 0.98);
    color: #f1f5f9;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 255, 157, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 480px;
    width: 90%;
}

.cyber-dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cyber-dialog-content {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.cyber-dialog-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid var(--term-warning);
    color: var(--term-warning);
}

.cyber-dialog-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

.cyber-dialog-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.cyber-dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.cyber-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
    border: none;
    text-align: center;
}

.cyber-dialog-btn.confirm-btn {
    background: var(--primary-green);
    color: #060908;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.cyber-dialog-btn.confirm-btn:hover {
    background: var(--emerald-glow);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.6);
    transform: translateY(-1px);
}

.cyber-dialog-btn.cancel-btn {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #e2e8f0;
}

.cyber-dialog-btn.cancel-btn:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: var(--primary-green);
    color: #ffffff;
}

/* Animación Glitch de Transición */
.glitch-reboot {
    animation: glitchReboot 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes glitchReboot {
    0% { filter: invert(0) blur(0); opacity: 1; }
    30% { filter: invert(0.8) hue-rotate(90deg) blur(2px); opacity: 0.7; }
    60% { filter: invert(0.2) hue-rotate(270deg) blur(1px); opacity: 0.9; }
    100% { filter: invert(0) blur(0); opacity: 1; }
}

/* Selector Cyber-Dropdown de Idiomas (i18n) */
.lang-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    background: rgba(13, 20, 16, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.lang-dropdown-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--emerald-glow);
    color: var(--emerald-glow);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.3);
}

.lang-dropdown-btn:focus-visible {
    outline: 2px solid var(--emerald-glow);
    outline-offset: 2px;
}

.lang-dropdown-btn[aria-expanded="true"] {
    border-color: var(--primary-green);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.2);
}

.lang-dropdown-btn[aria-expanded="true"] .lang-arrow {
    transform: rotate(180deg);
}

.lang-globe-svg {
    stroke: var(--emerald-soft);
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.lang-iso-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--emerald-glow);
    min-width: 26px;
    line-height: 1;
}

.lang-gt-svg {
    stroke: var(--emerald-soft);
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.lang-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(13, 20, 16, 0.98);
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 24px rgba(16, 185, 129, 0.25);
    z-index: 1000;
}

.lang-dropdown-menu[hidden] {
    display: none !important;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    padding: 0.6rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    outline: none;
}

.lang-dropdown-item:hover,
.lang-dropdown-item:focus-visible {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-glow);
}

.lang-dropdown-item.active {
    background: rgba(16, 185, 129, 0.22);
    color: #ffffff;
    font-weight: 700;
    border-left: 3px solid var(--primary-green);
}

.lang-dropdown-separator {
    height: 1px;
    background: rgba(16, 185, 129, 0.25);
    margin: 0.4rem 0;
    padding: 0;
}

.lang-google-translate {
    padding: 0;
}

.lang-gt-anchor {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 42px;
    padding: 0.6rem 1rem;
    color: var(--emerald-soft);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
}

.lang-gt-anchor:hover,
.lang-gt-anchor:focus-visible {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-glow);
}

.lang-gt-anchor .external-icon {
    margin-left: auto;
    opacity: 0.75;
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--term-text);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--emerald-dark) transparent;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}
.terminal-body::-webkit-scrollbar-thumb {
    background-color: rgba(16, 185, 129, 0.25);
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-green);
}

/* Terminal Lines & Formatting */
#terminal-output {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-line {
    margin-bottom: 0.35rem;
}

.terminal-line.success { color: var(--emerald-soft); }
.terminal-line.error { color: var(--term-error); }
.terminal-line.warning { color: var(--term-warning); }
.terminal-line.info { color: #cbd5e1; }
.terminal-line.command {
    color: #38bdf8;
    font-weight: 600;
    padding: 0.2rem 0;
}
.terminal-line.gemini-reply {
    color: #f1f5f9;
    background: rgba(16, 185, 129, 0.05);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--primary-green);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 0.5rem 0;
}

.terminal-line.markdown-output {
    line-height: 1.6;
}

.terminal-line.markdown-output a {
    color: var(--emerald-glow);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.terminal-line.markdown-output a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.8);
}

.terminal-line.markdown-output pre {
    background: #0d1411;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}

.terminal-line.markdown-output code {
    font-family: var(--font-mono);
    color: var(--emerald-soft);
}

.terminal-line.markdown-output strong {
    color: #ffffff;
}

/* Input Line */
.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.prompt {
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}

.prompt-user { color: var(--emerald-soft); }
.prompt-path { color: #38bdf8; }
.prompt-symbol { color: var(--emerald-glow); margin-left: 2px; }

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    outline: none;
    padding: 0;
    caret-color: var(--emerald-glow);
}

/* Responsive Breakpoints - Estándar Gemini 4 Argón */

/* Escritorio (Desktop Bento Grid >= 1024px) */
@media (min-width: 1024px) {
    .container {
        display: flex;
        flex-direction: row;
        width: 100%;
        max-width: 1280px;
        height: 86vh;
        min-height: 640px;
    }

    .identity-card {
        width: 34%;
        border-right: 1px solid var(--bg-card-border);
        border-bottom: none;
    }

    .terminal-container,
    .interactive-panel {
        width: 66%;
        border-left: none;
    }
}

/* Tablet Adaptable (640px - 1023px) */
@media (min-width: 640px) and (max-width: 1023.98px) {
    body {
        padding: 0.5rem;
    }

    .container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 96vh;
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    .identity-card {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bg-card-border);
        padding: 1.5rem 1.25rem;
    }

    .subtitle {
        word-break: break-word;
        text-wrap: balance;
    }

    .terminal-container,
    .interactive-panel {
        width: 100%;
        height: 70vh;
        min-height: 520px;
        border-left: none;
    }

    .chat-view-container {
        height: 100%;
    }

    .chat-messages-scroll {
        padding: 1rem;
    }

    .terminal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Móvil Ultra-Resiliente (< 640px) */
@media (max-width: 639.98px) {
    body {
        padding: 0.25rem;
    }

    .container {
        display: flex;
        flex-direction: column;
        border-radius: 0;
        border: none;
        height: auto;
        min-height: 100dvh;
    }

    .identity-card {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bg-card-border);
        padding: 1.25rem 0.85rem;
    }

    .avatar-wrapper {
        width: 110px;
        height: 110px;
        margin-bottom: 0.75rem;
    }

    .name {
        font-size: 1.35rem;
    }

    .title {
        font-size: 0.88rem;
    }

    .subtitle {
        font-size: 0.78rem;
        word-break: break-word;
        text-wrap: balance;
    }

    .terminal-container,
    .interactive-panel {
        width: 100%;
        height: auto;
        min-height: 72dvh;
        border-left: none;
    }

    .interactive-header,
    .terminal-header {
        padding: 0.5rem 0.65rem;
        gap: 0.4rem;
    }

    .bot-header-name {
        font-size: 0.78rem;
    }

    .bot-header-status {
        display: none;
    }

    .terminal-title {
        font-size: 0.76rem;
    }

    .chat-messages-scroll {
        padding: 0.75rem 0.6rem;
    }

    .chat-bubble {
        padding: 0.75rem 0.85rem;
        font-size: 0.86rem;
    }

    .chat-input-bar {
        padding: 0.45rem 0.5rem 0.65rem 0.5rem;
    }

    .chat-input-box {
        padding: 0.2rem 0.35rem 0.2rem 0.85rem;
    }

    .chat-input-field {
        font-size: 0.84rem;
    }

    .chat-voice-toggle-btn,
    .chat-submit-btn {
        width: 32px;
        height: 32px;
    }

    .chat-chips-container {
        padding: 0.35rem 0.5rem;
    }

    .chat-chip {
        font-size: 0.74rem;
        padding: 0.25rem 0.6rem;
    }

    /* Estándar Gemini 4 Argón: ASCII art font clamp */
    .ascii-art,
    pre.ascii-art,
    .terminal-body pre,
    .terminal-line pre,
    #terminal-output {
        font-size: clamp(0.42rem, 1.6vw, 0.82rem);
        line-height: 1.25;
    }

    /* Estándar Gemini 4 Argón: Ocultar .cli-text y .btn-label en móvil */
    .cli-text,
    .btn-label,
    .a11y-header-btn span,
    .return-chat-btn span:not(.cli-prompt-sym) {
        display: none !important;
    }

    .easteregg-cli-btn,
    .chess-nav-btn,
    .dashboard-nav-btn,
    .return-chat-btn,
    .a11y-header-btn {
        padding: 0.3rem 0.45rem;
    }

    .ai-selector-menu {
        min-width: 200px;
        right: 0;
    }
}

/* =========================================
   Accesibilidad (a11y) y Soporte Universal
   ========================================= */

/* Skip link accesible */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--emerald-glow);
    color: #000000;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    z-index: 99999;
    text-decoration: none;
    transition: top 0.2s ease;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.8);
}
.skip-link:focus {
    top: 20px;
    outline: 3px solid #ffffff;
}

/* Foco visible de alto contraste */
:focus-visible {
    outline: 2px solid var(--emerald-glow) !important;
    outline-offset: 3px !important;
}


/* Modal de Accesibilidad */
.a11y-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.a11y-modal-content {
    background: #0d1411;
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.25);
    overflow: hidden;
}
.a11y-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--bg-card-border);
    background: #111a16;
}
.a11y-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}
.a11y-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.a11y-close-btn:hover {
    color: var(--term-error);
    background: rgba(244, 63, 94, 0.15);
}

/* Modo Alto Contraste */
body.high-contrast {
    --bg-page: #000000 !important;
    --bg-card: #000000 !important;
    --bg-terminal: #000000 !important;
    --bg-terminal-header: #050505 !important;
    --text-main: #ffffff !important;
    --text-muted: #f8fafc !important;
    --primary-green: #00ff9d !important;
    --emerald-soft: #00ff9d !important;
    --emerald-glow: #00ff9d !important;
    --term-text: #ffffff !important;
    border-color: #00ff9d !important;
}
body.high-contrast .bg-ambient-layer {
    display: none !important;
    opacity: 0 !important;
}
body.high-contrast .container {
    border: 2px solid #00ff9d !important;
    box-shadow: 0 0 35px rgba(0, 255, 157, 0.5) !important;
}
body.high-contrast .identity-card {
    border-right: 2px solid #00ff9d !important;
}
body.high-contrast .a11y-modal-content,
body.high-contrast .email-modal-content {
    border: 2px solid #00ff9d !important;
    background: #000000 !important;
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.4) !important;
}
body.high-contrast .a11y-modal-header {
    border-bottom: 2px solid #00ff9d !important;
    background: #000000 !important;
}
body.high-contrast .a11y-close-btn,
body.high-contrast .email-action-btn,
body.high-contrast .email-action-sublink {
    border: 1px solid #00ff9d !important;
    color: #ffffff !important;
}
body.high-contrast .email-status-badge {
    border: 2px solid #00ff9d !important;
    background: #000000 !important;
    color: #00ff9d !important;
}

/* Modo Dislexia */
body.dyslexia-mode {
    font-family: Arial, Verdana, sans-serif !important;
    letter-spacing: 0.05em !important;
    line-height: 1.8 !important;
    word-spacing: 0.08em !important;
}

/* Escalas de Fuente */
body.font-large {
    font-size: 112% !important;
}
body.font-xlarge {
    font-size: 125% !important;
}

/* Reducción de Movimiento */
body.reduced-motion *,
@media (prefers-reduced-motion: reduce) {
    animation: none !important;
    transition: none !important;
}

/* =========================================
   Modal de Correo y Portapapeles
   ========================================= */
.email-modal-content {
    max-width: 440px;
    text-align: center;
}
.email-modal-body {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.email-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--primary-green);
    border-radius: 9999px;
    color: var(--emerald-glow);
    font-weight: 600;
    font-size: 0.95rem;
}
.email-status-badge.error {
    background: rgba(244, 63, 94, 0.12);
    border-color: var(--term-error);
    color: #fda4af;
}
.email-display-box {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #090d0b;
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #ffffff;
    word-break: break-all;
    user-select: all;
    display: flex;
    justify-content: center;
    align-items: center;
}
.email-modal-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
}
.email-action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    font-family: var(--font-sans);
}
.email-action-btn.primary {
    background: var(--primary-green);
    color: #000000;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.email-action-btn.primary:hover {
    background: var(--emerald-glow);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.email-action-btn.secondary {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid var(--bg-card-border);
    color: var(--text-muted);
}
.email-action-btn.secondary:hover {
    background: rgba(16, 185, 129, 0.18);
    color: #ffffff;
    border-color: var(--primary-green);
}

.email-action-sublink {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    margin-top: 0.25rem;
}
.email-action-sublink:hover {
    color: var(--emerald-glow);
}

/* =========================================
   Controles de Encabezado: Idioma y Accesibilidad
   ========================================= */

/* Botón de Accesibilidad Rápida en la Barra de la Terminal */
.a11y-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--emerald-glow);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
}
.a11y-header-btn:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--emerald-glow);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.35);
}
.a11y-btn-svg {
    stroke: currentColor;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* =========================================
   Tarjeta Interactiva de Recomendación (Gemini Action Card)
   ========================================= */
.chat-action-card {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 9, 8, 0.85) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.15);
    transition: var(--transition, all 0.2s ease);
}
.chat-action-card:hover {
    border-color: var(--primary-green, #10b981);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.25);
}
.chat-action-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.chat-action-card-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.chat-action-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.chat-action-card-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
}
.chat-action-card-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    color: var(--emerald-glow, #00ff9d);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chat-action-card-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin: 0 0 12px 0;
    line-height: 1.45;
}
.chat-action-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-green, #10b981);
    color: #060908 !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.chat-action-card-btn:hover {
    background: var(--emerald-glow, #00ff9d);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 255, 157, 0.5);
}
.chat-action-card-btn svg {
    transition: transform 0.2s ease;
}
.chat-action-card-btn:hover svg {
    transform: translateX(3px);
}



