:root {
    --bg-gradient: linear-gradient(135deg, #070913 0%, #0f0c24 50%, #05040e 100%);
    --panel-bg: rgba(22, 21, 38, 0.45);
    --panel-border: rgba(255, 255, 255, 0.07);
    --panel-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --sidebar-bg: rgba(12, 11, 25, 0.7);
    --hover-bg: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(255, 255, 255, 0.04);
    --bubble-bg: rgba(255, 255, 255, 0.04);
    --skeleton-bg: rgba(255, 255, 255, 0.03);
    --skeleton-shine: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f3f9;
    --text-secondary: #9aa2b8;
    --text-muted: #5e667e;
    --text-heading: #ffffff;
    --primary: #6366f1;         
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #a855f7;       
    --accent: #06b6d4;          
    --accent-glow: rgba(6, 182, 212, 0.35);
    --success: #10b981;
    --error: #ef4444;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.light-theme {
    --bg-gradient: #f8fafc;
    --panel-bg: #ffffff;
    --panel-border: #e2e8f0;
    --panel-glow: 0 4px 20px rgba(0, 0, 0, 0.04);
    --sidebar-bg: #ffffff;
    --hover-bg: #f1f5f9;
    --border-light: #e2e8f0;
    --input-bg: #ffffff;
    --bubble-bg: #f8fafc;
    --skeleton-bg: #f1f5f9;
    --skeleton-shine: #e2e8f0;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-heading: #0f172a;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --secondary: #9333ea;
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.15);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    overflow: auto; 
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}
@media (max-width: 767px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 20;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: block;
        position: absolute;
        top: 12px;
        left: 12px;
        background: var(--panel-bg);
        border: 1px solid var(--panel-border);
        color: var(--text-primary);
        border-radius: 8px;
        padding: 8px;
        cursor: pointer;
        z-index: 30;
    }
    .workspace {
        padding: 16px;
    }
}
@media (min-width: 768px) {
    .sidebar-toggle { display: none; }
}
img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
    display: block;
}
.modal {
    width: 90vw;
    max-width: 500px;
    margin: auto;
}
.sidebar {
    width: 320px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    z-index: 10;
    transition: var(--transition);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}
.brand-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-glow);
}
.brand-icon {
    width: 24px;
    height: 24px;
    color: #fff;
}
.brand-info h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-heading);
}
.brand-info span {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 10px;
}
.doc-info-card {
    background: var(--hover-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.doc-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.meta-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}
.meta-details {
    overflow: hidden;
}
.doc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-pages {
    font-size: 11px;
    color: var(--text-secondary);
}
.sidebar-nav {
    flex-grow: 1;
    margin-bottom: 24px;
}
.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nav-item {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}
.nav-item i {
    width: 18px;
    height: 18px;
}
.nav-item:hover:not(:disabled) {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid var(--primary);
    color: var(--text-primary);
    box-shadow: inset 5px 0 15px rgba(99, 102, 241, 0.05);
}
.nav-item:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}
.export-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.sidebar-footer {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}
.workspace {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.workspace-screen {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.screen-header {
    margin-bottom: 30px;
}
.screen-header h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-heading);
    margin-bottom: 6px;
}
.screen-header p {
    font-size: 14px;
    color: var(--text-secondary);
}
.glass-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--panel-glow);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-secondary {
    background: var(--hover-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--border-light);
    color: var(--text-heading);
}
.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}
.btn-block {
    width: 100%;
    padding: 14px;
}
.btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
}
.hidden {
    display: none !important;
}
.upload-card {
    padding: 50px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    max-width: 580px;
}
.upload-icon-large {
    width: 64px;
    height: 64px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
    margin-bottom: 24px;
}
.upload-card h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 12px;
}
.upload-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.5;
}
.drop-zone {
    width: 100%;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 40px 20px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.04);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}
