/* HUSG AI - Workspace Switcher Design */
/* مستوحى من ChatGPT / Claude */

:root {
    --primary: #14b8a6;
    --primary-light: #2dd4bf;
    --primary-dark: #0d9488;
    --secondary: #64748b;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --card: #ffffff;
    --card-hover: #f8fafc;
    --sidebar-bg: #f1f5f9;
    
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --shadow-glow: rgba(20, 184, 166, 0.3);
    
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #14b8a6;
    
    --gradient-btn: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
    
    --sidebar-width: 260px;
    --header-height: 56px;
    --mobile-nav-height: 64px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Z-index system */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-tooltip: 60;
}

[data-theme="dark"] {
    --primary: #2dd4bf;
    --primary-light: #5eead4;
    --primary-dark: #14b8a6;
    --secondary: #94a3b8;
    --accent: #22d3ee;
    --accent-light: #67e8f9;
    
    --bg: #0a1628;
    --bg-secondary: #0f2744;
    --card: #0f2744;
    --card-hover: #143556;
    --sidebar-bg: #0c1e36;
    
    --text: #f0fdfa;
    --text-light: #99f6e4;
    --text-muted: #64748b;
    
    --border: #1e3a5f;
    --border-light: #1e3a5f;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --shadow-glow: rgba(45, 212, 191, 0.4);
    
    --input-bg: #0f2744;
    --input-border: #1e3a5f;
    --input-focus: #2dd4bf;
}

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

html, body {
    height: 100dvh;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.overlay.active {
    display: block;
}

/* ========== APP CONTAINER ========== */
.app-container {
    display: flex;
    height: 100dvh;
    overflow: hidden;
    will-change: width;
    contain: style;
    transition: none;
}

/* ========== CONVERSATIONS SIDEBAR ========== */
.conversations-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-inline-end: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--sidebar-width);
    transition: flex-basis 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-fixed);
    will-change: flex-basis, width;
}

.conversations-sidebar.collapsed {
    width: 0;
    flex-basis: 0;
    flex-grow: 0;
    flex-shrink: 0;
    min-width: 0;
    border-inline-end: none;
    overflow: hidden;
    display: none;
}

.conversations-sidebar.collapsed .new-chat-btn {
    display: none;
}

.conversations-sidebar.collapsed .sidebar-search {
    display: none;
}

/* Sidebar Search */
.sidebar-search {
    position: relative;
    margin: 0 12px 12px;
}

.sidebar-search .search-icon {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 12px;
    padding-inline-end: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 12px;
}

.conversations-section {
    margin-bottom: 16px;
}

.pinned-section .section-title {
    color: var(--primary);
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title svg {
    flex-shrink: 0;
}

/* Conversation Item */
.conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-bottom: 4px;
}

.conversation-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.conversation-item-icon svg {
    width: 16px;
    height: 16px;
}

.conversation-item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.conversation-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.conversation-item-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    margin-inline-start: auto;
}

.conversation-item:hover .conversation-item-actions {
    opacity: 1;
}

.conv-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-secondary);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.conv-action-btn:hover {
    background: var(--card);
    color: var(--text);
}

.conv-action-btn.pin-btn:hover {
    color: var(--primary);
}

.conv-action-btn.delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.conversation-item.pinned .conv-action-btn.pin-btn {
    color: var(--primary);
}

.conversation-item:hover {
    background: var(--card);
}

.conversation-item.active {
    background: var(--primary);
    color: white;
}

.conversation-item.active .conversation-item-title,
.conversation-item.active .conversation-item-preview,
.conversation-item.active .conversation-item-icon {
    color: white;
}

.conversation-item.active .conversation-item-icon {
    background: rgba(255, 255, 255, 0.2);
}

.conversation-item.active .conv-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Delete Confirmation Modal */
.delete-confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.delete-confirm-modal.active {
    opacity: 1;
    visibility: visible;
}

.delete-confirm-content {
    background: var(--card);
    padding: 24px;
    border-radius: var(--radius-md);
    max-width: 320px;
    text-align: center;
}

.delete-confirm-content h3 {
    margin-bottom: 8px;
    color: var(--text);
}

.delete-confirm-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.delete-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-confirm-actions button {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-cancel-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
}

