/* Dashboard Layout Styles */
.dashboard-body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(37, 99, 235, 0.15);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-subtitle,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .user-details {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 1rem 0;
}

.sidebar.collapsed .user-info {
  padding: 10px;
}

.sidebar.collapsed .user-profile {
  flex-direction: column;
  align-items: center;
}

.sidebar.collapsed .sign-out-btn span {
  display: none;
}

.sidebar-header {
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header .gradient-text {
  font-family: 'Fredoka', 'Inter', Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(90deg, #60a5fa 10%, #ffffff 60%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.sidebar-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0.5rem 0 0 0;
  font-weight: 500;
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 0;
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(4px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-right: 4px solid #60a5fa;
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  background: #f8fafc;
  min-height: 100vh;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
  font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.progress-card, .activity-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.5rem 0;
}

/* Progress Circle */
.progress-circle {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.circle-progress {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#2563eb 0deg 270deg, #e2e8f0 270deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.circle-progress::before {
  content: '';
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  position: absolute;
}

.progress-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  z-index: 1;
}

.progress-text {
  text-align: center;
  color: #64748b;
  margin: 0;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #60a5fa, #a5b4fc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.activity-title {
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.activity-time {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
}

/* Recommendations */
.recommendations-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.recommendation-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.recommendation-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.recommendation-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.recommendation-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1rem 0;
}

.recommendation-btn {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.recommendation-btn:hover {
  transform: translateY(-1px);
}

/* Chat Container */
.chat-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-input-container {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
}

.chat-input-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#chat-input:focus {
  border-color: #2563eb;
}

#send-btn {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#send-btn:hover {
  transform: translateY(-1px);
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 80%;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.chat-bubble.user {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}

.chat-bubble.bot {
  background: #f8fafc;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid #e2e8f0;
}

/* Placeholder Sections */
.analytics-placeholder,
.study-guide-placeholder,
.settings-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: white;
  border-radius: 1rem;
  padding: 4rem 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.analytics-placeholder h3,
.study-guide-placeholder h3,
.settings-placeholder h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.analytics-placeholder p,
.study-guide-placeholder p,
.settings-placeholder p {
  color: #64748b;
  margin: 0;
  font-size: 1.1rem;
}

/* Test Generation Styles */
.gen-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.gen-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gen-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gen-row label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.gen-row input,
.gen-row select {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.gen-row input:focus,
.gen-row select:focus {
  border-color: #2563eb;
}

.gen-btn {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gen-btn:hover {
  transform: translateY(-1px);
}

/* Loading Spinner */
.loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Test Paper Styles */
.test-paper {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  margin-top: 2rem;
}

.test-header {
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.test-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.test-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.test-detail {
  font-size: 0.95rem;
  color: #64748b;
}

.test-detail strong {
  color: #1e293b;
}

.test-instructions {
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.test-instructions h3 {
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.test-instructions ul {
  margin: 0;
  padding-left: 1.5rem;
}

.test-instructions li {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.question {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.question-number {
  font-weight: 600;
  color: #1e293b;
  font-size: 1.1rem;
}

.question-marks {
  background: #2563eb;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.question-text {
  color: #1e293b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.answer-input {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.answer-input:focus {
  border-color: #2563eb;
}

.test-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.action-btn.primary {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
}

.action-btn.secondary {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.action-btn:hover {
  transform: translateY(-1px);
}

/* Grading Results */
.grading-results {
  margin-top: 2rem;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.grading-loading {
  text-align: center;
  padding: 2rem;
}

.grading-loading h3 {
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.grading-error {
  text-align: center;
  padding: 2rem;
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }
  
  .main-content {
    margin-left: 250px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .recommendations-grid {
    grid-template-columns: 1fr;
  }
  
  .test-info {
    grid-template-columns: 1fr;
  }
  
  .test-actions {
    flex-direction: column;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Study Guide Styles */
.study-preferences-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.preferences-header {
  text-align: center;
  margin-bottom: 2rem;
}

.preferences-header h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.preferences-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.preferences-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.question-label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.question-group select,
.question-group textarea {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}

.question-group textarea {
  min-height: 80px;
}

.question-group select:focus,
.question-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(116, 144, 255, 0.2);
}

.question-group textarea {
  min-height: 80px;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.study-guide-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.study-guide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.study-guide-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.preferences-btn {
  flex: 1;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.radio-option input,
.checkbox-option input {
  margin: 0;
}

.radio-option span,
.checkbox-option span {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.preferences-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.preferences-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(116, 144, 255, 0.3);
}

.study-recommendations {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.recommendations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.recommendations-header h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin: 0;
}

.edit-preferences-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.edit-preferences-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.recommendation-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendation-card h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.recommendation-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.recommendation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recommendation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(116, 144, 255, 0.2);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.recommendation-link:hover {
  background: rgba(116, 144, 255, 0.3);
  transform: translateY(-1px);
}

.study-schedule {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.study-schedule h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-time {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.schedule-activity {
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* User Info Styles */
.user-info {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  color: white;
  background: rgba(0, 0, 0, 0.1);
}

/* Mind Map (whiteboard) */
.mindmap-board {
  position: relative;
  height: 70vh;
  background-color: #f3f4f6;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-top: 1rem;
  background-image: linear-gradient(#e5e7eb 1px, transparent 1px), linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 24px 24px;
}
#mindmap-canvas { position: absolute; inset: 0; transform-origin: 0 0; }
#mindmap-edges, #mindmap-nodes { position: absolute; inset: 0; }
#mindmap-edges { pointer-events: none; }
.mm-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  border: 1px solid rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.6), 0 10px 30px rgba(0,0,0,0.35);
  padding: 8px 12px;
  white-space: nowrap;
  user-select: none;
}
.mm-node .label { font-weight: 600; color: #ffffff; }
.mm-node .examples { font-size: 12px; color: #e0e7ff; margin-top: 2px; }
.mm-node.root { border-color: rgba(0, 0, 0, 0.95); box-shadow: 0 0 16px rgba(0,0,0,0.7), 0 12px 40px rgba(37,99,235,0.25); }
#mindmap-edges line { stroke: #94a3b8; stroke-opacity: 0.8; stroke-width: 1.5; }
.mindmap-hud { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; align-items: center; }
.mindmap-status { color: #64748b; font-size: 0.9rem; }

/* Saved whiteboards list */
.saved-boards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.saved-boards-grid .empty-state { color: #64748b; padding: 0.75rem; }
.wb-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; display:flex; flex-direction:column; gap:8px; }
.wb-card-title { font-weight: 700; color: #0f172a; }
.wb-card-meta { font-size: 12px; color: #64748b; }
.wb-card-actions { display:flex; gap: 8px; }

/* Saved study guides container */
.saved-guides-container { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 1rem; 
  margin-top: 1.5rem;
}

.saved-guides-container .empty-state { 
  color: #64748b; 
  padding: 2rem; 
  text-align: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 2px dashed #e2e8f0;
}

.saved-guide-card { 
  background: white;
  border: 2px solid #e2e8f0; 
  border-radius: 0.75rem; 
  padding: 1.25rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.saved-guide-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.saved-guide-card-title { 
  font-weight: 700; 
  color: #1e293b; 
  font-size: 1.1rem;
  margin: 0;
}

.saved-guide-card-meta { 
  font-size: 0.875rem; 
  color: #64748b; 
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.saved-guide-card-actions { 
  display: flex; 
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.saved-guide-card-actions button {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.saved-guide-card-actions .view-btn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
}

.saved-guide-card-actions .view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.saved-guide-card-actions .delete-btn {
  background: #fee2e2;
  color: #dc2626;
}

.saved-guide-card-actions .delete-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.user-info .user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.user-info .user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
}

.user-info .user-details .user-name {
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.user-info .user-details .user-email {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.user-info .sign-out-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.user-info .sign-out-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}
/* ========================================
   STUDY GUIDE SECTION STYLES
   ======================================== */

/* Study Preferences Card */
.study-preferences-card {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.study-preferences-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #a5b4fc);
}

.preferences-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
}

.preferences-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preferences-header p {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0;
}

/* Preferences Form */
.preferences-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.question-group {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.question-group:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.question-label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.question-group select,
.question-group textarea,
.question-group input[type="text"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1e293b;
  background: white;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.question-group select:focus,
.question-group textarea:focus,
.question-group input[type="text"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.question-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.radio-option:hover,
.checkbox-option:hover {
  background: #f8fafc;
  border-color: #2563eb;
}

.radio-option input,
.checkbox-option input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #2563eb;
}

.radio-option span,
.checkbox-option span {
  font-size: 1rem;
  color: #475569;
  font-weight: 500;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.preferences-btn,
.study-guide-btn {
  flex: 1;
  min-width: 200px;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.preferences-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.preferences-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.preferences-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.study-guide-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.study-guide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.study-guide-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Study Recommendations/Results */
.study-recommendations {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin-top: 2rem;
}

.recommendations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.recommendations-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.edit-preferences-btn {
  padding: 0.75rem 1.5rem;
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.edit-preferences-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

/* Study Plan Container */
.study-plan-container {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.study-plan-header {
  margin-bottom: 2rem;
}

.study-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e40af;
}

.meta-badge i {
  font-size: 1rem;
}

/* Study Plan Content */
.study-plan-content {
  padding: 2rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.study-plan-content .section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #2563eb;
}

.study-plan-content .section-heading:first-child {
  margin-top: 0;
}

.study-plan-content p {
  color: #475569;
  margin: 1rem 0;
  font-size: 1.05rem;
}

.study-plan-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.study-plan-content li {
  color: #475569;
  margin: 0.75rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.study-plan-content strong {
  color: #1e293b;
  font-weight: 600;
}

/* Study Plan Actions */
.study-plan-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn.primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.action-btn.secondary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.action-btn:not(.primary):not(.secondary) {
  background: white;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.action-btn:not(.primary):not(.secondary):hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .button-group {
    flex-direction: column;
  }
  
  .preferences-btn,
  .study-guide-btn {
    min-width: 100%;
  }
  
  .study-plan-actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .recommendations-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .study-plan-meta {
    flex-direction: column;
  }
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.sidebar-toggle i {
  transition: transform 0.3s ease;
}

.sidebar.collapsed ~ .sidebar-toggle i {
  transform: rotate(180deg);
}

/* Adjust main content when sidebar is collapsed */
.sidebar.collapsed ~ .main-content {
  margin-left: 70px;
  transition: margin-left 0.3s ease;
}

.main-content {
  transition: margin-left 0.3s ease;
}

/* Enhanced Chat Bubble Styling */
.chat-bubble strong {
  font-weight: 700;
  color: inherit;
}

.chat-bubble.bot strong {
  color: #1e293b;
}

.chat-bubble .bullet,
.chat-bubble .number {
  color: #2563eb;
  font-weight: 600;
  margin-right: 0.5rem;
}

/* Loading dots animation */
.loading-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loading-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  animation: dotFlashing 1s infinite alternate;
}

.loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotFlashing {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

/* ========================================
   FULL-PAGE CHAT INTERFACE WITH MULTI-SESSION SUPPORT
   ======================================== */

/* Make chat section full page */
.content-section.chat-full-page {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  bottom: 0;
  background: #f8fafc;
  padding: 0;
  z-index: 100;
  display: none;
}

.content-section.chat-full-page.active {
  display: flex;
}

.sidebar.collapsed ~ .main-content .content-section.chat-full-page {
  left: 70px;
}

/* Chat Layout */
.chat-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ========================================
   CHAT HISTORY SIDEBAR
   ======================================== */

.chat-history-sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, width 0.3s ease;
}

.chat-history-sidebar.hidden {
  transform: translateX(-100%);
  width: 0;
}

/* Chat History Header */
.chat-history-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.new-chat-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.new-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.new-chat-btn i {
  font-size: 1rem;
}

/* Chat History List */
.chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.chat-history-list::-webkit-scrollbar {
  width: 6px;
}

.chat-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Chat History Item */
.chat-history-item {
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-history-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.chat-history-item.active {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #2563eb;
}

.chat-history-item-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item.active .chat-history-item-title {
  color: #2563eb;
}

.chat-history-item-preview {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item-time {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.125rem;
}

.chat-history-item-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 0.375rem;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.chat-history-item:hover .chat-history-item-delete {
  display: flex;
}

.chat-history-item-delete:hover {
  background: #fecaca;
  transform: scale(1.1);
}

/* Chat History Empty State */
.chat-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #94a3b8;
}

.chat-history-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.chat-history-empty p {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  color: #64748b;
}

.chat-history-empty span {
  font-size: 0.875rem;
  color: #94a3b8;
}

/* Chat History Footer */
.chat-history-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.clear-history-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.clear-history-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

/* ========================================
   MAIN CHAT AREA
   ======================================== */

.chat-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow: hidden;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-history-btn {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.toggle-history-btn:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.chat-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.chat-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.chat-page-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.chat-action-btn:hover {
  background: #f1f5f9;
  color: #2563eb;
  transform: translateY(-1px);
}

/* ========================================
   CHAT MESSAGES AREA
   ======================================== */

.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.chat-messages-area::-webkit-scrollbar {
  width: 8px;
}

.chat-messages-area::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chat-messages-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Chat Welcome Screen */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 700px;
  margin: auto;
  padding: 3rem 2rem;
}

.chat-welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
}

.chat-welcome-icon i {
  font-size: 2.5rem;
  color: white;
}

.chat-welcome h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

.chat-welcome p {
  font-size: 1.125rem;
  color: #64748b;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

/* Chat Suggestions */
.chat-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}

.suggestion-chip {
  padding: 1rem 1.25rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.suggestion-chip:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.suggestion-chip i {
  font-size: 1.2rem;
  color: #2563eb;
}

/* Chat Bubbles (Enhanced for new layout) */
.chat-bubble {
  max-width: 75%;
  padding: 1rem 1.5rem;
  border-radius: 1.125rem;
  margin-bottom: 1rem;
  animation: messageSlideIn 0.3s ease;
  line-height: 1.7;
  word-wrap: break-word;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-bubble.user {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.375rem;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.chat-bubble.bot {
  background: white;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-bubble.bot strong {
  color: #1e40af;
  font-weight: 700;
}

/* ========================================
   CHAT INPUT AREA
   ======================================== */

.chat-input-area {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem 2rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.chat-input-container-new {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.chat-input-container-new:focus-within {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #1e293b;
  resize: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
}

.chat-input-field::placeholder {
  color: #94a3b8;
}

.chat-input-field::-webkit-scrollbar {
  width: 4px;
}

.chat-input-field::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.send-button {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.send-button:active {
  transform: translateY(0);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-input-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

.chat-input-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN FOR CHAT
   ======================================== */

@media (max-width: 1024px) {
  .chat-history-sidebar {
    width: 260px;
  }
  
  .chat-suggestions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content-section.chat-full-page {
    left: 0;
  }
  
  .chat-history-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .chat-history-sidebar.hidden {
    transform: translateX(-100%);
  }
  
  .chat-header {
    padding: 1rem 1.25rem;
  }
  
  .chat-page-title {
    font-size: 1.25rem;
  }
  
  .chat-messages-area {
    padding: 1.5rem 1rem;
  }
  
  .chat-welcome {
    padding: 2rem 1rem;
  }
  
  .chat-welcome h2 {
    font-size: 1.5rem;
  }
  
  .chat-welcome p {
    font-size: 1rem;
  }
  
  .chat-bubble {
    max-width: 90%;
  }
  
  .chat-input-area {
    padding: 1rem;
  }
  
  .chat-suggestions {
    gap: 0.75rem;
  }
  
  .suggestion-chip {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   SETTINGS PAGE STYLES
   ======================================== */

.settings-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.settings-card {
  background: white;
  border-radius: 1.2rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.settings-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.settings-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.settings-card-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.settings-section-title i {
  color: #2563eb;
}

.settings-section-description {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

.settings-group {
  margin-bottom: 2rem;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem 0;
}

/* Theme Options */
.theme-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 600px;
}

.theme-option {
  background: white;
  border: 3px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.theme-option:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

/* Theme Color Definitions - Only Normal and Dark */
/* IMPORTANT: Keep Normal theme preview ALWAYS BLUE regardless of active theme */
.theme-option.theme-normal .theme-colors span:nth-child(1) { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important; }
.theme-option.theme-normal .theme-colors span:nth-child(2) { background: #ffffff !important; }
.theme-option.theme-normal .theme-colors span:nth-child(3) { background: #f8fafc !important; }

.theme-option.theme-dark .theme-colors span:nth-child(1) { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important; }
.theme-option.theme-dark .theme-colors span:nth-child(2) { background: #334155 !important; }
.theme-option.theme-dark .theme-colors span:nth-child(3) { background: #475569 !important; }

.theme-option.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 20px rgba(37, 99, 235, 0.2);
  transform: translateY(-4px);
}

.theme-preview {
  width: 100%;
  height: 80px;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-colors {
  display: flex;
  width: 100%;
  height: 100%;
}

.theme-colors span {
  flex: 1;
  height: 100%;
  transition: transform 0.2s ease;
}

.theme-option:hover .theme-colors span {
  transform: scale(1.1);
}

.theme-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
  margin: 0;
  transition: color 0.2s ease;
}

.theme-option:hover .theme-name {
  color: #2563eb;
}

.theme-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: #2563eb;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.theme-option.active .theme-check {
  opacity: 1;
  transform: scale(1);
}

/* Personality Options */
.personality-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.personality-option {
  background: white;
  border: 3px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.personality-option:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.personality-option.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 20px rgba(37, 99, 235, 0.2);
  transform: translateY(-4px);
}

.personality-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.personality-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.personality-option:hover .personality-icon {
  transform: scale(1.1);
}

.personality-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
  transition: color 0.2s ease;
}

.personality-option:hover .personality-name {
  color: #2563eb;
}

.personality-desc {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.personality-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #2563eb;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.personality-option.active .personality-check {
  opacity: 1;
  transform: scale(1);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1e293b;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.form-select:hover {
  border-color: #cbd5e1;
}

.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Account Section */
.account-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.account-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.account-details {
  flex: 1;
}

.account-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.account-email {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
}

.account-meta {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

/* Enhanced Account Avatar Section */
.account-info-display {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.account-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.account-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.account-avatar-large:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.35);
}

.account-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.account-avatar-large:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-upload-overlay i {
  font-size: 2rem;
  color: white;
}

.change-avatar-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.change-avatar-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.change-avatar-btn i {
  font-size: 1rem;
}

/* Hidden file input */
.avatar-file-input {
  display: none;
}

/* Account Detail Items */
.account-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.account-detail-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

/* Remove Avatar Button */
.remove-avatar-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #fee2e2;
  border: 2px solid #fecaca;
  border-radius: 0.75rem;
  color: #dc2626;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.remove-avatar-btn:hover {
  background: #fecaca;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* Dark Mode Styles for Account Section */
body.theme-dark .account-info-display {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .account-detail-item {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .detail-label {
  color: var(--theme-text-muted) !important;
}

body.theme-dark .detail-value {
  color: var(--theme-text) !important;
}

body.theme-dark .change-avatar-btn {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .change-avatar-btn:hover {
  background: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: white !important;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fee2e2;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

/* Toggle Switches */
.preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.preference-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.preference-info p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #2563eb;
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Data Stats */
.data-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.data-stat-item {
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.data-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.data-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Danger Zone */
.danger-zone {
  background: #fef2f2;
  border: 2px solid #fee2e2;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.danger-zone h4 {
  color: #dc2626;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.danger-zone p {
  color: #991b1b;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
}

.danger-zone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* About Section */
.about-app {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.about-app h3 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.5rem 0;
}

.about-app .version {
  display: inline-block;
  background: #dbeafe;
  color: #2563eb;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-app p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.about-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.about-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.about-link:hover {
  color: #1e40af;
  transform: translateY(-2px);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: -100px;
  right: 2rem;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transition: all 0.3s ease;
  border-left: 4px solid #2563eb;
  min-width: 300px;
}

.toast.show {
  bottom: 2rem;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-content i {
  font-size: 1.25rem;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-success i {
  color: #10b981;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

.toast.toast-error i {
  color: #ef4444;
}

.toast.toast-info i {
  color: #2563eb;
}

.toast-content span {
  color: #1e293b;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ========================================
   PREMIUM THEME SYSTEM - NORMAL & DARK MODE
   ======================================== */

:root {
  /* Premium Blue Theme (Default/Normal) */
  --theme-primary: #2563eb;
  --theme-primary-light: #3b82f6;
  --theme-primary-dark: #1e40af;
  --theme-accent: #60a5fa;
  --theme-background: #f8fafc;
  --theme-surface: #ffffff;
  --theme-surface-alt: #f1f5f9;
  --theme-text: #0f172a;
  --theme-text-secondary: #475569;
  --theme-text-muted: #64748b;
  --theme-border: #e2e8f0;
  --theme-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Theme - Premium Dark Mode */
body.theme-dark {
  --theme-primary: #3b82f6;
  --theme-primary-light: #60a5fa;
  --theme-primary-dark: #2563eb;
  --theme-accent: #60a5fa;
  --theme-background: #0f172a;
  --theme-surface: #1e293b;
  --theme-surface-alt: #334155;
  --theme-text: #f1f5f9;
  --theme-text-secondary: #cbd5e1;
  --theme-text-muted: #94a3b8;
  --theme-border: #334155;
  --theme-shadow: rgba(0, 0, 0, 0.5);
}

/* Apply theme to ENTIRE APPLICATION */
body.theme-dark {
  background: var(--theme-background) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .dashboard-body {
  background: var(--theme-background) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .sidebar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-right: 1px solid var(--theme-border);
}

body.theme-dark .main-content {
  background: var(--theme-background) !important;
}

/* ALL CARDS AND SURFACES */
body.theme-dark .settings-card,
body.theme-dark .stat-card,
body.theme-dark .progress-card,
body.theme-dark .activity-card,
body.theme-dark .recommendations-card,
body.theme-dark .gen-card,
body.theme-dark .test-paper,
body.theme-dark .study-preferences-card,
body.theme-dark .study-recommendations,
body.theme-dark .recommendation-card,
body.theme-dark .theme-option,
body.theme-dark .personality-option,
body.theme-dark .account-profile,
body.theme-dark .preference-item,
body.theme-dark .data-stat-item,
body.theme-dark .question-group,
body.theme-dark .activity-item,
body.theme-dark .recommendation-item {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

/* CHAT COMPONENTS */
body.theme-dark .chat-bubble.bot,
body.theme-dark .chat-history-sidebar,
body.theme-dark .chat-header,
body.theme-dark .chat-input-area,
body.theme-dark .chat-main-area,
body.theme-dark .chat-welcome,
body.theme-dark .suggestion-chip {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .chat-messages-area {
  background: var(--theme-background) !important;
}

body.theme-dark .chat-history-item {
  background: transparent !important;
  color: var(--theme-text) !important;
}

body.theme-dark .chat-history-item:hover {
  background: var(--theme-surface-alt) !important;
}

body.theme-dark .chat-history-item.active {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-primary) !important;
}

body.theme-dark .chat-input-container-new {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

/* TEXT ELEMENTS */
body.theme-dark .section-title,
body.theme-dark .settings-card-title,
body.theme-dark .card-title,
body.theme-dark .account-name,
body.theme-dark .theme-name,
body.theme-dark .personality-name,
body.theme-dark .preference-info h4,
body.theme-dark .chat-page-title,
body.theme-dark .test-title,
body.theme-dark .question-number,
body.theme-dark .stat-number,
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, body.theme-dark h4 {
  color: var(--theme-text) !important;
}

body.theme-dark .section-subtitle,
body.theme-dark .settings-card-subtitle,
body.theme-dark .account-email,
body.theme-dark .personality-desc,
body.theme-dark .preference-info p,
body.theme-dark .chat-page-subtitle,
body.theme-dark .stat-label,
body.theme-dark .activity-title,
body.theme-dark .activity-time,
body.theme-dark .question-text,
body.theme-dark p {
  color: var(--theme-text-secondary) !important;
}

/* FORM INPUTS */
body.theme-dark .form-select,
body.theme-dark .form-control,
body.theme-dark .gen-row input,
body.theme-dark .gen-row select,
body.theme-dark .question-group select,
body.theme-dark .question-group textarea,
body.theme-dark .question-group input,
body.theme-dark .answer-input,
body.theme-dark #chat-input,
body.theme-dark .chat-input-field,
body.theme-dark input[type="text"],
body.theme-dark input[type="number"],
body.theme-dark textarea,
body.theme-dark select {
  background: var(--theme-surface-alt) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .form-select:focus,
body.theme-dark .gen-row input:focus,
body.theme-dark .gen-row select:focus,
body.theme-dark .question-group select:focus,
body.theme-dark .question-group textarea:focus,
body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
  border-color: var(--theme-primary) !important;
}

body.theme-dark .form-select::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: var(--theme-text-muted) !important;
}

/* HOVER STATES */
body.theme-dark .theme-option:hover,
body.theme-dark .personality-option:hover,
body.theme-dark .suggestion-chip:hover {
  background: var(--theme-surface-alt) !important;
}

/* TEST QUESTIONS */
body.theme-dark .question {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .test-instructions {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
}

/* PLACEHOLDERS */
body.theme-dark .analytics-placeholder,
body.theme-dark .study-guide-placeholder,
body.theme-dark .settings-placeholder {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

/* SCROLLBARS */
body.theme-dark ::-webkit-scrollbar-track {
  background: var(--theme-background) !important;
}

body.theme-dark ::-webkit-scrollbar-thumb {
  background: var(--theme-surface-alt) !important;
}

body.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: var(--theme-border) !important;
}

/* MINDMAP DARK MODE - Keep whiteboard white but darken nodes */
body.theme-dark .mindmap-board {
  background-color: #f3f4f6 !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .mm-node {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 0 12px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.5) !important;
}

body.theme-dark .mm-node .label {
  color: #ffffff !important;
}

body.theme-dark .mm-node .examples {
  color: #cbd5e1 !important;
}

body.theme-dark .mm-node.root {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 12px 40px rgba(0,0,0,0.5) !important;
}

body.theme-dark #mindmap-edges line {
  stroke: #64748b !important;
  stroke-opacity: 0.6 !important;
}

/* STUDY GUIDE FORMS DARK MODE */
body.theme-dark .study-preferences-card {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .preferences-header h3,
body.theme-dark .recommendations-header h3,
body.theme-dark .study-plan-header h2 {
  color: var(--theme-text) !important;
}

body.theme-dark .study-recommendations {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .study-plan-content {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .study-plan-content .section-heading {
  color: var(--theme-text) !important;
  border-bottom-color: var(--theme-primary) !important;
}

body.theme-dark .study-plan-content p,
body.theme-dark .study-plan-content li {
  color: var(--theme-text-secondary) !important;
}

body.theme-dark .study-plan-content strong {
  color: var(--theme-text) !important;
}

/* FIX REMAINING DASHBOARD WHITE AREAS */
body.theme-dark .about-app {
  background: var(--theme-surface) !important;
  border: 1px solid var(--theme-border) !important;
}

body.theme-dark .about-app h3 {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.theme-dark .danger-zone {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

body.theme-dark .danger-zone h4 {
  color: #ef4444 !important;
}

body.theme-dark .danger-zone p {
  color: #fca5a5 !important;
}

/* FIX CHAT WELCOME SCREEN DARK MODE */
body.theme-dark .chat-welcome {
  background: transparent !important;
}

body.theme-dark .chat-welcome h2 {
  color: var(--theme-text) !important;
}

body.theme-dark .chat-welcome p {
  color: var(--theme-text-secondary) !important;
}

/* FIX WHITEBOARD CARD DARK MODE */
body.theme-dark .wb-card {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .wb-card-title {
  color: var(--theme-text) !important;
}

body.theme-dark .wb-card-meta {
  color: var(--theme-text-muted) !important;
}

/* ========================================
   NOTES SECTION STYLES
   ======================================== */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.notes-subject-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  border: 2px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: not-allowed;
  opacity: 0.8;
}

.notes-subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
}

.notes-subject-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.notes-subject-card:hover .notes-subject-icon {
  transform: scale(1.1) rotate(5deg);
}

.notes-subject-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.notes-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.notes-badge.coming-soon {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #fbbf24;
}

/* Dark Mode for Notes */
body.theme-dark .notes-subject-card {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .notes-subject-card h3 {
  color: var(--theme-text) !important;
}

body.theme-dark .notes-subject-card:hover {
  background: var(--theme-surface-alt) !important;
}

/* Notes Topics Accordion */
.back-btn-notes {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.back-btn-notes:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateX(-4px);
}

.notes-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2rem;
}

.topics-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.topic-item {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.topic-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.topic-header:hover {
  background: #f8fafc;
}

.topic-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.topic-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}

.topic-arrow {
  color: #64748b;
  transition: transform 0.3s ease;
  font-size: 1rem;
}

.topic-item.active .topic-arrow {
  transform: rotate(180deg);
}

.topic-content {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.topic-item.active .topic-content {
  max-height: 2000px;
  opacity: 1;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.subtopic-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.subtopic-link:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateX(4px);
}

.subtopic-link::before {
  content: '•';
  margin-right: 0.75rem;
  color: #2563eb;
  font-weight: 700;
}

/* Dark mode for topics */
body.theme-dark .back-btn-notes {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .notes-section-title {
  color: var(--theme-text) !important;
}

body.theme-dark .topic-item {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

body.theme-dark .topic-header:hover {
  background: var(--theme-surface-alt) !important;
}

body.theme-dark .topic-title {
  color: var(--theme-text) !important;
}

body.theme-dark .subtopic-link {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text-secondary) !important;
}

body.theme-dark .subtopic-link:hover {
  background: var(--theme-surface) !important;
  border-color: var(--theme-primary) !important;
  color: var(--theme-primary) !important;
}

/* ========================================
   PROGRESS OVERLAY STYLES
   ======================================== */

.progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.progress-card {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.4s ease;
}

.progress-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.progress-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.progress-message {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 2rem;
  min-height: 1.5rem;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
  animation: shimmer 2s infinite linear;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.progress-percentage {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2563eb;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Dark mode for progress overlay */
body.theme-dark .progress-card {
  background: var(--theme-surface) !important;
  border: 1px solid var(--theme-border) !important;
}

body.theme-dark .progress-title {
  color: var(--theme-text) !important;
}

body.theme-dark .progress-message {
  color: var(--theme-text-secondary) !important;
}

body.theme-dark .progress-bar-container {
  background: var(--theme-surface-alt) !important;
}

body.theme-dark .progress-percentage {
  color: var(--theme-primary) !important;
}

/* ========================================
   SELF-ASSESSMENT SECTION STYLES
   ======================================== */

.self-assessment-summary {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 1.5rem;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.self-assessment-summary h4 {
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.self-assessment-summary h4::before {
  content: '📊';
  font-size: 1.5rem;
}

.score-input-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.score-input-container label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 600;
  color: #475569;
  font-size: 0.95rem;
}

.score-input {
  padding: 0.75rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  width: 120px;
  transition: all 0.3s ease;
  background: white;
  color: #0f172a;
}

.score-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: scale(1.02);
}

.score-input::placeholder {
  color: #94a3b8;
}

.calculate-score-btn {
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.calculate-score-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.calculate-score-btn:active {
  transform: translateY(0);
}

.calculated-score {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #2563eb10, #60a5fa10);
  border-radius: 1rem;
  border: 2px solid #2563eb;
  animation: slideIn 0.4s ease;
}

.score-percentage {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.score-feedback {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode for self-assessment */
body.theme-dark .self-assessment-summary {
  background: var(--theme-surface-alt);
  border-color: var(--theme-border);
}

body.theme-dark .self-assessment-summary h4 {
  color: var(--theme-text);
}

body.theme-dark .score-input-container label {
  color: var(--theme-text-secondary);
}

body.theme-dark .score-input {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

body.theme-dark .score-input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

body.theme-dark .calculated-score {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(96, 165, 250, 0.1));
  border-color: var(--theme-primary);
}

body.theme-dark .score-feedback {
  color: var(--theme-text);
}

/* Dark mode for theory paper results */
body.theme-dark .grading-results {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

body.theme-dark .grading-summary h3 {
  color: var(--theme-text);
}

body.theme-dark .theory-instructions {
  background: rgba(245, 158, 11, 0.15);
  color: var(--theme-text-secondary);
  border-left-color: #f59e0b;
}

body.theme-dark .theory-question-result {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

body.theme-dark .question-result-header {
  background: var(--theme-surface-alt);
  border-bottom-color: var(--theme-border);
}

body.theme-dark .question-num {
  color: var(--theme-text);
}

body.theme-dark .user-answer-section,
body.theme-dark .markscheme-section,
body.theme-dark .self-assessment-section {
  border-bottom-color: var(--theme-border);
}

body.theme-dark .user-answer-section h4,
body.theme-dark .markscheme-section h4,
body.theme-dark .self-assessment-section h4 {
  color: var(--theme-text);
}

body.theme-dark .user-answer-display {
  background: var(--theme-surface-alt);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-dark .no-markscheme {
  background: var(--theme-surface-alt);
  color: var(--theme-text-secondary);
}

body.theme-dark .self-assessment-section {
  background: var(--theme-surface-alt);
}

body.theme-dark .assessment-controls label {
  color: var(--theme-text-secondary);
}

body.theme-dark .self-assessment-input {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-primary);
}

body.theme-dark .marks-range {
  color: var(--theme-text-secondary);
}

body.theme-dark .theory-score-summary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.2) 100%);
  border: 2px solid var(--theme-primary);
}

/* ========================================
   PAST PAPERS SECTION STYLES
   ======================================== */

/* Subject Cards Grid */
.past-papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.subject-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-8px);
  border-color: #2563eb;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.subject-card:hover::before {
  transform: scaleX(1);
}

.subject-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.subject-card:hover .subject-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.subject-icon i {
  font-size: 2.5rem;
  color: white;
}

.subject-info {
  width: 100%;
}

.subject-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.subject-code {
  font-size: 1rem;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.subject-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subject-badge.available {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.subject-badge.coming-soon {
  background: #fef3c7;
  color: #d97706;
}

/* Paper Types Section */
.paper-types-section {
  animation: fadeInUp 0.5s ease;
}

.back-to-subjects-btn,
.back-to-papers-btn,
.back-btn {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  color: #475569;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  font-family: 'Inter', sans-serif;
}

.back-to-subjects-btn:hover,
.back-to-papers-btn:hover,
.back-btn:hover {
  background: #e2e8f0;
  transform: translateX(-4px);
  border-color: #cbd5e1;
}

.section-subtitle-large {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2rem 0;
  text-align: center;
}

.paper-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.paper-type-card {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.paper-type-card:hover {
  transform: translateY(-8px);
  border-color: #2563eb;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.paper-type-icon {
  width: 70px;
  height: 70px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.paper-type-card:hover .paper-type-icon {
  transform: scale(1.1);
}

.paper-type-icon i {
  font-size: 2rem;
  color: white;
}

.paper-type-info {
  width: 100%;
}

.paper-type-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.paper-type-desc {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 1rem 0;
}

.paper-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.paper-badge.available {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.paper-badge.coming-soon {
  background: #fef3c7;
  color: #d97706;
}

/* Papers Container */
.papers-list-section {
  animation: fadeInUp 0.5s ease;
}

.papers-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.paper-item {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.paper-item:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.paper-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.paper-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.paper-icon i {
  font-size: 1.5rem;
  color: white;
}

.paper-info {
  flex: 1;
}

.paper-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.paper-session {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.paper-downloads {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.download-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.download-btn.question-paper {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
}

.download-btn.question-paper:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.download-btn.mark-scheme {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.download-btn.mark-scheme:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Coming Soon Message */
.coming-soon-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  animation: fadeInUp 0.5s ease;
}

.coming-soon-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.coming-soon-icon i {
  font-size: 3rem;
  color: white;
}

.coming-soon-message h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.coming-soon-message p {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
  max-width: 600px;
}

.coming-soon-note {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Styles for Past Papers */
body.theme-dark .subject-card,
body.theme-dark .paper-type-card,
body.theme-dark .paper-item {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .subject-title,
body.theme-dark .paper-type-title,
body.theme-dark .paper-title,
body.theme-dark .section-subtitle-large,
body.theme-dark .coming-soon-message h3 {
  color: var(--theme-text) !important;
}

body.theme-dark .subject-code,
body.theme-dark .paper-type-desc,
body.theme-dark .paper-session,
body.theme-dark .coming-soon-message p {
  color: var(--theme-text-secondary) !important;
}

body.theme-dark .back-to-subjects-btn,
body.theme-dark .back-to-papers-btn,
body.theme-dark .back-btn {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .back-to-subjects-btn:hover,
body.theme-dark .back-to-papers-btn:hover,
body.theme-dark .back-btn:hover {
  background: var(--theme-surface) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .past-papers-grid {
    grid-template-columns: 1fr;
  }
  
  .paper-types-grid {
    grid-template-columns: 1fr;
  }
  
  .papers-container {
    grid-template-columns: 1fr;
  }
  
  .paper-downloads {
    flex-direction: column;
  }
}

/* Responsive Design for Settings */
@media (max-width: 768px) {
  .settings-section {
    padding: 1.5rem;
  }
  
  .theme-grid,
  .personality-grid {
    grid-template-columns: 1fr;
  }
  
  .account-profile {
    flex-direction: column;
    text-align: center;
  }
  
  .account-actions {
    justify-content: center;
  }
  
  .data-stats {
    grid-template-columns: 1fr;
  }
  
  .toast {
    right: 1rem;
    left: 1rem;
    min-width: auto;
  }
}


/* Theory Question Answer Styles */
.theory-answer-space {
  margin-top: 1.5rem;
}

.theory-answer-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', Arial, sans-serif;
  resize: vertical;
  transition: border-color 0.3s ease;
  background: white;
  min-height: 120px;
}

.theory-answer-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.answer-hint {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  color: #475569;
}

.answer-hint::before {
  content: '💡 ';
  font-weight: bold;
}


/* Theory Self-Assessment Styles */
.theory-instructions {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #475569;
  margin: 1rem 0;
  padding: 1rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 0.5rem;
}

.theory-results {
  margin-top: 2rem;
}

.theory-question-result {
  margin-bottom: 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
}

.user-answer-section,
.markscheme-section,
.self-assessment-section {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.self-assessment-section {
  border-bottom: none;
  background: #f8fafc;
}

.user-answer-section h4,
.markscheme-section h4,
.self-assessment-section h4 {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
}

.user-answer-display {
  background: white;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  white-space: pre-wrap;
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
}

.markscheme-image {
  max-width: 100%;
  height: auto;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.no-markscheme {
  color: #64748b;
  font-style: italic;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
}

.assessment-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.assessment-controls label {
  font-weight: 500;
  color: #475569;
}

.self-assessment-input {
  width: 80px;
  padding: 0.5rem;
  border: 2px solid #2563eb;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.self-assessment-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: scale(1.05);
}

.marks-range {
  font-weight: 500;
  color: #64748b;
}

.theory-score-summary {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.theory-score-summary h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.theory-score-summary .score-display {
  font-size: 2.5rem;
  font-weight: 700;
}

.theory-score-summary #self-assessed-score {
  color: #fbbf24;
}

/* ========================================
   THEORY SELF-ASSESSMENT STYLES
   ======================================== */

/* Self-Assessment Section */
.self-assessment-section {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.assessment-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.assessment-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.assessment-input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

.marks-input {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  background: white;
  transition: all 0.2s ease;
}

.marks-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.marks-input:hover {
  border-color: #94a3b8;
}

/* Theory Scoring Section */
.theory-scoring-section {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 1rem;
  text-align: center;
}

.calculate-score-btn {
  padding: 1rem 3rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.calculate-score-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.calculate-score-btn:active {
  transform: translateY(0);
}

/* Calculated Score Display */
.calculated-score-display {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  border: 3px solid #3b82f6;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

.score-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.score-percentage-display {
  flex-shrink: 0;
}

.percentage-value {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.score-details {
  text-align: left;
  flex: 1;
}

.score-feedback {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.score-breakdown {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0;
  font-weight: 600;
}

/* ========================================
   DARK MODE FOR SELF-ASSESSMENT
   ======================================== */

body.theme-dark .self-assessment-section {
  background: var(--theme-surface-alt);
}

body.theme-dark .assessment-input-group label {
  color: var(--theme-text-secondary);
}

body.theme-dark .marks-input {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-dark .marks-input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.theme-dark .marks-input:hover {
  border-color: var(--theme-primary-light);
}

body.theme-dark .theory-scoring-section {
  background: var(--theme-surface);
}

body.theme-dark .calculated-score-display {
  background: var(--theme-surface);
  border-color: var(--theme-primary);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

body.theme-dark .score-feedback {
  color: var(--theme-text);
}

body.theme-dark .score-breakdown {
  color: var(--theme-text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .assessment-inputs {
    grid-template-columns: 1fr;
  }
  
  .score-result {
    flex-direction: column;
    gap: 1rem;
  }
  
  .score-details {
    text-align: center;
  }
  
  .percentage-value {
    font-size: 3rem;
  }
  
  .score-feedback {
    font-size: 1.2rem;
  }
  
  .score-breakdown {
    font-size: 1rem;
  }
}


/* Video Player Styles */
.video-player-container { margin: 2rem 0; }
.video-player { background: #1a1a2e; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.3); max-width: 800px; margin: 0 auto; }
.video-screen { aspect-ratio: 16/9; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); position: relative; overflow: hidden; }
.video-slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; opacity: 0; transform: scale(0.95); transition: all 0.5s ease; }
.video-slide.active { opacity: 1; transform: scale(1); }
.slide-title { color: white; font-size: 2.5rem; font-weight: bold; margin-bottom: 1.5rem; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.slide-content { background: rgba(255,255,255,0.95); padding: 2rem; border-radius: 12px; max-width: 600px; }
.slide-content p { color: #333; font-size: 1.2rem; line-height: 1.6; margin-bottom: 1rem; }
.slide-key-point { display: flex; align-items: center; gap: 0.75rem; background: #f0f7ff; padding: 1rem; border-radius: 8px; color: #2563eb; margin-top: 1rem; }
.slide-key-point i { font-size: 1.5rem; }
.video-controls { background: #16213e; padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.video-btn { background: #667eea; color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.video-btn:hover { background: #764ba2; transform: scale(1.1); }
.video-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; cursor: pointer; position: relative; }
.video-progress-fill { height: 100%; background: #667eea; border-radius: 3px; transition: width 0.1s; }
.video-time { color: white; font-size: 0.9rem; min-width: 100px; text-align: right; }
\r\n\r\n/* Study Material Chat Interface */\r\n.chat-full-page { padding: 0 !important; height: calc(100vh - 4rem); }\r\n.study-material-layout { height: 100%; display: flex; flex-direction: column; background: #0f172a; border-radius: 16px; overflow: hidden; }\r\n.study-chat-main { flex: 1; display: flex; flex-direction: column; height: 100%; }\r\n.study-chat-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1.5rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); }\r\n.study-chat-title { margin: 0; font-size: 1.8rem; font-weight: 700; color: white; display: flex; align-items: center; gap: 0.75rem; }\r\n.study-chat-subtitle { margin: 0.5rem 0 0 0; color: rgba(255,255,255,0.8); font-size: 1rem; }\r\n.study-chat-messages { flex: 1; overflow-y: auto; padding: 2rem; background: #0f172a; }\r\n.study-welcome { text-align: center; max-width: 700px; margin: 3rem auto; }\r\n.welcome-icon { width: 100px; height: 100px; margin: 0 auto 1.5rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; }\r\n.welcome-icon i { font-size: 3rem; color: white; }\r\n.study-welcome h2 { font-size: 2rem; font-weight: 700; color: white; margin: 0 0 1rem 0; }\r\n.study-welcome > p { font-size: 1.1rem; color: #94a3b8; margin-bottom: 2rem; }\r\n.upload-prompt { background: rgba(102, 126, 234, 0.05); border: 2px dashed rgba(102, 126, 234, 0.3); border-radius: 16px; padding: 3rem 2rem; margin: 2rem 0; transition: all 0.3s ease; }\r\n.upload-prompt:hover { border-color: #667eea; background: rgba(102, 126, 234, 0.1); }\r\n.upload-prompt-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 1rem 2.5rem; border-radius: 12px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 0.75rem; }\r\n.upload-prompt-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }\r\n.upload-hint { color: #64748b; font-size: 0.95rem; margin-top: 1rem; }\r\n.quick-actions-welcome { margin-top: 3rem; }\r\n.quick-actions-welcome h4 { color: #cbd5e1; font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }\r\n.quick-action-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }\r\n.action-chip { background: rgba(102, 126, 234, 0.1); border: 1px solid rgba(102, 126, 234, 0.2); padding: 0.75rem 1.25rem; border-radius: 12px; color: #94a3b8; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }\r\n.action-chip i { color: #667eea; }\r\n.chat-message { margin-bottom: 1.5rem; display: flex; gap: 1rem; animation: slideInMessage 0.3s ease; }\r\n@keyframes slideInMessage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }\r\n.chat-message.user { flex-direction: row-reverse; }\r\n.message-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; }\r\n.message-avatar.user-avatar { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }\r\n.message-avatar.ai-avatar { background: rgba(102, 126, 234, 0.2); color: #667eea; }\r\n.message-content { max-width: 70%; background: rgba(255,255,255,0.05); padding: 1rem 1.25rem; border-radius: 16px; color: #e2e8f0; line-height: 1.6; }\r\n.chat-message.user .message-content { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 16px 16px 4px 16px; }\r\n.chat-message.ai .message-content { border-radius: 16px 16px 16px 4px; }\r\n.study-chat-input-area { background: #1e293b; border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 2rem; }\r\n.study-input-wrapper { display: flex; gap: 1rem; margin-bottom: 1rem; }\r\n.study-chat-input-field { flex: 1; background: #0f172a; border: 2px solid rgba(102, 126, 234, 0.3); border-radius: 12px; padding: 1rem 1.25rem; color: white; font-size: 1rem; font-family: " Inter\, sans-serif; resize: none; max-height: 120px; transition: all 0.3s ease; }\r\n.study-chat-input-field:focus { outline: none; border-color: #667eea; background: rgba(102, 126, 234, 0.05); }\r\n.study-send-button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 12px; padding: 1rem 1.5rem; cursor: pointer; font-size: 1.1rem; transition: all 0.3s ease; }\r\n.study-send-button:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4); }\r\n.quick-actions-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; }\r\n.quick-action-btn { background: rgba(102, 126, 234, 0.1); border: 1px solid rgba(102, 126, 234, 0.3); color: #94a3b8; padding: 0.75rem 1.25rem; border-radius: 10px; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }\r\n.quick-action-btn:hover { background: rgba(102, 126, 234, 0.2); border-color: #667eea; color: #cbd5e1; transform: translateY(-1px); }\r\n.quick-action-btn i { color: #667eea; }\r\n.upload-progress-toast { position: fixed; bottom: 2rem; right: 2rem; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(102, 126, 234, 0.3); border-radius: 12px; padding: 1rem 1.5rem; z-index: 10000; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }\r\n.progress-content { display: flex; align-items: center; gap: 0.75rem; color: white; font-weight: 600; margin-bottom: 0.5rem; }\r\n.progress-bar-mini { height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }\r\n.progress-bar-fill-mini { height: 100%; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); width: 0%; transition: width 0.3s ease; }