.drop-icon {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    transition: var(--transition);
}
.drop-zone:hover .drop-icon {
    color: var(--accent);
    transform: translateY(-4px);
}
.browse-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}
.hidden-input {
    display: none;
}
.upload-progress-container {
    width: 100%;
    margin-top: 30px;
    text-align: left;
}
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.4s ease;
}
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    overflow: hidden;
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}
.message-bubble {
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.message-bubble img {
    max-width: 100%;
    height: auto;
}
.message-user {
    align-items: flex-end;
}
.message-user .message-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(99, 102, 241, 0.7) 100%);
    color: #fff;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.message-assistant {
    align-items: flex-start;
}
.message-assistant .message-bubble {
    background: var(--bubble-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}
.message-system {
    justify-content: center;
}
.message-system .message-bubble {
    background: var(--primary-glow);
    border: 1px dashed var(--primary);
    color: var(--text-secondary);
    text-align: center;
    max-width: 90%;
}
.btn-copy-chat {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}
.message-bubble:hover .btn-copy-chat {
    opacity: 1;
}
.btn-copy-chat:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}
.btn-copy-chat .copy-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}
.follow-up-questions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-follow-up {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.btn-follow-up:hover {
    background: var(--primary);
    color: white;
}
.sources-list {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
}
.sources-list p {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}
.source-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.15);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 6px;
    margin-bottom: 4px;
    cursor: help;
}
.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--panel-bg);
}
#chat-form {
    display: flex;
    gap: 12px;
}
#chat-input {
    flex-grow: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}
select {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}
select:hover {
    border-color: var(--primary);
}
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}
select option {
    background: var(--panel-bg);
    color: var(--text-primary);
    padding: 12px;
}
#chat-input:focus {
    border-color: var(--primary);
    background: var(--input-bg);
    box-shadow: 0 0 10px var(--primary-glow);
}
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typingPulse 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingPulse {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}
.summary-container {
    padding: 30px;
    height: calc(100vh - 160px);
    overflow-y: auto;
}
.markdown-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}
.markdown-body h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: #fff;
    margin-top: 30px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}
.markdown-body h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--accent);
    margin-top: 20px;
    margin-bottom: 10px;
}
.markdown-body p {
    margin-bottom: 16px;
}
.markdown-body ul, .markdown-body ol {
    margin-bottom: 16px;
    padding-left: 20px;
}
.markdown-body li {
    margin-bottom: 6px;
}
.tab-empty-state {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}
.tab-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 18px;
}
.tab-empty-state p {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 380px;
    margin-bottom: 10px;
}
.quiz-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}
.quiz-box {
    padding: 30px;
}
.quiz-progress {
    margin-bottom: 24px;
}
.quiz-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.quiz-question {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 24px;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.option-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}
.option-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}
.option-label {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
}
.option-btn.correct {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: var(--success) !important;
    color: #fff;
}
.option-btn.correct .option-label {
    background: var(--success);
    color: #fff;
}
.option-btn.incorrect {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: var(--error) !important;
    color: #fff;
}
.option-btn.incorrect .option-label {
    background: var(--error);
    color: #fff;
}
.quiz-explanation {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.5;
}
.explanation-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}
.explanation-title i {
    width: 16px;
    height: 16px;
}
.quiz-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.score-screen {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.score-radial {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--accent);
    border-right-color: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
    margin-bottom: 10px;
}
.score-radial span {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}
.score-radial p {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}
.score-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.flashcards-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.flashcard-wrapper {
    perspective: 1000px;
    height: 200px;
    cursor: pointer;
}
.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.flashcard-wrapper:hover .flashcard-inner {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}
.flashcard-wrapper.flipped .flashcard-inner {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--panel-border);
    box-shadow: var(--panel-glow);
}
.card-front {
    background: var(--panel-bg);
    color: var(--text-primary);
}
.card-front h4 {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.card-front p {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}
.card-back {
    background: var(--panel-bg);
    transform: rotateY(180deg);
    color: var(--text-primary);
    position: relative;
}
.card-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-glow);
    border-radius: 14px;
    z-index: -1;
}
.card-back h4 {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.card-back p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}
.definitions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}
.definition-card {
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 18px 24px;
    transition: var(--transition);
}
.definition-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--panel-glow);
    transform: translateY(-2px);
}
.definition-card h4 {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}
.definition-card p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}
.skeleton-loader {
    width: 100%;
}
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-shine) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonGlow 1.4s ease infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}
.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 20px;
}
.skeleton-text {
    height: 14px;
    width: 100%;
}
.skeleton-card {
    height: 200px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-shine) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonGlow 1.4s ease infinite;
    border-radius: 14px;
}
@keyframes skeletonGlow {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.mobile-only {
    display: none !important;
}
/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 768px) {
    .sidebar-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline-flex !important;
    }
    body {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 5px 0 25px rgba(0,0,0,0.5);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .workspace {
        padding: 80px 20px 20px 20px;
    }
    .chat-container {
        height: calc(100vh - 180px);
    }
}