@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ffff;
    --secondary-color: #8a2be2;
    --background-dark: #0a0e27;
    --background-medium: #0f1428;
    --background-light: #1a1f3a;
    --text-primary: #e0e0e0;
    --text-secondary: rgba(224, 224, 224, 0.7);
    --border-color: rgba(0, 255, 255, 0.3);
    --success-color: #00ff00;
    --warning-color: #ffaa00;
    --error-color: #ff4444;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 50%, var(--background-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efecto de fondo animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.02) 2px,
        rgba(0, 255, 255, 0.02) 4px
    );
    animation: scan 8s linear infinite;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}



.chat-container {
    width: 100%;
    max-width: 1100px;
    background: rgba(15, 20, 40, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.15),
        0 0 100px rgba(138, 43, 226, 0.1),
        inset 0 0 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 800px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
}



.chat-header {
    background: linear-gradient(135deg, var(--background-light) 0%, #27aaeb 100%);
    color: var(--primary-color);
    padding: 20px 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.header-left {
    flex: 1;
    min-width: 0;
}

.chat-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3);
}

.brand {
    color: #2587f7;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 20px;
    width: fit-content;
    border: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.user-avatar {
    font-size: 16px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.user-badge {
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(0, 255, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: var(--success-color);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 10px var(--success-color);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.status.success { color: var(--success-color); }
.status.warning { color: var(--warning-color); }
.status.error { color: var(--error-color); }
.status.info { color: var(--primary-color); }

.settings-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.settings-button:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ============================================
   SISTEMA DE PESTAÑAS
   ============================================ */

.tabs-container {
    background: var(--background-medium);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    height: 54px;
    position: relative;
}

.tabs-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 20px;
}

.tabs-scroll::-webkit-scrollbar {
    height: 4px;
}

.tabs-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.tabs-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 2px;
}

.tabs-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.tabs-wrapper {
    display: flex;
    gap: 6px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(20, 30, 60, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 140px;
    max-width: 220px;
    position: relative;
}

.tab:hover {
    background: rgba(20, 30, 60, 0.8);
    border-color: rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.tab.active {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 -4px 15px rgba(0, 255, 255, 0.2);
}

.tab-name {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.tab-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab.active .tab-title {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-count {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
}

.tab.active .tab-count {
    background: rgba(0, 255, 255, 0.3);
}

.tab-menu {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tab-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.new-tab-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin: 0 15px;
    flex-shrink: 0;
}

.plus-icon {
    font-size: 24px;
    font-weight: 600;
    transition: transform 0.3s;
}

.new-tab-button:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: scale(1.05);
}

.new-tab-button:hover .plus-icon {
    transform: rotate(90deg);
}

/* ============================================
   MENSAJES
   ============================================ */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: rgba(10, 14, 39, 0.6);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-message h3 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.welcome-message p {
    font-size: 15px;
    opacity: 0.8;
    line-height: 1.6;
}

.message {
    display: flex;
    gap: 15px;
    animation: slideIn 0.4s ease-out;
    max-width: 85%;
}

.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message.bot {
    flex-direction: row;
    margin-right: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--secondary-color), #4b0082);
    box-shadow: 
        0 0 20px rgba(138, 43, 226, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(138, 43, 226, 0.3);
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), #008b8b);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 10px;
}

.message-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.message.user .message-author {
    color: var(--secondary-color);
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.3);
}

.message-time {
    font-size: 11px;
    opacity: 0.5;
    font-family: 'Roboto Mono', monospace;
}

.message-content {
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.7;
    font-size: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #4b0082 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 
        0 4px 15px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.4);
}

.message.bot .message-content {
    background: rgba(20, 30, 60, 0.8);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: 
        0 4px 15px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.message-content p {
    margin: 0 0 12px 0;
    line-height: 1.7;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.message-content em {
    font-style: italic;
    opacity: 0.9;
}

.message-content ul,
.message-content ol {
    margin: 12px 0;
    padding-left: 25px;
}

.message-content li {
    margin: 8px 0;
}

.message-content code {
    background: rgba(0, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    color: var(--primary-color);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.message-image {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.image-prompt-container {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.prompt-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s infinite;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

/* Mensajes de error */
.error-message {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    padding: 14px 20px;
    border-radius: 10px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.2);
    animation: slideIn 0.3s ease-out;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ============================================
   INPUT DE MENSAJES
   ============================================ */

.chat-input-container {
    padding: 25px;
    background: var(--background-medium);
    border-top: 2px solid var(--border-color);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 16px 22px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Rajdhani', sans-serif;
    outline: none;
    transition: all 0.3s;
    background: rgba(20, 30, 60, 0.6);
    color: var(--text-primary);
    font-weight: 400;
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.05);
}

.image-button,
.send-button {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
}

.image-button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #4b0082 100%);
    color: white;
    border: 2px solid rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

.image-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
}

.send-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #008b8b 100%);
    color: var(--background-dark);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.image-button:active:not(:disabled),
.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.image-button:disabled,
.send-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}



.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--background-medium);
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    border: 2px solid var(--border-color);
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal de bienvenida */
.welcome-modal {
    max-width: 480px;
    padding: 40px;
    
}

.welcome-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-header .welcome-icon {
    font-size: 72px;
    margin-bottom: 15px;
}

.welcome-header h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 94, 255, 0.4);
}

.welcome-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.welcome-body {
    margin-bottom: 25px;
}

.welcome-body label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 500;
}

.label-icon {
    font-size: 20px;
}

.welcome-body input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(20, 30, 60, 0.6);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
}

