/* ===================================
   SCHOLRGPT AI PAGE - SAME VISUAL LANGUAGE
   =================================== */

:root {
    /* Colors - Same as dashboard */
    --bg-dark: #0a0a0c;
    --bg-card: rgba(20, 20, 25, 0.6);
    --accent-blue: #00d2ff;
    --accent-red: #ff3e3e;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.06);

    /* Layout */
    --sidebar-width: 260px;
    --spacing-unit: 8px;

    /* Effects */
    --glass-blur: blur(16px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI Light Mode Overrides */
.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a;
    --text-muted: #334155;
    --border-color: rgba(0, 0, 0, 0.1);
    --accent-blue: #2563eb;
}

/* High Contrast Mode Overrides */
.high-contrast {
    --bg-dark: #000000;
    --bg-card: #000000;
    --text-main: #FFFFFF;
    --text-muted: #E0E0E0;
    --border-color: #FFFFFF;
    --accent-blue: #00FFFF;
    --accent-red: #FF00FF;
}

.high-contrast .ai-panel-card {
    background: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .ai-panel-icon {
    border: 2px solid #FFFFFF !important;
    background: #000000 !important;
}

.high-contrast .ai-panel-title,
.high-contrast .ai-panel-description {
    color: #FFFFFF !important;
}

.high-contrast .ai-panel-arrow {
    background: #00FFFF !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .sidebar {
    background: #000000 !important;
    border-right: 2px solid #FFFFFF !important;
}

.high-contrast .nav-link {
    color: #FFFFFF !important;
    border: 1px solid #FFFFFF !important;
}

.high-contrast .nav-link:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
}

.high-contrast .nav-link.active {
    background: #00FFFF !important;
    color: #000000 !important;
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.5);
}

.high-contrast .nav-link i {
    color: #FFFFFF !important;
}

.high-contrast .nav-link.active i {
    color: #000000 !important;
}

.high-contrast .nav-link span {
    color: #FFFFFF !important;
}

.high-contrast .nav-link.active span {
    color: #000000 !important;
}

.high-contrast .btn-primary {
    background: #00FFFF !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .btn-secondary {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .results-content,
.high-contrast .modal-content {
    background: #000000 !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .results-section h2,
.high-contrast .results-section h3,
.high-contrast .results-section p,
.high-contrast .results-section li {
    color: #FFFFFF !important;
}

.high-contrast .results-section .example-box {
    border: 2px solid #00FFFF !important;
    background: rgba(0, 255, 255, 0.1) !important;
}

.high-contrast .back-btn,
.high-contrast .action-btn {
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
}

.high-contrast .back-btn:hover,
.high-contrast .action-btn:hover {
    background: #00FFFF !important;
    color: #000000 !important;
}

/* AI Light Mode High Contrast Overrides */
.light-mode.high-contrast {
    --bg-dark: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-main: #000000;
    --text-muted: #1a1a1a;
    --border-color: #000000;
    --accent-blue: #000080;
    --accent-red: #8B0000;
}

.light-mode.high-contrast .ai-panel-card {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
    box-shadow: 4px 4px 0 #000000 !important;
}

.light-mode.high-contrast .ai-panel-card:hover {
    background: #FFFFE0 !important;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000000 !important;
}

.light-mode.high-contrast .ai-panel-icon {
    border: 3px solid #000000 !important;
    background: #FFFFFF !important;
}

.light-mode.high-contrast .ai-panel-title,
.light-mode.high-contrast .ai-panel-description {
    color: #000000 !important;
}

.light-mode.high-contrast .ai-panel-title {
    font-weight: 800;
}

.light-mode.high-contrast .ai-panel-arrow {
    background: #000080 !important;
    color: #FFFFFF !important;
    border: 3px solid #000000 !important;
}

.light-mode.high-contrast .sidebar {
    background: #FFFFFF !important;
    border-right: 3px solid #000000 !important;
}

.light-mode.high-contrast .nav-link {
    color: #000000 !important;
    border: 2px solid transparent;
    font-weight: 700;
}

.light-mode.high-contrast .nav-link:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
}

.light-mode.high-contrast .nav-link.active {
    background: #000080 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 128, 0.5);
}

.light-mode.high-contrast .nav-link i {
    color: #000000 !important;
}

.light-mode.high-contrast .nav-link.active i {
    color: #FFFFFF !important;
}

.light-mode.high-contrast .nav-link span {
    color: #000000 !important;
}

.light-mode.high-contrast .nav-link.active span {
    color: #FFFFFF !important;
}

.light-mode.high-contrast .btn-primary {
    background: #000080 !important;
    color: #FFFFFF !important;
    border: 3px solid #000000 !important;
}

.light-mode.high-contrast .btn-primary:hover {
    background: #0000A0 !important;
}

.light-mode.high-contrast .btn-secondary {
    background: transparent !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
}

.light-mode.high-contrast .btn-secondary:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
}

