/* Smart Study Planner - Enhanced CSS */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary-dark: #0a0a0a;
  --secondary-dark: #1a1a1a;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --text-white: #ffffff;
  --text-gray: #d1d5db;
  --text-light-gray: #9ca3af;
  --border-gray: #374151;
  --hover-gray: #2d3748;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--primary-dark);
  color: var(--text-white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(-45deg, #0a0a0a, #1a1a1a, #2d1b69, #1a1a1a);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-container {
  padding: 2rem 20px;
  min-height: calc(100vh - 80px);
}

.gradient-bg {
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card {
  background: rgba(26, 26, 26, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-gray);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-gray);
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-white);
  font-weight: 700;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.welcome-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

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

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-gray);
}

.page-title-section {
  flex: 1;
}

/* Welcome Section */
.welcome-section {
  background: var(--gradient-secondary);
  border-radius: 20px;
  padding: 3rem;
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-content {
  flex: 1;
}

.welcome-actions {
  display: flex;
  gap: 1rem;
}

/* Streak Display */
.streak-display {
  background: var(--gradient-warning);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.streak-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-white);
  display: block;
  margin-bottom: 0.5rem;
}

.streak-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 600;
}

.streak-days {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.streak-day {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.streak-day.completed {
  background: var(--gradient-success);
  color: white;
}

.streak-day.current {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.streak-day.upcoming {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  border: 2px solid var(--border-gray);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-white);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border-gray);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: rgba(0, 0, 0, 0.7);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-full {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--text-white);
}

.btn-success {
  background: var(--gradient-success);
  color: var(--text-white);
}

.btn-warning {
  background: var(--gradient-warning);
  color: var(--text-white);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
  color: var(--text-white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-gray);
  border: 2px solid var(--border-gray);
}

.btn-ghost:hover {
  background: var(--hover-gray);
  border-color: var(--accent-purple);
  color: var(--text-white);
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-gray);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-white);
  text-decoration: none;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-white);
  background: rgba(139, 92, 246, 0.1);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-white);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.quiz-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--gradient-secondary);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.stat-card:hover::before {
  transform: translateX(100%);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-white);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 500;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.action-card {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-gray);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-card:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-5px);
}

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

.action-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.action-card p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* Sessions Grid */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.session-card {
  background: rgba(26, 26, 26, 0.95);
  border: 2px solid var(--border-gray);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.session-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.session-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.session-date {
  font-size: 0.85rem;
  color: var(--text-gray);
}

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

.session-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
}

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

.recent-list {
  max-height: 300px;
  overflow-y: auto;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-gray);
  transition: background 0.3s ease;
  cursor: pointer;
}

.recent-item:hover {
  background: rgba(139, 92, 246, 0.1);
}

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

.recent-item-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.recent-item-info p {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.recent-item-score {
  text-align: right;
}

.score-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.score-badge.success {
  background: var(--gradient-success);
  color: white;
}

.score-badge.warning {
  background: var(--gradient-warning);
  color: white;
}

.score-badge.danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
  color: white;
}

/* Quiz Interface */
.quiz-container {
  max-width: 900px;
  margin: 0 auto;
}

.question-card {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-gray);
  position: relative;
}

.question-progress {
  background: var(--border-gray);
  height: 6px;
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.question-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  border-radius: 3px;
}

.question-number {
  color: var(--accent-purple);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.question-text {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--text-white);
  font-weight: 600;
  line-height: 1.6;
}

.options-list {
  list-style: none;
  margin-bottom: 2rem;
}

.option-item {
  margin-bottom: 1rem;
}

.option-button {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border-gray);
  border-radius: 12px;
  color: var(--text-white);
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
}

.option-button:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  transform: translateX(5px);
}

.option-button.selected {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--text-white);
}

.option-button.correct {
  background: var(--gradient-success);
  border-color: var(--accent-green);
}

.option-button.incorrect {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
  border-color: var(--accent-red);
}

.option-button.correct::after {
  content: "✓";
  position: absolute;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.option-button.incorrect::after {
  content: "✗";
  position: absolute;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

/* Quiz Timer */
.quiz-timer {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--gradient-primary);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  z-index: 50;
  min-width: 120px;
}

/* Quiz Loading Overlay */
.quiz-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Increased from 1000 to 9999 */
  backdrop-filter: blur(10px);
}

.quiz-loading-content {
  text-align: center;
  color: var(--text-white);
}

.quiz-loading-spinner {
  width: 80px;
  height: 80px;
  border: 6px solid var(--border-gray);
  border-top: 6px solid var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
}

.quiz-loading-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz-loading-subtext {
  font-size: 1rem;
  color: var(--text-gray);
}

