@import url('https://fonts.googleapis.com/css2?family=Bree+Serif&family=Caveat:wght@400;700&family=Lobster&family=Monoton&family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display+SC:ital,wght@0,400;0,700;1,700&family=Playfair+Display:ital,wght@0,400;0,700;1,700&family=Roboto:ital,wght@0,400;0,700;1,400;1,700&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,700&family=Work+Sans:ital,wght@0,400;0,700;1,700&display=swap');

* {
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

:root {
    --primary: #22C55E;
    --primary-light: #4ADE80;
    --secondary: #F97316;
    --accent: #6d28d9;
    --text-primary: #F5F5F5;
    --text-secondary: #B0B0B0;
    --glass-bg: rgba(20, 20, 30, 0.7);
    --glass-border: rgba(34, 197, 94, 0.2);
    --bg-dark: #0a0a0f;
}

body {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-content {
    position: relative;
    z-index: 1;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 5rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-toast {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.custom-toast.success {
    border-left: 4px solid var(--primary);
}

.custom-toast.error {
    border-left: 4px solid #EF4444;
}

.custom-toast.warning {
    border-left: 4px solid #FBBF24;
}

.custom-toast i {
    font-size: 1.25rem;
}

.custom-toast.success i {
    color: var(--primary);
}

.custom-toast.error i {
    color: #EF4444;
}

.custom-toast.warning i {
    color: #FBBF24;
}

/* DASHBOARD SCREEN */
.dashboard-hero {
    padding: 1rem 2rem 1rem;
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-panel {
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #22C55E 0%, #4ADE80 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 2rem;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.workspace-card {
    background: rgba(30, 30, 45, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.workspace-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.workspace-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.15);
}

.workspace-card:hover::before {
    opacity: 1;
}

.workspace-card h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.workspace-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.workspace-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 3;
}

.workspace-card-dropdown {
    position: relative;
    z-index: 10;
}

.workspace-card-dropdown .dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workspace-card-dropdown .dropdown-toggle:hover {
    color: var(--text-primary);
}

.new-workspace-card {
    background: rgba(30, 30, 45, 0.3);
    border: 2px dashed rgba(34, 197, 94, 0.4);
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    opacity: 0.8;
}

.new-workspace-card:hover {
    opacity: 1;
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(30, 30, 45, 0.5);
}

.new-workspace-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.progress-container {
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.progress-bar-custom {
    height: 6px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* WORKSPACE VIEW */
.workspace-container {
    display: flex;
    height: calc(100vh - 80px);
    gap: 1.5rem;
    padding: 1.5rem;
}

.sidebar-panel {
    width: 280px;
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.sidebar-actions {
    display: flex;
    gap: 0.5rem;
}

.filter-btn,
.add-topic-btn {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover,
.add-topic-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
    transform: scale(1.05);
}

.filter-btn.active {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--text-primary);
}

.topics-tree {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

/* TOPIC ITEMS */
.topic-item-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
}

.topic-item-container:hover {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: var(--primary);
    color: var(--text-primary);
}

.topic-item-container.active {
    background: rgba(34, 197, 94, 0.15);
    border-left-color: var(--primary);
    color: var(--text-primary);
    font-weight: 600;
}

.topic-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.topic-name {
    flex: 1;
    max-width: 50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-status-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.status-pending {
    color: #FBBF24;
}

.status-ready {
    color: var(--primary);
}

.topic-item-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.topic-item-container:hover .topic-item-actions {
    opacity: 1;
}

.topic-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border-radius: 4px;
}

.topic-action-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
}

/* TOPIC DROPDOWN MENU */
.topic-dropdown {
    position: relative;
}

.topic-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.topic-dropdown-menu.show {
    display: block;
}

.topic-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.topic-dropdown-item:hover {
    background: rgba(34, 197, 94, 0.15);
    color: var(--text-primary);
}

.topic-dropdown-item i {
    width: 16px;
}

/* MAIN CONTENT AREA */
.content-main {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
}

.content-viewer-panel {
    flex: 1;
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.viz-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(25,25,40,0.6);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.viz-fullscreen-btn:hover { filter: brightness(1.2); }

.content-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
    flex-wrap: wrap;
}

.content-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.content-tab:hover {
    color: var(--text-primary);
}

.content-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 10px;
}

.visualization-container {
    flex: 1;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
    margin-top: 5px;
}

.content-display {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-display.active {
    display: flex;
    flex-direction: column;
}

.placeholder-wrapper {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #fcb69f, #a1c4fd, #c2e9fb);
    background-size: 400% 400%;
    animation: bgmove 12s ease infinite;
    border-radius: 12px;
    overflow: hidden;
    cursor: progress;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 3rem;
    text-align: center;
}

.pulse-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    animation: pulse 1.8s infinite;
    font-size: 2.5rem;
    color: white;
}

.placeholder-title {
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.placeholder-hint {
    margin-top: 0.5rem;
    color: rgba(240, 240, 240, 0.9);
    font-size: 0.9rem;
}

@keyframes bgmove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* PAGES & QUIZ CONTENT */
.pages-content-wrapper,
.quiz-content-wrapper {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

/* Beautiful scrollbars for content areas */
.visualization-container,
.pages-content-wrapper,
.quiz-content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 197, 94, 0.35) rgba(34, 197, 94, 0.12);
}

.visualization-container::-webkit-scrollbar,
.pages-content-wrapper::-webkit-scrollbar,
.quiz-content-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.visualization-container::-webkit-scrollbar-track,
.pages-content-wrapper::-webkit-scrollbar-track,
.quiz-content-wrapper::-webkit-scrollbar-track {
    background: rgba(34, 197, 94, 0.08);
    border-radius: 10px;
}

.visualization-container::-webkit-scrollbar-thumb,
.pages-content-wrapper::-webkit-scrollbar-thumb,
.quiz-content-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    border: 2px solid rgba(20, 20, 30, 0.6);
}

.visualization-container::-webkit-scrollbar-thumb:hover,
.pages-content-wrapper::-webkit-scrollbar-thumb:hover,
.quiz-content-wrapper::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.1);
}

.quiz-question {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.quiz-question h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.quiz-option {
    background: rgba(34, 197, 94, 0.08);
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.15);
    color: var(--text-primary);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
}

.quiz-option.correct {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.25);
    color: var(--text-primary);
}