.delete-cancel-btn:hover {
    background: var(--card-hover);
}

.delete-confirm-btn {
    background: var(--danger);
    border: none;
    color: white;
}

.delete-confirm-btn:hover {
    background: #dc2626;
}

/* New Chat Button */
.new-chat-btn {
    width: calc(100% - 24px);
    margin: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
    min-width: 200px;
    white-space: nowrap;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
}

.new-chat-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.sidebar-bottom {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-action {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-action:hover {
    background: var(--card);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ========== APP HEADER ========== */
.app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.workspace-tabs {
    flex: 1;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
    display: none;
}

.workspace-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.workspace-tab:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.workspace-tab.active {
    background: var(--primary);
    color: white;
}

.workspace-tab svg {
    width: 16px;
    height: 16px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* ========== WORKSPACE CONTENT ========== */
.workspace-content {
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
    transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace {
    display: none;
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.workspace.active {
    display: flex;
    flex-direction: column;
}

.workspace-inner {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.workspace-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.workspace-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    
}

.search-box {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.search-box svg {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* ========== CHAT WORKSPACE ========== */
.chat-workspace {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    padding-bottom: 20px;
    justify-content: center;
}

.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    min-height: 50vh;
    flex: 1;
}

.chat-welcome.hidden {
    display: none;
}

.welcome-logo {
    margin-bottom: 24px;
}

.welcome-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-glow);
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
    
}

.suggestion-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 600px;
    width: 100%;
}

.suggestion-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    
}

.suggestion-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    
}

/* Chat Messages */
.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 0 140px;
    margin-bottom: 0;
    contain: layout style;
}

.chat-messages:empty + .chat-input-area .chat-welcome {
    display: flex;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    animation: messageSlide 0.3s ease;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--accent);
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    /* Fix BiDi text mixing (Arabic + English) */
    
    text-align: start;
}

/* Isolate code blocks from RTL context */
.message-content code,
.message-content pre {
    
    direction: ltr;
    text-align: left;
}

.message.user .message-content {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Chat Input - Modern AI-style centered design */
.chat-input-area {
    position: relative;
    margin: 0 auto;
    padding: 0 16px;
    background: transparent;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

/* When chat has messages, fix input at bottom */
.chat-input-area.fixed-bottom {
    position: fixed;
    bottom: 8px;
    inset-inline-start: var(--sidebar-width);
    inset-inline-end: 0;
    max-width: none;
    padding: 16px 24px 16px;
    background: linear-gradient(to top, var(--bg) 80%, transparent);
    will-change: inset-inline-start;
    z-index: var(--z-fixed);
    transition: inset-inline-start 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-input-area.fixed-bottom .input-container {
    margin: 0 auto;
    width: 100%;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
}

.attachments-preview {
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
}

.attachments-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    flex: 1 1 auto;
    will-change: border-color, box-shadow;
}

.input-container:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.15);
}

.input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2), 0 4px 20px rgba(20, 184, 166, 0.15);
}

.attach-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.attach-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.attach-btn svg {
    width: 20px;
    height: 20px;
}

.chat-input {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--text);
    outline: none;
    min-height: 24px;
}

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

.voice-btn, .send-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-btn {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.voice-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.voice-btn.recording {
    background: var(--danger);
    color: white;
    animation: pulse 1s infinite;
}

.send-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn svg, .voice-btn svg {
    width: 20px;
    height: 20px;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 4px;
}

.model-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== TOOL CARDS ========== */
.tool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
}

.tool-card.full-height {
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.tool-actions.inline {
    margin-top: 0;
}

.primary-btn, .secondary-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.primary-btn {
    background: var(--gradient-btn);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-glow);
}

.secondary-btn {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background: var(--bg);
}

/* ========== GPA FORM ========== */
.gpa-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-field {
    flex: 1;
}

