@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #181816;
    --bg-surface: #20201c;
    --bg-card: #262622;
    --bg-card-hover: #2e2e28;
    --bg-glass: rgba(26, 26, 23, 0.92);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(204, 120, 92, 0.45);
    
    --text-primary: #f3f2ee;
    --text-secondary: #a8a69e;
    --text-muted: #727068;
    
    --accent-terracotta: #cc785c;
    --accent-amber: #d97706;
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-purple: #a855f7;
    --accent-gold: #f59e0b;
    --accent-rose: #f43f5e;
    
    --gradient-doctor: linear-gradient(135deg, #cc785c 0%, #d97706 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 24px rgba(204, 120, 92, 0.16);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-emerald);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #34d399;
}

.main-navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.nav-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
}

body.chat-body .main-footer {
    display: none !important;
}

body.chat-body {
    overflow: hidden !important;
}

.btn-submit-chat.is-generating {
    background: var(--accent-rose) !important;
    color: #fff !important;
    cursor: pointer !important;
    opacity: 1 !important;
    animation: pulseStop 1.5s infinite;
}

@keyframes pulseStop {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.msg-queue-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(204, 120, 92, 0.15);
    border: 1px solid rgba(204, 120, 92, 0.3);
    color: var(--accent-coral);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.assistant-msg-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.assistant-msg-actions:hover {
    opacity: 1;
}

.btn-msg-action {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.74rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.btn-msg-action:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    color: #fff;
    white-space: nowrap;
}

.brand-logo:hover {
    opacity: 0.95;
}

.logo-badge {
    width: 32px;
    height: 32px;
    background: var(--gradient-doctor);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #04120c;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
}

.brand-title {
    font-weight: 800;
    letter-spacing: -0.3px;
}

.brand-title span {
    color: var(--accent-emerald);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    margin: 0 16px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #fff;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.guest-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.guest-pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
}

.member-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: #34d399;
    font-weight: 600;
    white-space: nowrap;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    background: var(--gradient-doctor);
    color: #04120c;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-doctor);
    color: #04120c;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    color: #000;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-hover);
}

.chat-workspace {
    display: flex;
    height: calc(100vh - 60px);
    width: 100%;
    overflow: hidden;
    position: relative;
}

.chat-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-conversations {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.conv-item:hover, .conv-item.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.conv-item.active {
    border-left: 2px solid var(--accent-emerald);
}

.conv-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.conv-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.conv-item:hover .conv-actions, .conv-item.active .conv-actions {
    opacity: 1;
}

.btn-icon.delete-conv {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon.delete-conv:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 2px 4px;
}

.btn-icon:hover {
    color: var(--accent-rose);
}

.chat-flow-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    overflow: hidden;
    position: relative;
}

.chat-header-bar {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
}

.model-picker-container {
    position: relative;
}

.claude-model-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition);
}

.claude-model-pill-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.claude-model-pill-btn .pill-icon {
    color: var(--accent-terracotta);
    font-size: 0.95rem;
}

.claude-model-pill-btn .pill-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.claude-model-pill-btn .pill-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    background: rgba(204, 120, 92, 0.15);
    color: var(--accent-terracotta);
    border-radius: 4px;
    border: 1px solid rgba(204, 120, 92, 0.3);
}

.claude-model-pill-btn .pill-chevron {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.claude-model-pill-btn[aria-expanded="true"] .pill-chevron {
    transform: rotate(180deg);
}

.claude-model-dropdown-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.claude-model-dropdown-modal.active {
    display: flex;
}

.model-dropdown-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.model-dropdown-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(204, 120, 92, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.model-dropdown-header {
    padding: 18px 22px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dialog-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.btn-close-dialog {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.btn-close-dialog:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.model-cards-scroll-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.claude-model-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.claude-model-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.claude-model-card.active-model {
    border-color: var(--accent-terracotta);
    background: rgba(204, 120, 92, 0.08);
    box-shadow: 0 0 16px rgba(204, 120, 92, 0.15);
}

.claude-model-card.locked-model {
    opacity: 0.72;
}

.claude-model-card.locked-model:hover {
    opacity: 0.95;
}

.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.model-name-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--accent-terracotta);
    flex-shrink: 0;
}

.claude-model-card.active-model .model-icon-box {
    background: rgba(204, 120, 92, 0.2);
    border-color: var(--accent-terracotta);
    color: #fff;
}

.model-headline {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.model-subtag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: inline-block;
    margin-top: 3px;
}

.status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-ready {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-locked {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-offline {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.model-what-it-does {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--accent-terracotta);
    border-radius: var(--radius-xs);
    padding: 10px 14px;
    margin-bottom: 10px;
}

.what-it-does-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-terracotta);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.what-it-does-text {
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.model-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cap-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cap-emerald {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.25);
}

.cap-purple {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.25);
}

.cap-amber {
    background: rgba(217, 119, 6, 0.1);
    color: #fbbf24;
    border-color: rgba(217, 119, 6, 0.25);
}

.toggle-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-emerald);
    color: #34d399;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.message-bubble-row {
    display: flex;
    gap: 14px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.message-bubble-row.user {
    justify-content: flex-end;
}

.bubble-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.bubble-avatar.assistant {
    background: var(--gradient-doctor);
    color: #04120c;
}

.bubble-avatar.user {
    background: #1e293b;
    color: #fff;
    border: 1px solid var(--border-color);
}

.bubble-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    max-width: 780px;
    font-size: 0.92rem;
    line-height: 1.6;
    word-break: break-word;
}