.quiz-option.wrong {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

/* NOTES SIDEBAR */
.notes-sidebar {
    width: 400px;
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.notes-sidebar.collapsed {
    width: 0;
    padding: 0;
    border: none;
    overflow: hidden;
}

.notes-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: white;
    padding: 1rem 0.5rem;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
}

.notes-toggle-btn:hover {
    background: var(--primary-light);
}

.notes-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.notes-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
}

.notes-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1rem;
}

#notepadHost, #notepadModalBody {
    width: 100%;
    height: 100%;
}

#notepadHost iframe, #notepadModalBody iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

#notepadModal .modal-body {
    height: calc(100vh - 160px);
}

#notepadModal .btn-close { display: none !important; }

.notes-container.collapsed {
    display: none;
}

.notepad-textarea {
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.8);
    border: none;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    resize: none;
    outline: none;
}

.notepad-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* BACK TO DASHBOARD BUTTON */
.back-to-dashboard-btn {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    position: fixed;
    left: 2.5rem;
    bottom: 40px;
    z-index: 100;
}

.back-to-dashboard-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--text-primary);
}

/* MODALS */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* Ensure modals render above all content and are visible */
.modal { z-index: 1060; }
.modal.show { display: block; }
.modal.fade .modal-dialog { transform: none !important; transition: none; }

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
}

.tutor-modal .modal-content {
    background: rgba(20, 20, 30, 0.95);
}

.tutor-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px 16px 0 0;
    border: none;
}

.tutor-title {
    color: white;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem;
}

.form-control:focus,
.form-select:focus {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.15);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* BUTTONS */
.btn-primary-npv {
    background: linear-gradient(135deg, #22C55E 0%, #4ADE80 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary-npv:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
    color: white;
}

.premium-btn {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.premium-btn-gold {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.premium-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
}

/* CHAT & AI TUTOR */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    word-break: break-word;
}

.message-user {
    justify-content: flex-end;
}

.message-tutor {
    justify-content: flex-start;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
}

.message-user .message-bubble {
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
    margin-left: auto;
}

.message-tutor .message-bubble {
    background: rgba(34, 197, 94, 0.08);
    color: var(--text-secondary);
}

.tutor-input-area {
    padding: 1rem;
    border-top: 1px solid rgba(34, 197, 94, 0.15);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(15, 15, 20, 0.6);
}

#tutorInput {
    flex: 1;
    min-height: 48px;
    max-height: 150px;
    background: rgba(25, 25, 30, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
    outline: none;
    transition: all 0.3s ease;
}

#tutorInput::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#tutorInput:focus {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
    background: rgba(30, 30, 35, 0.95);
}

.send-btn {
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.send-btn:hover {
    background: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* TEMPLATE & ENGINE CARDS */
.section-wrapper {
    margin-bottom: 2rem;
}

.section-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-engine-card,
.template-card {
    background: rgba(34, 197, 94, 0.05);
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ai-engine-card::before,
.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(74, 222, 128, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-engine-card:hover::before,
.template-card:hover::before {
    opacity: 1;
}

.ai-engine-card:hover,
.template-card:hover {
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.15);
}

.ai-engine-card.selected,
.template-card.selected {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.15);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* LANGUAGE SELECT */
.language-box {
    background: rgba(34, 197, 94, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.language-select,
.language-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(25, 25, 35, 0.85);
    color: var(--text-primary);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.language-select:hover,
.language-input:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.language-select:focus,
.language-input:focus {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* CONSOLE OUTPUT */
.console-output {
    background: #0a0a0f;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #4ADE80;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* DROPDOWN MENU */
.dropdown-menu {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
}

.dropdown-item {
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(34, 197, 94, 0.15);
    color: var(--text-primary);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

.dropdown-divider {
    border-color: rgba(34, 197, 94, 0.1);
}

/* NAV TABS */
.nav-link {
    color: var(--text-secondary) !important;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    background: transparent !important;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.5);
}

/* SCREENS */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

#dashboardScreen {
    flex: 1;
}

#workspaceScreen {
    flex: 1;
    position: relative;
}

/* MOBILE SPECIFIC */
.mobile-header {
    display: none;
    background: var(--bg-dark);
    padding: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile-header-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-workspace-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1040;
}

.sidebar-overlay.active {
    display: block;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .dashboard-hero {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-panel {
        padding: 2rem 1rem;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mobile-header {
        display: flex;
    }

    .back-to-dashboard-btn {
        display: none;
    }

    .workspace-container {
        flex-direction: column;
        height: auto;
        padding: 0;
        gap: 0;
    }

    .sidebar-panel {
        position: fixed;
        left: -300px;
        top: 0;
        width: 300px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        border-radius: 0;
    }

    .sidebar-panel.open {
        left: 0;
    }

    .content-main {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .notes-sidebar,
    .notes-toggle-btn {
        display: none;
    }

    .content-viewer-panel {
        border-radius: 0;
        border: none;
        height: calc(100vh - 58px);
    }

    .visualization-container {
        border-radius: 0;
        border: none;
        padding: 0;
    }

    .toast-container {
        right: 1rem;
        top: 4rem;
    }

    .custom-toast {
        min-width: 280px;
    }
}