.form-field.full-width {
    flex: 100%;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.result-box {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.result-box:empty {
    display: none;
}

/* ========== JAVA IDE ========== */
.code-editor {
    flex: 1;
    min-height: 300px;
    width: 100%;
    padding: 16px;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #d4d4d4;
    resize: none;
    outline: none;
}

.output-section {
    margin-top: 16px;
}

.output-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.output {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: var(--text);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* ========== CALCULATOR ========== */
.calculator-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px var(--shadow);
    max-width: 380px;
    margin: 0 auto;
}

.calc-display {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--background) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    margin-bottom: 24px;
    position: relative;
    min-height: 90px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calc-memory-indicator {
    position: absolute;
    top: 8px;
    inset-inline-start: 12px;
    font-size: 11px;
    color: var(--primary);
    font-weight: bold;
    letter-spacing: 1px;
}

.calc-screen-upper {
    font-size: 13px;
    color: var(--text-light);
    min-height: 20px;
    word-break: break-all;
    margin-bottom: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.calc-screen-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.calc-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-row {
    display: flex;
    gap: 8px;
}

.calc-btn, .calc-btn-small, .calc-btn-num, .calc-btn-op, .calc-btn-action, .calc-btn-equals {
    flex: 1;
    padding: 14px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.calc-btn-small {
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 11px;
    border-color: var(--border);
}

.calc-btn {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border);
}

.calc-btn-num {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--background) 100%);
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--primary);
}

.calc-btn-op {
    background: var(--primary);
    color: white;
    font-size: 16px;
    border-color: var(--primary);
    font-weight: 700;
}

.calc-btn-action {
    font-size: 14px;
}

.calc-del {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #ef4444;
    border-color: #ef4444;
}

.calc-ac {
    background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
    color: white;
    border-color: var(--primary);
}

.calc-btn-equals {
    background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
    color: white;
    font-size: 18px;
    border-color: var(--primary);
    grid-column: span 1;
}

.calc-btn:hover {
    background: var(--border);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.calc-btn-small:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.calc-btn-num:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
    border-color: #06b6d4;
}

.calc-btn-op:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
    filter: brightness(1.1);
}

.calc-btn-action:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.calc-del:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.calc-ac:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.calc-btn-equals:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* ========== STUDY PLANS ========== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.plan-category {
    margin-bottom: 32px;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.plan-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.plan-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.plan-card p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== ANNOUNCEMENTS ========== */
.announcement-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px var(--shadow);
}

.announcement-form .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.announcement-form .form-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.announcement-form .close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.announcement-form .close-btn:hover {
    background: var(--bg-secondary);
    color: var(--danger);
}

.announcement-form .form-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.announcement-form .form-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.announcement-form input,
.announcement-form textarea,
.announcement-form select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.announcement-form input:focus,
.announcement-form textarea:focus,
.announcement-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.announcement-form textarea {
    min-height: 100px;
    resize: vertical;
}

.announcement-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.announcement-form .form-actions .primary-btn {
    flex: 1;
}

.announcements-filters {
    margin-bottom: 24px;
}

.announcements-filters .filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.announcements-filters input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
}

.announcements-filters select {
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
    min-width: 150px;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.announcement-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--shadow);
    transform: translateY(-2px);
}

.announcement-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    width: fit-content;
}

.announcement-category[data-category="academic"] {
    background: var(--accent);
}

.announcement-category[data-category="hiring"] {
    background: var(--success);
}

.announcement-category[data-category="events"] {
    background: var(--warning);
}

.announcement-card .announcement-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

.announcement-card .announcement-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.announcement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.announcement-date {
    font-size: 12px;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 16px;
}

/* Legacy support */
.announcement-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.announcement-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.announcement-item p {
    font-size: 13px;
    color: var(--text-light);
}

/* ========== ABOUT PAGE ========== */
.about-card {
    text-align: center;
    padding: 48px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 700px;
    margin: 0 auto;
}

.about-logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--shadow-glow);
}

.about-card h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.about-tagline {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 32px;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.feature {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text);
}

.about-footer {
    color: var(--text-muted);
    font-size: 13px;
}

.about-footer p {
    margin-bottom: 8px;
}

.about-content {
    text-align: center;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 32px;
}

.about-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}

.about-section p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.6;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.technologies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tech-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    border-inline-start: 4px solid var(--primary);
}

.tech-category {
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.tech-list {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    line-height: 1.5;
}

.linkedin-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gradient-btn);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 500;
    margin-top: 16px;
}