.light-mode.high-contrast .results-content,
.light-mode.high-contrast .modal-content {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
    box-shadow: 4px 4px 0 #000000 !important;
}

.light-mode.high-contrast .results-section h2,
.light-mode.high-contrast .results-section h3,
.light-mode.high-contrast .results-section p,
.light-mode.high-contrast .results-section li {
    color: #000000 !important;
}

.light-mode.high-contrast .results-section h2,
.light-mode.high-contrast .results-section h3 {
    font-weight: 800;
}

.light-mode.high-contrast .results-section .example-box {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
}

.light-mode.high-contrast .back-btn,
.light-mode.high-contrast .action-btn {
    background: #000080 !important;
    color: #FFFFFF !important;
    border: 3px solid #000000 !important;
    font-weight: 700;
}

.light-mode.high-contrast .back-btn:hover,
.light-mode.high-contrast .action-btn:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
}

.light-mode.high-contrast body {
    background: #FFFFFF !important;
}

.light-mode body {
    background:
        radial-gradient(circle at 20% 10%, rgba(52, 76, 235, 0.08), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(255, 62, 62, 0.05), transparent 40%),
        #f0f2f5 !important;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 210, 255, 0.03), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(255, 62, 62, 0.03), transparent 40%),
        var(--bg-dark);
}

/* ===================================
   LAYOUT STRUCTURE
   =================================== */

.ai-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===================================
   SIDEBAR (Same as dashboard)
   =================================== */

.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 15, 20, 0.95);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 3);
    position: relative;
    z-index: 100;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 6);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.nav-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link i {
    font-size: 1.3rem;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.nav-link.active {
    background: rgba(0, 210, 255, 0.08);
    color: var(--accent-blue);
    box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.2);
}

.nav-link.active i {
    color: var(--accent-blue);
}

.sidebar-footer {
    padding-top: calc(var(--spacing-unit) * 3);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

/* ===================================
   MAIN VIEWPORT
   =================================== */

.main-viewport {
    flex: 1;
    overflow-y: auto;
    padding: calc(var(--spacing-unit) * 5);
    position: relative;
}

.main-viewport::-webkit-scrollbar {
    width: 6px;
}

.main-viewport::-webkit-scrollbar-track {
    background: transparent;
}

.main-viewport::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ===================================
   TOP BAR
   =================================== */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.greeting h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.greeting p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===================================
   AI PANELS GRID
   =================================== */

.ai-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    place-items: center;
    min-height: calc(100vh - 200px);
    align-content: center;
}

.ai-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: var(--glass-blur);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 300px;
    width: 100%;
    box-sizing: border-box;
    transform: translateY(0);
}

.ai-panel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.ai-panel-card:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 210, 255, 0.25);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 210, 255, 0.1),
        0 0 50px rgba(0, 210, 255, 0.1);
    backdrop-filter: blur(24px);
}

.ai-panel-card:hover::before {
    opacity: 1;
}

.ai-panel-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.ai-panel-icon i {
    font-size: 2rem !important;
}

.ai-panel-card:hover .ai-panel-icon {
    background: var(--accent-blue);
    color: #000;
    transform: translateY(-8px) scale(1.2);
    box-shadow: 0 12px 30px rgba(0, 210, 255, 0.4);
}