@media (max-width: 768px) {
  .quiz-timer {
    position: fixed;
    top: 90px; /* Below navbar on mobile */
    right: 10px;
    padding: 0.75rem;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .quiz-timer {
    top: 85px; /* Even lower on small screens */
    right: 5px;
    padding: 0.5rem;
    min-width: 90px;
  }
}

/* Quiz Results */
.quiz-results {
  background: var(--gradient-secondary);
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  margin: 2rem 0;
}

.score-display {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.score-percentage {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.quiz-stats {
  margin: 2rem 0;
}

.quiz-stats p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.quiz-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Quiz Review */
.question-review {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.options-review {
  margin: 1rem 0;
}

.options-review .option-button {
  margin-bottom: 0.5rem;
  cursor: default;
}

.answer-explanation {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-weight: 500;
}

/* Tables */
.table-container {
  background: rgba(26, 26, 26, 0.95);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-gray);
  backdrop-filter: blur(10px);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-gray);
}

.table th {
  background: var(--gradient-secondary);
  font-weight: 700;
  color: var(--text-white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  color: var(--text-gray);
  font-weight: 500;
}

.table tr:hover {
  background: rgba(139, 92, 246, 0.1);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 8000; /* Ensure modals are below loading overlay */
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  border: 1px solid var(--border-gray);
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 800px;
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-white);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
}

.modal-body {
  max-height: 400px;
  overflow-y: auto;
}

/* AI Response Formatting */
.ai-response {
  background: rgba(0, 0, 0, 0.5);
  border-left: 4px solid var(--accent-purple);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  backdrop-filter: blur(5px);
  max-height: 300px;
  overflow-y: auto;
}

.ai-chat-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid var(--border-gray);
}

.ai-response h1,
.ai-response h2,
.ai-response h3,
.ai-response h4 {
  color: var(--accent-purple);
  margin: 1rem 0 0.5rem 0;
}

.ai-response p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.ai-response ul,
.ai-response ol {
  margin: 1rem 0 1rem 2rem;
}

.ai-response li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-white);
}

.ai-response strong {
  color: var(--accent-blue);
  font-weight: 700;
}

.ai-response em {
  color: var(--accent-green);
  font-style: italic;
}

.ai-response code {
  background: rgba(139, 92, 246, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  color: var(--accent-purple);
}

/* Loading States */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-gray);
}

.loading-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: var(--text-gray);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-gray);
  border-top: 4px solid var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty States */
.empty-state-container {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-container h3 {
  color: var(--text-white);
  margin-bottom: 1rem;
}

.empty-state-container p {
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-up {
  animation: slideUp 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .main-container {
    padding: 1rem 15px;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -300px;
    width: 280px;
    height: calc(100vh - 70px);
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: right 0.3s ease;
    z-index: 999;
    border-left: 1px solid var(--border-gray);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 1rem;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .welcome-section {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .welcome-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sessions-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .session-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .session-actions {
    width: 100%;
    justify-content: space-between;
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
    max-height: 85vh;
  }

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

  .table-container {
    overflow-x: auto;
  }

  .stat-number {
    font-size: 2rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .welcome-title {
    font-size: 1.75rem;
  }

  .question-card {
    padding: 2rem;
  }

  .quiz-timer {
    position: fixed;
    top: 80px;
    right: 10px;
    padding: 0.75rem;
    min-width: 100px;
  }

  .quiz-timer-display {
    font-size: 1.2rem;
  }

  .quiz-actions {
    flex-direction: column;
    align-items: center;
  }

  .streak-days {
    gap: 0.25rem;
  }

  .streak-day {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .form-input {
    padding: 12px 16px;
  }

  .card {
    padding: 1.5rem;
  }

  .session-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .question-card {
    padding: 1.5rem;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .quiz-timer {
    top: 70px;
    right: 5px;
    padding: 0.5rem;
    min-width: 90px;
  }

  .quiz-timer-display {
    font-size: 1rem;
  }

  .streak-days {
    gap: 0.2rem;
  }

  .streak-day {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.hidden {
  display: none;
}
.flex {
  display: flex;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.items-center {
  align-items: center;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}
.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}

/* Full Screen Session View */
.session-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--primary-dark);
  z-index: 7000; /* Lower than loading overlay */
  overflow-y: auto;
  padding: 2rem;
}

.session-fullscreen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-gray);
}

.session-fullscreen-content {
  max-width: 1000px;
  margin: 0 auto;
}

.session-notes-container {
  background: rgba(26, 26, 26, 0.95);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border-gray);
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .session-fullscreen {
    padding: 1rem;
  }

  .session-notes-container {
    padding: 1.5rem;
  }
}

/* Progress Page Styles */
.progress-chart {
  padding: 2rem;
}

.chart-container {
  display: flex;
  align-items: end;
  justify-content: space-between;
  height: 200px;
  gap: 1rem;
  padding: 1rem 0;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.bar {
  width: 100%;
  min-height: 20px;
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
  transition: all 0.3s ease;
}

.bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bar-value {
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}

.bar-label {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-gray);
  text-align: center;
}

.subject-breakdown {
  padding: 2rem;
}

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

.subject-info {
  min-width: 150px;
}

.subject-name {
  display: block;
  font-weight: 600;
  color: var(--text-white);
}

.subject-count {
  display: block;
  font-size: 0.8rem;
  color: var(--text-gray);
}

.subject-bar {
  flex: 1;
  height: 8px;
  background: var(--border-gray);
  border-radius: 4px;
  overflow: hidden;
}

.subject-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.subject-percentage {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  color: var(--accent-purple);
}

.activity-timeline {
  padding: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-gray);
  transition: background 0.3s ease;
}

.activity-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
}

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

.activity-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-content h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-white);
  font-size: 1rem;
}

.activity-content p {
  margin: 0 0 0.25rem 0;
  color: var(--text-gray);
  font-size: 0.9rem;
}

.activity-content small {
  color: var(--text-light-gray);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .chart-container {
    height: 150px;
    gap: 0.5rem;
  }

  .bar-value {
    font-size: 0.7rem;
  }

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

  .subject-bar {
    width: 100%;
  }

  .activity-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Profile Page Styles */
.profile-info {
  display: grid;
  gap: 1.5rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-value {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  color: var(--text-white);
  font-weight: 500;
}

.danger-zone {
  padding: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
  .profile-info {
    gap: 1rem;
  }
}

.quiz-link, .activity-link {
  color: var(--accent-purple);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.quiz-link:hover, .activity-link:hover {
  text-decoration: underline;
  color: var(--accent-blue);
}