/* ========== MOBILE NAVIGATION ========== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: var(--mobile-nav-height);
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 50;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
}

.mobile-nav-btn.active {
    color: var(--primary);
}

.mobile-nav-btn svg {
    width: 22px;
    height: 22px;
}

.more-menu {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + 8px + env(safe-area-inset-bottom));
    inset-inline-end: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    z-index: 55;
}

.more-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.more-menu-item:hover {
    background: var(--bg-secondary);
}

/* ========== AUTH FORM STYLES (used by modal) ========== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-btn);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-glow);
}

.auth-switch {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ========== TERMS PAGE ========== */
.terms-page {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.terms-page-container {
    max-width: 600px;
    padding: 40px;
    background: var(--card);
    border-radius: var(--radius-xl);
    margin: 20px;
}

.terms-page-header h1 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.terms-page-content {
    color: var(--text);
}

.terms-page-content ul {
    margin: 20px 0;
    padding-inset-inline-end: 24px;
}

.terms-page-content li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.terms-page-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    justify-content: center;
}

.terms-page-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#terms-page-continue {
    width: 100%;
    padding: 14px;
    background: var(--gradient-btn);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#terms-page-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes typing {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    align-items: center;
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite;
    opacity: 0.7;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ========== MESSAGE ACTIONS ========== */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    opacity: 0.3;
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