.welcome-body input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Modal de configuración */
.settings-modal {
    max-width: 640px;
}

.modal-header {
    background: linear-gradient(135deg, var(--background-light), #1275e0);
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.header-icon {
    font-size: 24px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    color: var(--error-color);
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.section-icon {
    font-size: 24px;
}

.section-header h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-section label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-input,
.settings-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(20, 30, 60, 0.6);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
}

.settings-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 45px;
}

.settings-input:focus,
.settings-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.settings-select option {
    background: var(--background-medium);
    color: var(--text-primary);
    padding: 12px;
}

.help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
}

.danger-zone {
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2) !important;
    border-radius: 12px;
    padding: 20px !important;
}

.danger-button {
    width: 100%;
    padding: 14px 20px;
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.danger-button:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.6);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
}

.help-text.warning {
    color: rgba(255, 107, 107, 0.8);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.modal-button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-button.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #008b8b 100%);
    color: var(--background-dark);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.modal-button.primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.modal-button.secondary {
    background: rgba(138, 43, 226, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.modal-button.secondary:hover {
    background: rgba(138, 43, 226, 0.3);
}

.modal-button.full-width {
    width: 100%;
}

.button-arrow,
.button-check {
    font-size: 18px;
    font-weight: 700;
}

/* ============================================
   MENÚ CONTEXTUAL
   ============================================ */

.context-menu {
    position: fixed;
    background: var(--background-medium);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s;
    pointer-events: none;
}

.context-menu.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.context-menu-item {
    padding: 14px 18px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: rgba(0, 255, 255, 0.1);
}

.context-menu-item.danger:hover {
    background: rgba(255, 0, 0, 0.2);
    color: var(--error-color);
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 20px;
    }

    .chat-header h1 {
        font-size: 20px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .user-info {
        font-size: 13px;
        padding: 6px 12px;
    }

    .tabs-container {
        height: 50px;
    }

    .tabs-scroll {
        padding: 0 15px;
    }

    .tab {
        padding: 8px 12px;
        min-width: 120px;
        max-width: 180px;
    }

    .tab-title {
        font-size: 12px;
    }

    .new-tab-button {
        width: 38px;
        height: 38px;
        margin: 0 12px;
    }

    .plus-icon {
        font-size: 22px;
    }

    .chat-messages {
        padding: 20px 15px;
    }

    .message {
        max-width: 90%;
    }

    .message-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .message-content {
        font-size: 14px;
        padding: 12px 16px;
    }

    .chat-input-container {
        padding: 15px;
    }

    .chat-input {
        font-size: 14px;
        padding: 14px 18px;
    }

    .image-button,
    .send-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
        max-width: none;
    }

    .welcome-modal {
        padding: 30px 25px;
    }

    .settings-modal {
        max-width: 95%;
    }

    .modal-body {
        padding: 25px 20px;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .modal-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .chat-header h1 {
        font-size: 18px;
    }

    .welcome-header h2 {
        font-size: 24px;
    }

    .welcome-header .welcome-icon {
        font-size: 60px;
    }

    .settings-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .context-menu {
        min-width: 160px;
    }
}