.explainer-panel .ai-panel-icon {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.2);
    color: var(--accent-blue);
}

.quiz-panel .ai-panel-icon {
    background: rgba(255, 62, 62, 0.1);
    border-color: rgba(255, 62, 62, 0.2);
    color: var(--accent-red);
}

.quiz-panel:hover .ai-panel-icon {
    background: var(--accent-red);
    transform: translateY(-8px) scale(1.2);
    box-shadow: 0 12px 30px rgba(255, 62, 62, 0.4);
}

.ai-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.ai-panel-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.ai-panel-arrow {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ai-panel-card:hover .ai-panel-arrow {
    background: rgba(0, 210, 255, 0.15);
    border-color: rgba(0, 210, 255, 0.3);
    color: var(--accent-blue);
    transform: translateX(8px) translateY(-4px);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

/* ===================================
   AI MODAL
   =================================== */

.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-modal.active {
    display: block;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(22, 22, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--glass-blur);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.quiz-modal-content {
    width: 600px;
}

.results-modal-content {
    width: 700px;
    max-height: 80vh;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Modal Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ===================================
   MODAL HEADER
   =================================== */

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

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-close i {
    font-size: 1.4rem;
}

/* ===================================
   MODAL BODY
   =================================== */

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input Tabs */
.input-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.input-tab {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.input-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.input-tab.active {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.2);
}

.input-tab i {
    font-size: 1.4rem;
}

/* Input Sections */
.input-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.input-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Textarea */
.ai-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: var(--transition-smooth);
}

.ai-textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.ai-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* File Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(0, 0, 0, 0.2);
}

.file-drop-zone:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.05);
}

.file-drop-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.1);
    transform: scale(1.02);
}

.file-drop-zone i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.file-drop-zone:hover i {
    color: var(--accent-blue);
}

.file-drop-zone p {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.file-drop-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
}

.file-item i {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.file-remove:hover {
    background: rgba(255, 62, 62, 0.1);
    color: var(--accent-red);
}

/* ===================================
   QUIZ TYPE SECTION
   =================================== */

.quiz-type-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-select {
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.form-select option {
    background: rgba(20, 20, 25, 0.95);
    color: var(--text-main);
}

/* Multi-Mode Section */
.multi-mode-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.sections-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.section-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

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

.section-header span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.section-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.section-remove:hover {
    background: rgba(255, 62, 62, 0.1);
    color: var(--accent-red);
}

.add-section-btn {
    width: 100%;
    padding: 12px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px dashed var(--accent-blue);
    border-radius: 10px;
    color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.add-section-btn:hover {
    background: rgba(0, 210, 255, 0.2);
    border-style: solid;
    transform: translateY(-2px);
}

.add-section-btn i {
    font-size: 1.2rem;
}

/* ===================================
   MODAL ACTIONS
   =================================== */

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: #000;
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.2);
}

.btn-primary:hover {
    background: #00e5ff;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===================================
   RESULTS CONTENT
   =================================== */

.results-content {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 0.95rem;
}

.results-content h2 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin: 16px 0 8px 0;
}

.results-content h3 {
    color: var(--text-main);
    font-size: 1rem;
    margin: 12px 0 6px 0;
}

.results-content p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.results-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.results-content li {
    color: var(--text-muted);
    margin-bottom: 6px;
}

.results-content strong {
    color: var(--text-main);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1200px) {
    .ai-panels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
    }

    .nav-link span,
    .brand span {
        display: none;
    }

    .brand {
        justify-content: center;
    }

    .main-viewport {
        padding: calc(var(--spacing-unit) * 3);
    }

    .modal-content {
        width: 95vw;
        padding: 20px;
    }

    .quiz-modal-content {
        width: 95vw;
    }

    .results-modal-content {
        width: 95vw;
        max-height: 90vh;
    }

    .ai-panel-card {
        padding: 24px;
        min-height: 240px;
    }

    .ai-panel-title {
        font-size: 1.2rem;
    }

    .ai-panel-description {
        font-size: 0.85rem;
    }

    .input-tab {
        width: 100%;
    }
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ph-circle-notch-bold {
    animation: spin 1s linear infinite;
}