* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --bg-main: #000000;
            --bg-sidebar: #0a0a0a;
            --bg-input: #000000;
            --bg-input-area: #0d0d0d;
            --border: #1a1a1a;
            --text-primary: #ffffff;
            --text-secondary: #888888;
            --accent-blue: #3b82f6;
            --accent-orange: #f78166;
            --icon-color: #666666;
            --sidebar-width: 260px;
            --sidebar-collapsed-width: 52px;
            --hover-bg: #1a1a1a;
        }

        body {
            font-family: 'Inter', sans-serif;
            color: var(--text-primary);
            height: 100vh;
            display: flex;
            overflow: hidden;
        }

        /* ── SIDEBAR ── */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-sidebar);
            display: flex;
            flex-direction: column;
            padding: 12px 0;
            gap: 2px;
            border-right: 1px solid var(--border);
            z-index: 10;
            flex-shrink: 0;
            transition: width 0.3s ease;
            position: relative;
        }

        .sidebar.collapsed {
            width: var(--sidebar-collapsed-width);
            align-items: center;
        }

        .sidebar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 12px 12px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 8px;
        }

        .sidebar.collapsed .sidebar-header {
            padding: 0 0 12px;
            justify-content: center;
        }

        .sidebar-toggle {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--icon-color);
            border-radius: 8px;
            transition: all 0.2s;
        }

        .sidebar-toggle:hover {
            background: var(--hover-bg);
            color: var(--text-primary);
        }

        .sidebar-toggle svg {
            width: 18px;
            height: 18px;
            transition: transform 0.3s ease;
        }

        .sidebar.collapsed .sidebar-toggle svg {
            transform: rotate(180deg);
        }

        .sidebar-logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            opacity: 0;
            transition: opacity 0.2s;
            white-space: nowrap;
        }

        .sidebar:not(.collapsed) .sidebar-logo {
            opacity: 1;
        }

        .sidebar.collapsed .sidebar-logo {
            display: none;
        }

        .sidebar-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            overflow: hidden;
            margin: 0 12px 8px;
            cursor: pointer;
            background: linear-gradient(135deg, #e64c4c, #c0392b);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            flex-shrink: 0;
        }

        .sidebar.collapsed .sidebar-avatar {
            margin: 0 0 8px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            margin: 0 8px;
            border-radius: 8px;
            cursor: pointer;
            color: var(--icon-color);
            transition: all 0.15s;
            font-size: 14px;
            white-space: nowrap;
        }

        .sidebar-item:hover {
            background: var(--hover-bg);
            color: var(--text-primary);
        }

        .sidebar-item svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        .sidebar-item-text {
            opacity: 1;
            transition: opacity 0.2s;
        }

        .sidebar.collapsed .sidebar-item-text {
            opacity: 0;
            width: 0;
            display: none;
        }

        .sidebar-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            color: var(--icon-color);
            transition: background 0.15s, color 0.15s;
            font-size: 16px;
        }

        .sidebar.collapsed .sidebar-icon {
            width: 36px;
            height: 36px;
        }

        .sidebar-icon:hover {
            background: var(--hover-bg);
            color: var(--text-primary);
        }

        .sidebar-icon svg {
            width: 18px;
            height: 18px;
        }

        .sidebar-spacer {
            flex: 1;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 4px;
        }

        .form-group:last-of-type {
            margin-bottom: 8px;
        }

        .sidebar-bottom {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 8px 0;
            border-top: 1px solid var(--border);
            margin-top: 8px;
        }

        /* ── SIDEBAR CHAT HISTORY ── */
        .sidebar-section-title {
            font-size: 11px;
            font-weight: 500;
            color: var(--text-secondary);
            padding: 16px 12px 8px;
            width: 100%;
            opacity: 0.7;
            transition: opacity 0.2s;
        }

        .sidebar.collapsed .sidebar-section-title {
            opacity: 0;
            display: none;
        }

        .chat-list {
            width: 100%;
            max-height: calc(100vh - 400px);
            overflow-y: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
            transition: opacity 0.2s;
        }

        .sidebar.collapsed .chat-list {
            opacity: 0;
            display: none;
        }

        .chat-list::-webkit-scrollbar {
            display: none;
        }

        .chat-item {
            padding: 10px 12px;
            margin: 2px 8px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: all 0.2s ease;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .chat-item-text {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .chat-item-actions {
            display: flex;
            gap: 4px;
            flex-shrink: 0;
            opacity: 0;
            transition: opacity 0.15s;
        }

        .chat-item:hover .chat-item-actions {
            opacity: 1;
        }

        .chat-item-actions button {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px 6px;
            font-size: 13px;
            border-radius: 4px;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
        }

        .chat-item-actions button:hover {
            background: var(--hover-bg);
        }

        .chat-item:hover {
            background: var(--hover-bg);
            color: var(--text-primary);
        }

        .chat-item.active {
            background: var(--hover-bg);
            color: var(--text-primary);
            font-weight: 500;
        }

        .chat-item.active::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 20px;
            background: var(--accent-blue);
            border-radius: 0 2px 2px 0;
        }

        .no-chats-message {
            padding: 16px 12px;
            font-size: 12px;
            color: var(--text-secondary);
            text-align: center;
            opacity: 0.6;
        }

        .sidebar.collapsed .no-chats-message {
            display: none;
        }

        /* ── MAIN CONTENT ── */
        .main {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }

        /* ── BACKGROUND ── */
        .bg-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
        }

        .bg-image { 
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('../src/img/fondo03.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .bg-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
        }

        .bg-fade {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50%;
            background: linear-gradient(to bottom, transparent 0%, #0f1117 100%);
        }

        .bg-gradient-dark {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
        }

        /* ── TOP RIGHT BUTTON ── */
        .top-bar {
            position: absolute;
            top: 12px;
            right: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 20;
        }

        .top-icon-btn {
            width: 34px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            color: var(--icon-color);
            transition: background 0.15s;
        }

        .top-icon-btn:hover {
            background: var(--hover-bg);
        }

        .top-icon-btn svg {
            width: 18px;
            height: 18px;
        }

        .buy-btn {
            display: flex;
            align-items: center;
            gap: 7px;
            background: #c0392b;
            border: 1.5px solid #e74c3c;
            border-radius: 8px;
            padding: 6px 13px;
            cursor: pointer;
            font-size: 12.5px;
            font-weight: 600;
            color: #fff;
            transition: background 0.15s;
            line-height: 1.3;
        }

        .buy-btn:hover {
            background: #e74c3c;
        }

        .buy-btn .gift-icon {
            font-size: 14px;
        }

        .buy-btn .buy-text {
            display: flex;
            flex-direction: column;
        }

        .buy-btn .buy-main {
            font-size: 12px;
            font-weight: 700;
        }

        .buy-btn .buy-sub {
            font-size: 10px;
            font-weight: 400;
            opacity: 0.9;
        }

        /* ── CENTER LOGO ── */
        .center-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            padding-bottom: 100px;
            position: relative;
            z-index: 1;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .logo-icon {
            width: 70px;
            height: 70px;
            border-radius: 18px;
            background: linear-gradient(145deg, #1a1a2e, #16213e);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
        }

        .logo-icon svg {
            width: 50px;
            height: 50px;
        }

        .logo-text {
            font-size: 95px;
            font-weight: 700;
            letter-spacing: -1px;
            color: #e6edf3;
        }

        .logo-text span {
            color: #58a6ff;
        }

        .tagline {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 400;
        }

        /* ── CHAT CONTAINER ── */
        .chat-container {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
            display: none;
            flex-direction: column;
            gap: 16px;
            position: relative;
            z-index: 1;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .chat-container::-webkit-scrollbar {
            display: none;
        }

        .chat-container.active {
            display: flex;
        }

        .chat-message {
            display: flex;
            gap: 12px;
            padding: 16px;
            border-radius: 12px;
            max-width: 100%;
        }

        .chat-message.user {
            background: var(--bg-sidebar);
            border: 1px solid var(--border);
            align-self: flex-end;
        }

        .chat-message.assistant {
            background: transparent;
            align-self: flex-start;
        }

        .message-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .chat-message.user .message-avatar {
            background: linear-gradient(135deg, #e64c4c, #c0392b);
            color: #fff;
        }

        .chat-message.assistant .message-avatar {
            background: linear-gradient(135deg, #000000, #000307);
            color: #fff;
        }

        .message-content {
            flex: 1;
            font-size: 14px;
            line-height: 1.6;
            color: var(--text-primary);
            white-space: pre-wrap;
        }

        .message-content p {
            margin: 0 0 8px 0;
        }

        .message-content p:last-child {
            margin-bottom: 0;
        }

        .center-area.hidden {
            display: none;
        }

        .send-btn {
            background: #58a6ff !important;
            color: #fff !important;
        }

        .send-btn:hover {
            background: #1f6feb !important;
        }

        .send-btn.stop-active {
            background: #f85149 !important;
        }

        .send-btn.stop-active:hover {
            background: #da3633 !important;
        }

        /* ── CODE BLOCKS & SYNTAX HIGHLIGHTING ── */
        .code-block {
            background: #161b22;
            border: 1px solid #30363d;
            border-radius: 12px;
            overflow: hidden;
            margin: 12px 0;
        }

        .code-block-header {
            background: #0d1117;
            border-bottom: 1px solid #30363d;
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .code-block-lang {
            color: #8b949e;
            font-size: 12px;
            font-weight: 500;
            text-transform: uppercase;
        }

        .code-block-actions {
            display: flex;
            gap: 8px;
        }

        .code-block-btn {
            background: transparent;
            border: none;
            color: #8b949e;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 12px;
            transition: all 0.2s;
        }

        .code-block-btn:hover {
            background: #21262d;
            color: #e6edf3;
        }

        .code-block pre {
            margin: 0;
            padding: 16px;
            overflow-x: auto;
            background: #161b22;
        }

        .code-block code {
            font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
            font-size: 13px;
            line-height: 1.6;
            color: #e6edf3;
            background: transparent;
            padding: 0;
        }

        /* Syntax tokens */
        .token-keyword {
            color: #ff7b72;
        }

        .token-string {
            color: #a5d6ff;
        }

        .token-number {
            color: #79c0ff;
        }

        .token-comment {
            color: #8b949e;
            font-style: italic;
        }

        .token-function {
            color: #d2a8ff;
        }

        .token-tag {
            color: #7ee787;
        }

        .token-attr {
            color: #79c0ff;
        }

        .token-doctype {
            color: #ff7b72;
        }

        /* Inline code */
        code:not(.code-block code) {
            font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
            background: rgba(110, 118, 129, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 13px;
            color: #e6edf3;
        }

        .loading-indicator {
            display: flex;
            gap: 4px;
            align-items: center;
            padding: 8px 16px;
        }

        .loading-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-blue);
            animation: loading 1.4s infinite ease-in-out both;
        }

        .loading-dot:nth-child(1) { animation-delay: -0.32s; }
        .loading-dot:nth-child(2) { animation-delay: -0.16s; }

        @keyframes loading {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }

        /* ── INPUT AREA ── */
        .input-wrapper {
            padding: 0 0 16px 0;
            width: 100%;
            max-width: 780px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        .input-box {
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 14px 16px 48px 16px;
            width: 100%;
            position: relative;
        }

        .input-field {
            background: transparent;
            border: none;
            outline: none;
            color: var(--text-secondary);
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            width: 100%;
            resize: none;
            min-height: 24px;
            line-height: 1.5;
        }

        .input-field::placeholder {
            color: var(--text-secondary);
        }

        .input-toolbar {
            position: absolute;
            bottom: 10px;
            left: 12px;
            right: 12px;
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .model-selector {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background: var(--bg-input);
            border: 1px solid var(--border);
            cursor: pointer;
            padding: 8px 32px 8px 12px;
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 13px;
            font-family: 'Inter', sans-serif;
            font-weight: 500;
            transition: all 0.2s ease;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 10px center;
            background-size: 14px;
            min-width: 220px;
        }

        .model-selector:hover {
            background: var(--hover-bg);
            border-color: var(--text-secondary);
        }

        .model-selector:focus {
            outline: none;
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
        }

        .model-selector option {
            background: var(--bg-primary);
            color: var(--text-primary);
            padding: 10px 12px;
            font-size: 13px;
            font-weight: 400;
        }

        .thinking-block {
            opacity: 0.5;
            font-style: italic;
            color: var(--text-secondary);
            margin-bottom: 16px;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.03);
            border-left: 3px solid var(--text-secondary);
            border-radius: 0 8px 8px 0;
        }

        .thinking-block p {
            margin: 0;
        }

        .answer-block {
            color: var(--text-primary);
        }

        .answer-block p:first-child {
            margin-top: 0;
        }

        .toolbar-spacer {
            flex: 1;
        }

        .tool-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            cursor: pointer;
            border-radius: 7px;
            color: var(--text-secondary);
            transition: background 0.15s, color 0.15s;
        }

        .tool-btn svg {
            width: 16px;
            height: 16px;
        }

        /* ── AUTH MODAL ── */
        .auth-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .auth-container {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 32px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .auth-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .auth-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .auth-logo img {
            width: 40px;
            height: 40px;
            border-radius: 8px;
        }

        .auth-logo span {
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .auth-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            border-bottom: 1px solid var(--border);
        }
.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-blue);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
    box-sizing: border-box;
}

.auth-btn:hover {
    background: #1f6feb;
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-error {
    display: none;
    padding: 12px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 8px;
    color: #f85149;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Verification code inputs */
.verification-code-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.verification-code-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.verification-code-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.verification-code-input:valid {
    border-color: var(--accent-blue);
}

/* ── LOADING BUTTON ── */
.auth-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── WELCOME MODAL ── */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.welcome-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #3b82f6, #1f6feb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
}

.welcome-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.welcome-user {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-blue);
    margin: 0 0 32px 0;
}

.welcome-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.welcome-btn:hover {
    background: #1f6feb;
    transform: translateY(-2px);
}

.welcome-btn:active {
    transform: translateY(0);
}

/* ── SIDEBAR PROFILE DROPDOWN ── */
.sidebar-profile-container {
    position: relative;
    margin: 0 8px;
}

.sidebar-profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--icon-color);
    transition: all 0.15s;
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

.sidebar-profile-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.sidebar-profile-item.active {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.sidebar-profile-item.active .profile-arrow {
    transform: rotate(180deg);
}

.sidebar-profile-name {
    flex: 1;
    opacity: 1;
    transition: opacity 0.2s;
    font-weight: 500;
    color: var(--accent-blue);
}

.sidebar.collapsed .sidebar-profile-name,
.sidebar.collapsed .profile-arrow {
    opacity: 0;
    display: none;
}

.profile-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 4px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 100;
}

.profile-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.15s;
    border-radius: 6px;
    margin: 4px;
}

.profile-dropdown-item:hover {
    background: var(--hover-bg);
    color: #f85149;
}

.sidebar.collapsed .profile-dropdown {
    display: none;
}

/* Profile info in dropdown */
.profile-info {
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(31, 111, 235, 0.05));
    border-bottom: 1px solid var(--border);
}

.profile-username {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.profile-email {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-word;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0 12px;
}

/* ── SETTINGS PAGE ── */
.bg-gradient-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

.settings-header {
    text-align: center;
    margin-bottom: 40px;
}

.settings-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.settings-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.settings-section {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-blue);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-item:first-child {
    padding-top: 0;
}

.setting-info {
    flex: 1;
    margin-right: 20px;
}

.setting-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.setting-description {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Toggle Buttons */
.toggle-wrapper {
    display: flex;
    background: var(--bg-input);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-transform: lowercase;
    min-width: 50px;
}

.toggle-btn:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.toggle-btn.active {
    background: var(--accent-blue);
    color: white;
}

.toggle-btn.active:hover {
    background: #1f6feb;
}

/* Username Setting */
.username-setting {
    flex-direction: column;
    gap: 16px;
}

.username-form {
    display: flex;
    gap: 12px;
    width: 100%;
}

.username-input {
    flex: 1;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.username-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.username-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.username-btn {
    padding: 12px 20px;
    background: var(--accent-blue);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.username-btn:hover {
    background: #1f6feb;
}

.username-btn:active {
    transform: scale(0.98);
}

/* Ocultar sidebar en móvil */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
}

/* Fondo diferente para móvil */
@media (max-width: 768px) {
    .bg-image {
        background-image: url('../src/img/fondo-movil.png') !important;
    }
}