.message:hover .message-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.like-btn:hover { color: #10b981; border-color: #10b981; background: rgba(16, 185, 129, 0.1); }
.dislike-btn:hover { color: #ef4444; border-color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.regenerate-btn:hover { color: var(--primary); }
.edit-btn:hover { color: #8b5cf6; border-color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }
.report-btn:hover { color: #f59e0b; border-color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

/* ========== CODE BLOCKS ========== */
.code-block {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 12px 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2d2d2d;
    color: #ccc;
    font-size: 12px;
}

.code-content {
    padding: 12px 16px;
    color: #d4d4d4;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
}

.copy-btn {
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    color: #ccc;
    font-size: 11px;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .conversations-sidebar {
        position: fixed;
        inset-inline-start: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: var(--z-modal-backdrop);
    }
    
    .conversations-sidebar.open {
        transform: translateX(0);
    }
    
    .workspace-tabs {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .workspace-content {
        padding-bottom: var(--mobile-nav-height);
    }
    
    .workspace-inner {
        padding: 16px;
    }
    
    .suggestion-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .tool-card {
        padding: 24px;
    }
    
    .calculator-container {
        max-width: 100%;
    }
    
    .about-card {
        padding: 32px 24px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
    
    .chat-input-area {
        padding: 12px 16px;
        max-width: 100%;
    }
    
    .chat-input-area .input-container {
        border-radius: 24px;
        padding: 10px 14px;
    }
    
    .chat-input-area.fixed-bottom {
        inset-inline-start: 0;
        inset-inline-end: 0;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 12px 16px 20px;
        will-change: transform;
    }
    
    .chat-messages {
        padding: 20px 0 160px;
    }
    
    .chat-workspace {
        padding-bottom: calc(160px + var(--mobile-nav-height));
    }
}


/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Hide scrollbar for Firefox */
* {
    scrollbar-width: none;
}

/* ========== PROJECTS WORKSPACE ========== */
.project-form {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.project-form h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 600;
}

.project-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.project-form .form-row.full {
    grid-template-columns: 1fr;
}

.project-form input,
.project-form textarea,
.project-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    background: var(--background);
    color: var(--text);
}

.project-form textarea {
    resize: vertical;
    min-height: 100px;
}

.projects-list {
    margin-top: 24px;
}

.projects-list h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 600;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.project-header h4 {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.project-major {
    font-size: 13px;
    color: var(--secondary);
    margin: 4px 0;
}

.project-desc {
    font-size: 14px;
    color: var(--text);
    margin: 8px 0;
    line-height: 1.5;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--secondary);
}

.project-author {
    font-weight: 500;
}

.project-contact {
    color: var(--primary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .project-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== PROFILE PAGE ========== */
.profile-container {
    max-width: 700px;
    margin: 0 auto;
}

.profile-not-logged-in {
    text-align: center;
    padding: 60px 20px;
}

.profile-login-prompt {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    margin: 0 auto;
}

.profile-icon {
    width: 80px;
    height: 80px;
    color: var(--primary);
    margin-bottom: 20px;
}

.profile-login-prompt h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.profile-login-prompt p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-providers {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-providers p {
    font-size: 13px;
    margin-bottom: 12px;
}

.provider-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.provider-icon {
    padding: 8px 16px;
    background: var(--card-hover);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
}

.profile-logged-in {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.profile-header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.4rem;
    color: var(--text);
    margin: 0 0 4px 0;
}

.profile-email {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.profile-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.profile-form .form-group {
    margin-bottom: 0;
}

.profile-form .form-group.full-width {
    grid-column: 1 / -1;
}

.profile-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.profile-form textarea {
    min-height: 80px;
    resize: vertical;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.secondary-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.stat-card {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions {
        flex-direction: column;
    }
}

/* ========== AUTH MODAL ========== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal {
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 32px;
    position: relative;
    animation: slideUp 0.4s ease;
}

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

.auth-modal-close {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

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

.auth-modal-header h2 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-modal-oauth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.auth-oauth-btn:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.auth-oauth-btn svg {
    width: 20px;
    height: 20px;
}

.auth-modal-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    color: var(--text-muted);
}

.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-modal-divider span {
    font-size: 13px;
    font-weight: 500;
}

.auth-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text);
    transition: all 0.3s ease;
}

.auth-form-group input::placeholder {
    color: var(--text-muted);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.auth-form-group input.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.auth-form-group input.success {
    border-color: var(--primary);
    background: rgba(20, 184, 166, 0.1);
}

.auth-validation-msg {
    font-size: 12px;
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.auth-validation-msg.error {
    color: var(--danger);
}

.auth-validation-msg.success {
    color: var(--primary);
}

.auth-password-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .auth-password-row {
        grid-template-columns: 1fr;
    }
}

.auth-password-strength {
    margin-top: 8px;
    display: none;
}

.auth-strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.auth-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.auth-strength-fill.weak {
    width: 33%;
    background: var(--danger);
}

.auth-strength-fill.fair {
    width: 66%;
    background: var(--warning);
}

.auth-strength-fill.strong {
    width: 100%;
    background: var(--primary);
}

.auth-strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: var(--text-muted);
}

.auth-modal-form .auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-modal-form .auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow-glow);
}

.auth-modal-form .auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-modal-form .auth-submit-btn.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-modal-form .auth-submit-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-success-msg {
    background: rgba(20, 184, 166, 0.1);
    border: 2px solid var(--primary);
    color: var(--text);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 13px;
    display: none;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-modal-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-inset-inline-end: 4px;
}

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

.auth-skip-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.auth-skip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-secondary);
}

/* ========== ENHANCED CODE BLOCKS ========== */
.code-block-enhanced {
    background: #1e1e2e;
    border-radius: var(--radius-md);
    margin: 12px 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.code-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2d2d3d;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.code-lang {
    font-size: 12px;
    color: #8be9fd;
    font-weight: 600;
    text-transform: uppercase;
}

.copy-btn-enhanced {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #f8f8f2;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn-enhanced:hover {
    background: rgba(255,255,255,0.2);
}

.copy-btn-enhanced.copied {
    background: #50fa7b;
    color: #1e1e2e;
}

.code-body {
    display: flex;
    overflow-x: auto;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    background: #2d2d3d;
    color: #6272a4;
    user-select: none;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    min-width: 40px;
}

.line-numbers span {
    padding: 0 12px;
}

.code-content-enhanced {
    flex: 1;
    margin: 0;
    padding: 12px 16px;
    overflow-x: auto;
    background: transparent;
}

.code-content-enhanced code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #f8f8f2;
    white-space: pre;
}

/* ========== MARKDOWN STYLES ========== */
.text-block {
    margin: 8px 0;
}

.md-h1 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--text);
    
}

.md-h2 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 14px 0 6px;
    color: var(--text);
    
}

.md-h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 12px 0 4px;
    color: var(--text);
    
}

.inline-code {
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.md-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}

.md-link:hover {
    border-bottom-style: solid;
}

.md-list, .md-list-ordered {
    margin: 8px 0;
    padding-inset-inline-end: 20px;
}

.md-list-item, .md-list-item-num {
    margin: 4px 0;
    line-height: 1.6;
}

/* ========== SOURCES TOGGLE BUTTON ========== */
.sources-container {
    position: relative;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.sources-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sources-toggle-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.sources-toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.sources-icon-svg {
    flex-shrink: 0;
}

.sources-count {
    font-weight: 500;
}

.source-external-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========== SOURCES DROPDOWN ========== */
.sources-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    animation: slideUp 0.2s ease;
}

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

.sources-dropdown.hidden {
    display: none;
}

.sources-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.source-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.source-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.source-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.source-item:hover .source-number {
    background: white;
    color: var(--primary);
}

.source-title {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Old source chip styles - hidden */
.rag-sources { display: none; }
.sources-label { display: none; }
.source-chip { display: none; }

/* ========== ATTACHMENT BLOCK ========== */
.attachment-block {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-inline-start: 3px solid var(--primary);
}

.attachment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.attachment-link:hover {
    text-decoration: underline;
}

/* ========== ENHANCED JAVA IDE ========== */
.java-ide-container {
    position: relative;
}

.code-editor-wrapper {
    display: flex;
    background: #1e1e2e;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.editor-line-numbers {
    padding: 12px 0;
    background: #2d2d3d;
    color: #6272a4;
    user-select: none;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    min-width: 45px;
    border-inline-end: 1px solid rgba(255,255,255,0.1);
}

.editor-line-numbers span {
    display: block;
    padding: 0 12px 0 8px;
}

.code-editor {
    flex: 1;
    padding: 12px 16px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #1e1e2e;
    color: #f8f8f2;
    border: none;
    resize: none;
    min-height: 250px;
}

.code-editor:focus {
    outline: none;
}

.piston-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.piston-badge a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.piston-badge a:hover {
    text-decoration: underline;
}

/* AI Avatar styling */
.ai-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-secondary);
    padding: 4px;
}
.message-content,
.welcome-title,
.welcome-subtitle,
.card-title,
.card-desc,
.text-block,
.md-h1,
.md-h2,
.md-h3,
.workspace-header h2 {
}

/* ========== LTR DIRECTION FOR UI ELEMENTS ========== */
.app-header,
.conversations-sidebar,
.workspace-tabs,
.header-actions,
.chat-input-area,
.input-container,
.auth-modal,
.send-btn,
.primary-btn,
.secondary-btn,
.button,
button,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
.code-editor,
.chat-input,
.search-box,
.form-group,
.workspace-tab,
.message-actions {
    direction: ltr;
}

/* ========== Contact Page Styles - تواصل معنا ========== */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--gradient-btn);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px var(--shadow-glow);
}

.contact-icon svg {
    stroke: white;
}

.contact-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.contact-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

.contact-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .contact-form-row {
        grid-template-columns: 1fr;
    }
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form-group.full-width {
    margin-bottom: 20px;
}

.contact-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.contact-form-group label .required {
    color: var(--danger);
}

.contact-form-group input,
.contact-form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.contact-submit-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-glow);
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--shadow-glow);
}

.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-submit-btn svg {
    stroke: white;
}

.contact-success-msg,
.contact-error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    font-weight: 500;
}

.contact-success-msg {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.contact-success-msg svg {
    stroke: var(--success);
}

.contact-error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.contact-error-msg svg {
    stroke: var(--danger);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.contact-info-item svg {
    stroke: var(--primary);
}

.contact-info-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-item a:hover {
    color: var(--accent);
}

/* Loading state for submit button */
.contact-submit-btn.loading {
    pointer-events: none;
}

.contact-submit-btn.loading span {
    display: none;
}

.contact-submit-btn.loading::after {
    content: "جاري الإرسال...";
    animation: pulse 1.5s infinite;
}

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

/* ========== Turnstile CAPTCHA Styles ========== */
.turnstile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    gap: 8px;
}

.cf-turnstile {
    margin: 0 auto;
}

.turnstile-error {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid var(--danger);
}

/* Auth modal turnstile */
#auth-turnstile-container {
    margin-top: 10px;
    margin-bottom: 5px;
}

/* Contact form turnstile */
#contact-turnstile-container {
    margin-top: 10px;
}