.message-bubble-row.user .bubble-content {
    background: #132238;
    border-color: rgba(59, 130, 246, 0.3);
    color: #fff;
}

.user-bubble-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(204, 120, 92, 0.14);
    border: 1px solid rgba(204, 120, 92, 0.35);
    border-radius: 8px;
    padding: 6px 12px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    max-width: 100%;
}
.user-bubble-attachment i {
    color: var(--accent-coral);
    font-size: 0.95rem;
}
.user-bubble-attachment .attachment-name {
    font-weight: 600;
    color: #fff;
    font-family: var(--font-code);
}
.user-bubble-attachment .attachment-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.thinking-box {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-sm);
    margin: 10px 0;
    overflow: hidden;
}

.thinking-box summary {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c084fc;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thinking-box[open] summary {
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.thinking-content {
    padding: 10px 14px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    white-space: pre-wrap;
}

.code-wrapper-block {
    margin: 14px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: #06090e;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-wrapper-block:hover {
    border-color: rgba(204, 120, 92, 0.4);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.code-toolbar {
    background: #0d131f;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-toolbar:hover {
    background: #131b2c;
}

.code-wrapper-block.is-collapsed .code-toolbar {
    border-bottom: none;
}

.artifact-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.artifact-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.artifact-icon-box.lang-python {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.artifact-icon-box.lang-javascript {
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.25);
}

.artifact-icon-box.lang-typescript {
    background: rgba(96, 165, 250, 0.14);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.artifact-icon-box.lang-php {
    background: rgba(165, 180, 252, 0.14);
    color: #a5b4fc;
    border: 1px solid rgba(165, 180, 252, 0.25);
}

.artifact-icon-box.lang-html {
    background: rgba(251, 146, 60, 0.14);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.25);
}

.artifact-icon-box.lang-css {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.artifact-icon-box.lang-sql {
    background: rgba(192, 132, 252, 0.14);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.25);
}

.artifact-icon-box.lang-bash {
    background: rgba(52, 211, 153, 0.14);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.artifact-icon-box.lang-default {
    background: rgba(204, 120, 92, 0.14);
    color: var(--accent-coral);
    border: 1px solid rgba(204, 120, 92, 0.25);
}

.artifact-meta-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.artifact-filename {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.artifact-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.2;
}

.code-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-code-tool {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.btn-code-tool:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-code-tool.toggle-code-btn {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.btn-code-tool.toggle-code-btn:hover {
    background: #38bdf8;
    color: #04101e;
    border-color: #38bdf8;
}

.toggle-chevron {
    font-size: 0.68rem;
    transition: transform 0.22s ease;
}

.code-wrapper-block:not(.is-collapsed) .toggle-chevron {
    transform: rotate(180deg);
}

.btn-code-tool.download-code {
    background: rgba(204, 120, 92, 0.15);
    color: var(--accent-coral);
    border-color: rgba(204, 120, 92, 0.35);
}

.btn-code-tool.download-code:hover {
    background: var(--accent-coral);
    color: #fff;
    border-color: var(--accent-coral);
}

.code-body-drawer {
    display: block;
    animation: fadeIn 0.2s ease;
}

.code-wrapper-block.is-collapsed .code-body-drawer {
    display: none;
}

.code-wrapper-block pre {
    margin: 0;
    max-height: 540px;
    overflow-y: auto;
    border-radius: 0;
}

.code-safety-notice {
    background: rgba(245, 158, 11, 0.08);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    padding: 6px 12px;
    font-size: 0.74rem;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attached-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(204, 120, 92, 0.12);
    border: 1px solid rgba(204, 120, 92, 0.35);
    border-radius: 8px;
    padding: 6px 12px;
    margin-bottom: 6px;
    max-width: fit-content;
    animation: fadeIn 0.2s ease;
}

.chip-file-icon {
    color: var(--accent-coral);
    font-size: 1rem;
}

.chip-file-info {
    display: flex;
    flex-direction: column;
}

.chip-filename {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-filesize {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chip-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    margin-left: 4px;
    transition: color 0.15s;
}

.chip-remove-btn:hover {
    color: #ef4444;
}

.chat-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 9, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 3px dashed var(--accent-coral);
}

.drop-overlay-box {
    text-align: center;
    background: #1c1c18;
    border: 1px solid var(--border-color);
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

pre[class*="language-"] {
    margin: 0 !important;
    background: transparent !important;
    padding: 14px !important;
    font-family: var(--font-code) !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
}

.chat-input-dock {
    padding: 16px 24px 20px;
    background: transparent;
    position: relative;
    z-index: 10;
}

.input-box-wrapper {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.input-box-wrapper:focus-within {
    border-color: var(--accent-terracotta);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(204, 120, 92, 0.2);
}

.chat-input-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.55;
    resize: none;
    outline: none;
    min-height: 48px;
    max-height: 180px;
}

.chat-input-textarea::placeholder {
    color: var(--text-muted);
}

.input-dock-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.input-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.claude-pill-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.claude-pill-action:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-submit-chat {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: #343330;
    color: #8e8c85;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit-chat.has-text,
.btn-submit-chat:hover {
    background: var(--accent-terracotta);
    color: #fff;
    box-shadow: 0 2px 12px rgba(204, 120, 92, 0.45);
}

.btn-submit-chat:hover {
    transform: scale(1.06);
}

.btn-submit-chat:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-legal-notice {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.pricing-hero-container {
    text-align: center;
    padding: 48px 20px 20px;
    max-width: 820px;
    margin: 0 auto;
}

.pricing-hero-container h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.pricing-grid-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    max-width: 1280px;
    margin: 36px auto;
    padding: 0 20px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-soft);
}

.plan-card.featured {
    border-color: var(--accent-emerald);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 100%);
}

.plan-tag-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-doctor);
    color: #04120c;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--radius-full);
}

.plan-price-text {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 12px 0;
}

.plan-price-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.plan-limits-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.plan-features-list {
    list-style: none;
    margin: 16px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.plan-features-list li i {
    color: var(--accent-emerald);
    margin-top: 3px;
    font-size: 0.8rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 540px;
    padding: 26px;
    z-index: 2001;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent-emerald);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    margin-bottom: 16px;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

@media (max-width: 900px) {
    .chat-sidebar {
        position: fixed;
        top: 60px;
        left: -300px;
        width: 280px;
        height: calc(100vh - 60px);
        z-index: 1050;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 5px 0 25px rgba(0,0,0,0.7);
        display: flex !important;
    }
    .chat-sidebar.mobile-open {
        left: 0;
    }
    .sidebar-backdrop {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 60px);
        background: rgba(0,0,0,0.65);
        backdrop-filter: blur(2px);
        z-index: 1040;
        display: none;
    }
    .sidebar-backdrop.active {
        display: block;
    }
    .mobile-sidebar-toggle {
        display: inline-flex !important;
    }
    .nav-links {
        display: none;
    }
}

@keyframes messageEntrance {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-bubble-row {
    animation: messageEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(204, 120, 92, 0.25);
    }
    50% {
        box-shadow: 0 0 24px rgba(204, 120, 92, 0.55);
    }
}

.input-box-wrapper {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-box-wrapper:focus-within {
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 1px var(--accent-terracotta), 0 8px 32px rgba(204, 120, 92, 0.18);
}

.btn-submit-chat.has-text {
    animation: pulseGlow 2.4s infinite;
}

.glass-card, .claude-model-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}

.claude-model-card:hover {
    transform: translateY(-2px) scale(1.004);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(204, 120, 92, 0.12);
}

@keyframes shimmerAnim {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.m-badge-recommended {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.15) 0%, rgba(234, 179, 8, 0.35) 50%, rgba(234, 179, 8, 0.15) 100%);
    background-size: 200% 100%;
    animation: shimmerAnim 3s infinite linear;
}

@keyframes livePulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px #34d399; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.pulse-emerald {
    animation: livePulse 2s infinite ease-in-out;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.lang-switch-btn:hover {
    background: rgba(204, 120, 92, 0.15);
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
    transform: translateY(-1px);
}

.thinking-box {
    margin: 12px 0;
    background: rgba(10, 14, 22, 0.6);
    border: 1px solid rgba(204, 120, 92, 0.22);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}

.thinking-box summary {
    padding: 9px 14px;
    background: rgba(204, 120, 92, 0.08);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-terracotta);
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    list-style: none;
}

.thinking-box summary::-webkit-details-marker {
    display: none;
}

.thinking-box[open] summary {
    border-bottom: 1px solid rgba(204, 120, 92, 0.15);
}

.thinking-content {
    padding: 12px 14px;
    font-size: 0.83rem;
    line-height: 1.6;
    color: #94a3b8;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    max-height: 380px;
    overflow-y: auto;
}

.auto-route-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(204, 120, 92, 0.12);
    border: 1px solid rgba(204, 120, 92, 0.25);
    font-size: 0.72rem;
    color: var(--accent-terracotta);
    margin-bottom: 8px;
}

.claude-pill-action.adult-active {
    background: rgba(244, 63, 94, 0.18) !important;
    border-color: rgba(244, 63, 94, 0.55) !important;
    color: #fda4af !important;
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.22);
}
