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

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --primary-color: #6125B9;
    --primary-dark: #4d1d94;
    --primary-light: #7d3fd4;
    --background: #f5f5f7;
    --card-background: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-color: #e5e5e7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(97, 37, 185, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

body > .container,
body > .page-container {
    flex: 1;
}

/* Homepage Styles */
.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-section {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.logo h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.description {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.view-options h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.option-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: block;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.option-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.option-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Navbar */
.navbar {
    background: var(--card-background);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: var(--primary-color);
}

.logo-link h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.chatroom-sidebar .card-content {
    padding: 1.25rem;
}

.card-content > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Placeholder Items */
.placeholder-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.placeholder-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.placeholder-icon {
    font-size: 1.5rem;
}

.placeholder-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.placeholder-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Progress Bars */
.progress-item {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-label span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Student Dashboard */
.student-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.subject-card {
    background: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.subject-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.subject-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subject-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.badge.visual {
    background: #8B5CF6;
}

.badge.textual {
    background: #3B82F6;
}

.badge.interactive {
    background: #10B981;
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.task-icon {
    font-size: 1.5rem;
}

.task-info {
    flex: 1;
}

.task-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.task-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-status.pending {
    background: #FEF3C7;
    color: #92400E;
}

.task-status.in-progress {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Chat Placeholder */
.chat-placeholder {
    margin-top: 1rem;
}

.chat-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.chat-message.bot {
    background: var(--background);
    color: var(--text-primary);
}

.chat-input-placeholder {
    display: flex;
    gap: 0.5rem;
}

.chat-input-placeholder input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    background: var(--background);
}

.chat-input-placeholder button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: not-allowed;
    font-size: 1rem;
}

/* Learning Method */
.learning-method {
    text-align: center;
    margin-top: 1rem;
}

.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.method-badge.large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.method-icon {
    font-size: 1.5rem;
}

.method-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Link Styles */
.subject-card-link,
.task-item-link,
.placeholder-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.subject-card-link:hover .subject-card,
.task-item-link:hover .task-item,
.placeholder-item-link:hover .placeholder-item {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Subject Detail Pages */
.subject-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.learning-method-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
}

.learning-method-banner .method-badge {
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.learning-method-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Visual Examples */
.visual-example {
    margin-top: 1rem;
}

.visual-diagram {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 1.5rem 0;
}

.equation-visual {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.equation-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.equation-part {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
}

.equation-part.positive {
    color: #10B981;
}

.equals {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.graph-placeholder {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    min-height: 300px;
}

.graph-placeholder canvas {
    width: 100% !important;
    height: 250px !important;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.graph-label {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: #E0E7FF;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
}

/* Diagram Examples */
.diagram-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.diagram-item h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.diagram-box {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.visual-chart {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 100%;
}

.bar {
    width: 30px;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 4px 4px 0 0;
    min-height: 20px;
}

.shape-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0;
    height: 120px;
}

.shape {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.shape.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape.circle {
    border-radius: 50%;
}

.shape.square {
    border-radius: 8px;
}

/* Textual Examples */
.textual-example {
    margin-top: 1rem;
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-section {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.text-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.text-example {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.example-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    margin-top: 1rem;
}

.example-box p {
    margin: 0;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
}

.text-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.text-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
}

.text-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.analysis-examples {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.analysis-item h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.text-analysis {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
}

.highlighted-text {
    line-height: 2;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin: 1rem 0;
}

.highlight {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.highlight.intro {
    background: #DBEAFE;
    color: #1E40AF;
}

.highlight.main {
    background: #E0E7FF;
    color: #4C1D95;
}

.highlight.conclusion {
    background: #D1FAE5;
    color: #065F46;
}

.analysis-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    color: var(--text-primary);
}

.style-examples {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.style-item {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Interactive Examples */
.interactive-example {
    margin-top: 1rem;
}

.interactive-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.cell-diagram {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.cell-structure {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.cell-part {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cell-part:hover {
    transform: scale(1.1);
}

.cell-part.nucleus {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cell-part.mitochondria {
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, #10B981, #34D399);
    top: 20%;
    right: 20%;
    border-radius: 20px;
}

.cell-part.ribosome {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    bottom: 30%;
    left: 25%;
}

.cell-part.membrane {
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 0;
    left: 0;
    background: transparent;
}

.part-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.interactive-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #E0E7FF;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.interactive-info {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
}

.component-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.component-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.experiment-examples {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.experiment-item h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.microscope-view {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
}

.slide-preview {
    background: #1d1d1f;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    min-height: 200px;
    position: relative;
}

.slide-content {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.cell-view {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.quiz-demo {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
}

.quiz-question {
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.quiz-option {
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: #F5F3FF;
}

.quiz-option.correct {
    background: #D1FAE5;
    border-color: #10B981;
    color: #065F46;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    background: #D1FAE5;
    border-left: 4px solid #10B981;
    border-radius: 8px;
    color: #065F46;
}

/* Task Details */
.task-item.detailed {
    flex-direction: column;
    align-items: flex-start;
}

.task-meta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.task-status.completed {
    background: #D1FAE5;
    color: #065F46;
}

/* Help Items */
.help-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.help-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.help-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.help-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Teacher Materials Page */
.materials-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.upload-area {
    margin-top: 1rem;
}

.upload-placeholder {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: var(--background);
    transition: all 0.3s ease;
}

.upload-placeholder:hover {
    border-color: var(--primary-color);
    background: #F5F3FF;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.material-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.material-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.material-info {
    flex: 1;
}

.material-info h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.material-info > p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.material-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.material-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

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

.action-btn.primary:hover {
    background: var(--primary-dark);
}

.ai-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.ai-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.ai-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.ai-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Teacher Classes Page */
.classes-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.class-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.class-subjects {
    margin: 1.5rem 0;
}

.class-subjects h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.subject-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.subject-tag {
    padding: 0.5rem 1rem;
    background: var(--background);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.class-progress {
    margin: 1.5rem 0;
}

.class-progress h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.class-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Students Table */
.students-table {
    margin-top: 1rem;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1.5fr 1fr;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
}

.table-header {
    background: var(--background);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.table-row {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.table-row:hover {
    box-shadow: var(--shadow);
    transform: translateX(3px);
}

.table-cell {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.mini-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-progress .progress-bar {
    flex: 1;
    height: 6px;
}

.mini-progress span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
}

.status-active {
    padding: 0.25rem 0.75rem;
    background: #D1FAE5;
    color: #065F46;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.method-badge.textual {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.method-badge.interactive {
    background: linear-gradient(135deg, #10B981, #34D399);
}

/* Assignments Section */
.assignments-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.create-assignment {
    text-align: center;
    padding: 2rem;
}

.action-btn.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.hint-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.assignments-list {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.assignment-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.assignment-item-link[style*="display: none"] {
    display: none !important;
    opacity: 0;
    transform: translateY(-10px);
}

.assignment-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.assignment-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    background: white;
}

.assignment-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.assignment-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.assignment-info h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.assignment-info > p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.assignment-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.assignment-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-word;
}

.assignment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.assignment-status.active {
    background: #DBEAFE;
    color: #1E40AF;
}

.assignment-status.upcoming {
    background: #FEF3C7;
    color: #92400E;
}

.assignment-status.completed {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.in-progress {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.completed {
    background: #D1FAE5;
    color: #065F46;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Assignment Detail Page */
.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.assignment-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.assignment-icon-large {
    font-size: 3rem;
    flex-shrink: 0;
}

.assignment-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.assignment-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.assignment-header-actions {
    display: flex;
    gap: 0.5rem;
}

.assignment-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-assignment-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.assignment-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail-section p {
    color: var(--text-primary);
    line-height: 1.8;
}

.instructions-list,
.objectives-list {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.instructions-list li,
.objectives-list li {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.attached-files {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-item > div {
    flex: 1;
}

.file-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.file-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.action-btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.action-btn.full-width {
    width: 100%;
    margin-bottom: 0.5rem;
}

.action-btn.full-width:last-child {
    margin-bottom: 0;
}

.submissions-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.stat-mini {
    text-align: center;
    flex: 1;
}

.stat-mini-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-mini-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-item {
    padding: 1.5rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.submission-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(3px);
}

.submission-student {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.submission-student strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.submission-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.submission-status.submitted {
    background: #D1FAE5;
    color: #065F46;
}

.submission-status.pending {
    background: #FEF3C7;
    color: #92400E;
}

.submission-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.submission-actions {
    display: flex;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-item span:not(strong) {
    color: var(--text-secondary);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.work-section {
    margin-bottom: 1.5rem;
}

.work-section:last-child {
    margin-bottom: 0;
}

.work-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.question-chips {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-chip {
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.question-chip:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #F5F3FF;
    color: var(--primary-color);
}

.question-chip:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2.5rem;
    }

    .buttons {
        grid-template-columns: 1fr;
    }

    .student-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .subject-grid {
        grid-template-columns: 1fr;
    }

    .page-container {
        padding: 1rem;
    }

    .interactive-demo {
        grid-template-columns: 1fr;
    }

    .cell-structure {
        width: 250px;
        height: 250px;
    }

    .diagram-examples {
        grid-template-columns: 1fr;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .table-cell {
        padding: 0.5rem 0;
    }

    .material-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .material-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .assignment-detail-grid {
        grid-template-columns: 1fr;
    }

    .assignment-header {
        flex-direction: column;
        gap: 1rem;
    }

    .assignment-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--card-background);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        display: block;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo-link h2 {
        font-size: 1.5rem;
    }

    /* Mobile adjustments */
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .assignment-meta,
    .material-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .question-chips {
        gap: 0.5rem;
    }

    .question-chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .visual-diagram {
        flex-direction: column;
    }

    .graph-placeholder {
        min-height: 250px;
    }

    .interactive-demo {
        grid-template-columns: 1fr;
    }

    .cell-structure {
        width: 250px;
        height: 250px;
    }
}

/* Footer */
footer {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Quick Access Widgets */
.quick-access-section {
    max-width: 900px;
    width: 100%;
    margin: 4rem auto 0;
    padding: 2rem 0;
}

.quick-access-section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-access-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    display: block;
}

.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.quick-access-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quick-access-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.quick-access-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.quick-link-card:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.quick-link-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.quick-link-info {
    flex: 1;
    min-width: 0;
}

.quick-link-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quick-link-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.quick-link-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.quick-access-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-access-mini-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--background);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.quick-access-mini-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.quick-access-mini-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.quick-access-mini-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quick-access-mini-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.notification-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #EF4444;
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.progress-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.quick-access-featured {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .quick-access-mini-grid {
        grid-template-columns: 1fr;
    }
}

/* Chatroom Styles */
.chatroom-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chatroom-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chatroom-main {
    display: flex;
    flex-direction: column;
}

.chat-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--card-background);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chat-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--background);
}

.message-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.message-item.sent {
    flex-direction: row-reverse;
}

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

.message-content {
    flex: 1;
    max-width: 70%;
    min-width: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.message-header strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-bubble.received {
    background: white;
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
}

.message-bubble.sent {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-top-right-radius: 4px;
}

.message-bubble p {
    margin: 0;
    line-height: 1.5;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    background: var(--card-background);
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-attach-btn,
.chat-send-btn {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-attach-btn:hover,
.chat-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    min-height: 45px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-input-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.conversation-item.active {
    background: #F5F3FF;
    border-color: var(--primary-color);
}

.conversation-avatar {
    font-size: 2rem;
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border-radius: 50%;
}

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

.conversation-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.conversation-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.25rem;
}

.unread-badge {
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.conversation-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* Curriculum Styles */
.curriculum-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.curriculum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.curriculum-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.curriculum-item {
    background: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.curriculum-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(3px);
}

.curriculum-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.curriculum-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

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

.curriculum-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.curriculum-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.curriculum-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.curriculum-details {
    margin-top: 1rem;
}

.curriculum-progress-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-label-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 120px;
}

.curriculum-progress-item .progress-bar {
    flex: 1;
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 45px;
    text-align: right;
}

.curriculum-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.curriculum-topics {
    margin-top: 1rem;
}

.curriculum-topics strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.topic-tag:hover {
    border-color: var(--primary-color);
    background: #F5F3FF;
    color: var(--primary-color);
}

.create-curriculum {
    text-align: center;
    padding: 2rem;
}

/* Chatroom Widgets */
.online-users {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.online-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.online-user:hover {
    background: var(--background);
}

.online-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.online-indicator.away {
    background: #F59E0B;
}

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

.online-user span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.recent-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    background: var(--background);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recent-file-item:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow);
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.file-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.file-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
}

.quick-action-btn {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: left;
}

.quick-action-btn:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(3px);
}

.chatroom-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--background);
    border-radius: 8px;
}

.stat-label-small {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-number-small {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive Chatroom */
@media (max-width: 768px) {
    .chatroom-container {
        grid-template-columns: 1fr;
    }

    .chatroom-sidebar {
        order: 2;
    }

    .chatroom-main {
        order: 1;
    }

    .chat-card {
        height: calc(100vh - 300px);
        min-height: 500px;
    }

    .message-content {
        max-width: 85%;
    }

    .conversation-item {
        padding: 0.75rem;
    }

    .curriculum-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .curriculum-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .curriculum-progress-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .progress-label-text {
        min-width: auto;
    }

    .curriculum-progress-item .progress-bar {
        width: 100%;
    }

    .progress-percentage {
        align-self: flex-end;
    }
}

