/* ==========================================================================
   Global English Learning Platform - Premium Stylesheet
   ========================================================================== */

/* Design Tokens & Variables */
:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --card-bg: rgba(30, 41, 59, 0.5);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-hover-border: rgba(99, 102, 241, 0.3);
  --header-bg: rgba(9, 13, 22, 0.8);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-color: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --secondary-color: #a855f7;
  --secondary-glow: rgba(168, 85, 247, 0.15);
  
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  
  --warning-color: #f59e0b;
  --danger-color: #f43f5e;
  
  --sidebar-width: 260px;
  --header-height: 80px;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

input, textarea, select {
  font-family: var(--font-family);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  transition: var(--transition-smooth);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Layout Framework */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 24px;
}

.sidebar-header {
  margin-bottom: 40px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-icon i {
  color: #fff;
  width: 20px;
  height: 20px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--accent-light);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
}

.menu-item i {
  width: 20px;
  height: 20px;
}

.menu-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.menu-item.active {
  color: #fff;
  background: linear-gradient(90deg, var(--accent-color) 0%, rgba(99, 102, 241, 0.1) 100%);
  box-shadow: 0 4px 15px var(--accent-glow);
  position: relative;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--accent-light);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

/* Main Area Layout */
.main-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar Header */
.topbar {
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.greeting {
  font-size: 22px;
  font-weight: 700;
}

.subtext {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Notification Button */
.icon-badge-btn {
  position: relative;
  width: 42px;
  height: 42px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-badge-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.icon-badge-btn i {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.icon-badge-btn:hover i {
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger-color);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* Profile Menu Trigger */
.profile-menu-container {
  position: relative;
}

.profile-trigger {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px 14px 6px 6px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.profile-trigger:hover {
  background: var(--bg-tertiary);
}

.avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-trigger .chevron {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Dropdown Panel General */
.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 100;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-panel.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Profile Dropdown specific */
.profile-dropdown {
  width: 220px;
  padding: 10px;
}

.profile-dropdown-header {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
}

.profile-dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 6px 0;
}

.text-danger {
  color: var(--danger-color) !important;
}

/* Notification Dropdown specific */
.notif-panel {
  width: 320px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.notif-list {
  list-style: none;
  overflow-y: auto;
  flex-grow: 1;
}

.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  display: flex;
  gap: 12px;
  transition: var(--transition-smooth);
}

.notif-item:hover {
  background: var(--bg-tertiary);
}

.notif-item.unread {
  background: rgba(99, 102, 241, 0.05);
  position: relative;
}

.notif-item.unread::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
}

.notif-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box i {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}

.notif-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.outline-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.outline-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.text-btn:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

/* Page Panels */
.content-container {
  padding: 40px;
  flex-grow: 1;
}

.content-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-panel.active {
  display: block;
}

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

/* SECTION CONTAINER GENERAL */
.section-container {
  margin-top: 40px;
}

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

.section-title {
  font-size: 20px;
  font-weight: 700;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.panel-title {
  font-size: 28px;
  font-weight: 800;
}

.panel-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ==========================================================================
   PANEL: HOME / DASHBOARD
   ========================================================================== */

/* Stats Summary Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper i {
  width: 24px;
  height: 24px;
  color: #fff;
}

.stat-icon-wrapper.enrolled {
  background: linear-gradient(135deg, var(--accent-color) 0%, rgba(99, 102, 241, 0.2) 100%);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.stat-icon-wrapper.active {
  background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(168, 85, 247, 0.2) 100%);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.stat-icon-wrapper.completed {
  background: linear-gradient(135deg, var(--success-color) 0%, rgba(16, 185, 129, 0.2) 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.stat-icon-wrapper.time {
  background: linear-gradient(135deg, var(--warning-color) 0%, rgba(245, 158, 11, 0.2) 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

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

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
}

/* Continue Learning Cards */
.continue-learning-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.continue-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: var(--transition-smooth);
}

.continue-card:hover {
  border-color: var(--card-hover-border);
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.7);
}

.continue-thumbnail {
  width: 100px;
  height: 64px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
}

.continue-info {
  flex-grow: 1;
}

.continue-name {
  font-size: 16px;
  font-weight: 700;
}

.continue-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  gap: 12px;
}

.progress-container-small {
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.progress-header-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

.continue-action {
  flex-shrink: 0;
}

/* ==========================================================================
   PANEL: COURSES
   ========================================================================== */
.courses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.tab-filters {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
}

.tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-tertiary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 0 16px;
  border-radius: var(--border-radius-md);
  width: 300px;
}

.search-bar i {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.search-bar input {
  background: transparent;
  border: none;
  padding: 12px 0;
  color: var(--text-primary);
  width: 100%;
}

.search-bar input:focus {
  box-shadow: none;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Course Card (Standard) */
.course-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.course-card-banner {
  height: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.course-card:hover .banner-img {
  transform: scale(1.05);
}

.category-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-light);
}

.course-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  height: 50px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.course-progress-section {
  margin-top: 16px;
}

.course-card-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wishlist-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.wishlist-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--danger-color);
}

.wishlist-toggle.active {
  color: var(--danger-color);
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.2);
}

/* Quiz Attempt list styling */
.quiz-attempts-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-attempt-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition-smooth);
}

.quiz-attempt-card:hover {
  border-color: var(--card-hover-border);
  background: rgba(30, 41, 59, 0.7);
}

.quiz-info h3 {
  font-size: 16px;
  font-weight: 700;
}

.quiz-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.quiz-score-badge {
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
}

.quiz-score-badge.passed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.quiz-score-badge.failed {
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   PANEL: NOTES
   ========================================================================== */
.notes-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper select {
  appearance: none;
  width: 220px;
  padding-right: 40px;
  cursor: pointer;
}

.select-wrapper::after {
  content: '▼';
  font-size: 10px;
  color: var(--text-muted);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.note-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: var(--transition-smooth);
}

.note-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

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

.note-type-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
}

.note-type-indicator.video {
  color: var(--secondary-color);
}

.note-card-actions {
  display: flex;
  gap: 4px;
}

.note-course-title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.note-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex-grow: 1;
  white-space: pre-line;
}

.note-card-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-timestamp-badge {
  background: rgba(168, 85, 247, 0.1);
  color: var(--secondary-color);
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   PANEL: DISCUSSIONS
   ========================================================================== */
.discussions-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  height: 600px;
}

.discussions-sidebar {
  border-right: 1px solid var(--card-border);
  padding-right: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.forum-threads-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-preview-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.thread-preview-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--card-hover-border);
}

.thread-preview-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.thread-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.thread-tag {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 30px;
  font-size: 10px;
  font-weight: 700;
}

.thread-title-preview {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-preview-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* Discussion Details View */
.discussion-details-view {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  overflow-y: auto;
  height: 100%;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.thread-details-header {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.thread-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.avatar-medium {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 14px;
  font-weight: 700;
}

.author-role {
  font-size: 11px;
  color: var(--accent-light);
  font-weight: 600;
}

.mentor-badge {
  color: var(--secondary-color) !important;
}

.thread-body-full {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  white-space: pre-line;
}

.thread-interactions {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.interaction-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.interaction-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.interaction-btn.active {
  color: var(--danger-color);
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
}

.interaction-btn.active i {
  fill: var(--danger-color);
}

/* Answers Section */
.answers-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.answers-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.answer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
}

.answer-card.by-mentor {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.03);
}

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

.answer-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* New Answer Input */
.new-answer-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.new-answer-box textarea {
  width: 100%;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   PANEL: EXPLORE
   ========================================================================== */
.explore-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.flex-grow-1 {
  flex-grow: 1;
}

/* ==========================================================================
   PANEL: PROFILE
   ========================================================================== */
.profile-hero-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
}

.profile-hero-avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.avatar-large {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-tertiary);
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
}

.avatar-upload-btn:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

.avatar-upload-btn i {
  width: 16px;
  height: 16px;
}

.profile-hero-info {
  display: flex;
  flex-direction: column;
}

.badge-wrapper {
  margin-bottom: 8px;
}

.user-badge {
  background: var(--accent-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 30px;
  text-transform: uppercase;
}

.profile-full-name {
  font-size: 26px;
  font-weight: 800;
}

.profile-email-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.profile-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 30px;
  gap: 8px;
}

.profile-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.profile-tab-btn:hover {
  color: var(--text-primary);
}

.profile-tab-btn.active {
  color: var(--accent-light);
}

.profile-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-light);
}

.profile-sub-panels {
  min-height: 250px;
}

.profile-sub-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.profile-sub-panel.active {
  display: block;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.profile-info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.profile-info-card h3 {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 14px;
}

.info-label {
  color: var(--text-secondary);
}

.info-val {
  font-weight: 600;
}

/* Sub Panel: Certificates */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}

.cert-badge-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--warning-color) 0%, rgba(245, 158, 11, 0.2) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.cert-badge-icon i {
  color: #fff;
  width: 32px;
  height: 32px;
}

.cert-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cert-issue {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Sub Panel: Reviews */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
}

.review-course-name {
  font-size: 15px;
  font-weight: 700;
}

.rating-stars {
  color: var(--warning-color);
  margin: 6px 0;
  display: flex;
  gap: 2px;
}

.rating-stars i {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.review-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 6px;
}

/* Sub Panel: Billing table styling */
.billing-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.current-plan-card {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  position: relative;
}

.plan-badge {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
}

.plan-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.05em;
}

.plan-title {
  font-size: 24px;
  font-weight: 800;
  margin: 8px 0;
}

.plan-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 20px 0;
}

.plan-meta {
  display: flex;
  justify-content: space-between;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.meta-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

.payment-methods-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.payment-method-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
}

.pm-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-light);
}

.pm-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pm-name {
  font-size: 14px;
  font-weight: 700;
}

.pm-expiry {
  font-size: 11px;
  color: var(--text-muted);
}

.pm-badge {
  background: var(--bg-tertiary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
}

.invoice-history h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.invoice-table th, .invoice-table td {
  padding: 14px 18px;
  font-size: 14px;
}

.invoice-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border);
}

.invoice-table td {
  border-bottom: 1px solid var(--card-border);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

/* Sub Panel: Settings form styling */
.settings-form {
  max-width: 640px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-section-header {
  margin: 30px 0 20px 0;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

/* ==========================================================================
   MODAL WINDOWS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  width: 500px;
  max-width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.show .modal-card {
  transform: translateY(0);
}

.modal-large {
  width: 740px;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Radio tab group inside note modal */
.radio-tab-group {
  display: flex;
  gap: 12px;
}

.radio-tab {
  flex: 1;
  border: 1px solid var(--card-border);
  background: var(--bg-primary);
  padding: 12px;
  border-radius: var(--border-radius-md);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.radio-tab:hover {
  border-color: var(--text-muted);
}

.radio-tab.active {
  border-color: var(--accent-color);
  background: var(--accent-glow);
  color: #fff;
}

.timestamp-input-wrapper {
  position: relative;
}

/* ==========================================================================
   CERTIFICATE VISUAL TEMPLATE
   ========================================================================== */
.cert-modal-body {
  padding: 30px;
}

.certificate-paper {
  background: #f8fafc;
  color: #0f172a;
  padding: 40px;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-family: 'Georgia', serif;
  text-align: center;
  position: relative;
}

.cert-border {
  border: 12px double #cbd5e1;
  padding: 40px 30px;
  position: relative;
}

.cert-border::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid #94a3b8;
}

.cert-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.cert-logo-icon {
  width: 32px;
  height: 32px;
  color: #6366f1;
}

.cert-logo-text {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cert-subtitle {
  font-family: var(--font-family);
  font-size: 13px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: #475569;
  margin-bottom: 24px;
}

.cert-presentation {
  font-style: italic;
  font-size: 16px;
  color: #64748b;
  margin-bottom: 12px;
}

.cert-recipient {
  font-size: 36px;
  font-weight: 400;
  color: #1e293b;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  display: inline-block;
  padding-bottom: 6px;
  min-width: 300px;
}

.cert-statement {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
}

.cert-course-name {
  font-size: 24px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 30px;
  font-family: var(--font-family);
}

.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 40px;
  padding: 0 20px;
}

.cert-sign {
  text-align: center;
}

.signature {
  font-family: 'Caveat', 'Brush Script MT', cursive, serif;
  font-size: 26px;
  color: #0f172a;
  margin-bottom: 2px;
}

.sign-line {
  width: 160px;
  height: 1px;
  background: #cbd5e1;
  margin: 6px auto;
}

.cert-sign p {
  font-family: var(--font-family);
  font-size: 11px;
  color: #64748b;
}

.cert-info-block {
  text-align: right;
  font-family: var(--font-family);
  font-size: 11px;
  color: #64748b;
  line-height: 1.8;
}

/* ==========================================================================
   TOAST NOTIFICATION ENGINE
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-color);
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  color: var(--text-primary);
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast.success {
  border-left-color: var(--success-color);
}

.toast.info {
  border-left-color: var(--accent-color);
}

.toast.danger {
  border-left-color: var(--danger-color);
}

.toast-message {
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   UTILITIES & HELPER CLASSES
   ========================================================================== */
.hidden {
  display: none !important;
}

.margin-bottom-sm {
  margin-bottom: 12px;
}

.text-accent {
  color: var(--accent-light) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 80px;
  }
  .sidebar-menu span, .logo-text, .sidebar-footer span {
    display: none;
  }
  .sidebar {
    padding: 20px 10px;
    align-items: center;
  }
  .menu-item {
    justify-content: center;
    padding: 12px;
  }
  .menu-item.active::before {
    display: none;
  }
  .discussions-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .discussions-sidebar {
    border-right: none;
    padding-right: 0;
    margin-bottom: 30px;
  }
  .billing-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 20px;
  }
  .content-container {
    padding: 24px 20px;
  }
  .topbar-left {
    display: none; /* Hide welcome greeting on mobile for clean space */
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .courses-header {
    flex-direction: column;
    align-items: stretch;
  }
  .search-bar {
    width: 100%;
  }
  .continue-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .progress-container-small {
    width: 100%;
  }
}

/* ==========================================================================
   LIGHT & DARK THEMES OVERRIDES
   ========================================================================== */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.45);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-glow: rgba(99, 102, 241, 0.08);
  --secondary-glow: rgba(168, 85, 247, 0.08);
  --success-glow: rgba(16, 185, 129, 0.08);
  --header-bg: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   GAMIFICATION HUD STYLES
   ========================================================================== */
.gamification-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  margin-right: 20px;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.hud-item i {
  width: 13px;
  height: 13px;
  color: var(--warning-color);
}

.hud-item.level {
  color: var(--accent-light);
  border-color: rgba(99, 102, 241, 0.2);
  background: var(--accent-glow);
}

.hud-item.streak {
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.05);
  color: var(--danger-color);
}

.hud-label {
  font-size: 9px;
  background: var(--bg-tertiary);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--text-secondary);
}

/* ==========================================================================
   GAMIFICATION DASHBOARD ROW
   ========================================================================== */
.gamification-dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.level-progress-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.level-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.level-badge-large {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.progress-bar-bg.large {
  height: 12px;
  border-radius: 6px;
}

.progress-bar-bg.large .progress-bar-fill {
  border-radius: 6px;
}

.level-progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.points-badge, .region-badge {
  background: var(--bg-tertiary);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
}

.missions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  padding: 12px 18px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.mission-item.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.03);
}

.mission-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.mission-item.completed .mission-checkbox {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
}

.mission-checkbox i {
  width: 10px;
  height: 10px;
}

.mission-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.mission-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.mission-item.completed .mission-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.mission-xp-gp {
  font-size: 11px;
  font-weight: 700;
  color: var(--warning-color);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}

.leaderboard-item.me {
  border-color: var(--accent-color);
  background: var(--accent-glow);
}

.rank-number {
  width: 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.leaderboard-item:nth-child(1) .rank-number { color: #ffd700; }
.leaderboard-item:nth-child(2) .rank-number { color: #c0c0c0; }
.leaderboard-item:nth-child(3) .rank-number { color: #cd7f32; }

.leaderboard-name {
  font-size: 13px;
  font-weight: 700;
  flex-grow: 1;
}

.leaderboard-xp {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
}

/* ==========================================================================
   AI MASCOT CHATBOT FLOATING WIDGET
   ========================================================================== */
.ai-mascot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.mascot-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transition: var(--transition-smooth);
  position: relative;
}

.mascot-toggle-btn:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.6);
}

.mascot-avatar i {
  width: 28px;
  height: 28px;
  animation: bounceSlow 3s infinite ease-in-out;
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-light);
  animation: pulseRing 2s infinite ease-out;
  pointer-events: none;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.ai-chat-window {
  width: 350px;
  height: 500px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.ai-chat-window.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.mascot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mascot-header-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mascot-header-avatar i {
  width: 18px;
  height: 18px;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success-color);
  border: 2px solid var(--bg-secondary);
}

.mascot-header-info h3 {
  font-size: 13px;
  font-weight: 700;
}

.mascot-header-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-messages {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.chat-bubble.ai {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-bubble.user {
  background: var(--accent-color);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.chat-bubble.ai strong {
  color: var(--accent-light);
}

.chat-suggestions {
  padding: 10px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid var(--card-border);
  background: rgba(0,0,0,0.1);
  white-space: nowrap;
}

.chat-suggestions::-webkit-scrollbar {
  height: 3px;
}

.suggest-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.suggest-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--card-border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input-area input {
  flex-grow: 1;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 20px;
}

.mic-btn, .send-message-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.mic-btn:hover, .send-message-btn:hover {
  background: var(--accent-color);
  color: #fff;
  transform: scale(1.05);
}

.mic-btn i, .send-message-btn i {
  width: 14px;
  height: 14px;
}

/* Voice Simulation Overlay */
.voice-simulator-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 13, 22, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: fadeIn 0.2s ease-out;
}

.voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  margin-bottom: 16px;
}

.voice-wave span {
  display: block;
  width: 3px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 1.5px;
  animation: soundwave 1.2s infinite ease-in-out;
}

.voice-wave span:nth-child(2) { animation-delay: 0.15s; }
.voice-wave span:nth-child(3) { animation-delay: 0.3s; }
.voice-wave span:nth-child(4) { animation-delay: 0.45s; }
.voice-wave span:nth-child(5) { animation-delay: 0.6s; }

@keyframes soundwave {
  0%, 100% { height: 8px; }
  50% { height: 36px; background: var(--secondary-color); }
}

@media (max-width: 1024px) {
  .gamification-hud {
    display: none;
  }
}

@media (max-width: 768px) {
  .gamification-dashboard-row {
    grid-template-columns: 1fr;
  }
  .ai-mascot-widget {
    bottom: 16px;
    right: 16px;
  }
  .ai-chat-window {
    width: calc(100vw - 32px);
    right: 0;
  }
}


/* ==========================================================================
   BADGE SYSTEM
   ========================================================================== */

/* Badge summary bar */
.badges-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 18px 24px;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
}

.badges-summary-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.badges-earned-count {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-color), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.badges-total-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.badges-progress-wrap {
  flex: 1;
  max-width: 360px;
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 99px;
  overflow: hidden;
}

.badges-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), #a855f7);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badges grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* Badge card */
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 20px 20px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.badge-card.earned {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

.badge-card.earned:hover {
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

.badge-card.locked {
  opacity: 0.55;
  filter: grayscale(60%);
}

.badge-card.locked:hover {
  opacity: 0.75;
  filter: grayscale(30%);
  transform: translateY(-2px);
}

/* Emoji wrapper */
.badge-emoji-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-emoji {
  font-size: 2.8rem;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.badge-lock-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.1rem;
  z-index: 3;
}

.badge-earned-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  animation: badgeGlowPulse 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes badgeGlowPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Badge info */
.badge-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.badge-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.badge-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.badge-earned-date {
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 600;
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 99px;
  margin-top: 4px;
}

.badge-locked-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Badge share button */
.badge-actions {
  width: 100%;
  margin-top: 4px;
}

.badge-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(99,102,241,0.35);
  background: var(--accent-glow);
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-family);
}

.badge-share-btn svg {
  width: 14px;
  height: 14px;
}

.badge-share-btn:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

/* Badge Unlock Modal Overlay */
.badge-unlock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.badge-unlock-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(99,102,241,0.5);
  border-radius: var(--border-radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 60px rgba(99,102,241,0.25);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.badge-unlock-sparkles {
  font-size: 1.5rem;
  letter-spacing: 8px;
  margin-bottom: 16px;
  animation: sparkle 1s ease infinite alternate;
}

@keyframes sparkle {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.badge-unlock-emoji {
  font-size: 5rem;
  margin-bottom: 20px;
  display: block;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes bounceIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.badge-unlock-title {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-unlock-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.badge-unlock-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.badge-unlock-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ==========================================================================
   GP STORE
   ========================================================================== */

/* GP Store page header */
.gpstore-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.gpstore-header-left {
  flex: 1;
}

/* GP Balance card */
.gpstore-balance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(168,85,247,0.12) 100%);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: var(--border-radius-md);
  padding: 20px 28px;
  min-width: 220px;
  box-shadow: 0 0 30px rgba(99,102,241,0.1);
}

.gpstore-balance-icon {
  font-size: 2.2rem;
  color: var(--accent-light);
  font-weight: 800;
  line-height: 1;
}

.gpstore-balance-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gpstore-balance-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.gpstore-balance-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gpstore-balance-unit {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Conversion Banner */
.gpstore-conversion-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 16px 24px;
  margin-bottom: 28px;
  overflow-x: auto;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

.conversion-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.conv-cost {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-light);
}

.conv-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.conversion-sep {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Category Filter Tabs */
.gpstore-filter-row {
  margin-bottom: 24px;
}

.gpstore-category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gpstore-cat-tab {
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-family);
  white-space: nowrap;
}

.gpstore-cat-tab:hover {
  border-color: var(--accent-color);
  color: var(--accent-light);
}

.gpstore-cat-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

/* Store Items Grid */
.store-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* Store Item Card */
.store-item-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.store-item-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(99,102,241,0.04));
  opacity: 0;
  transition: var(--transition-smooth);
}

.store-item-card:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 8px 30px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}

.store-item-card:hover::before {
  opacity: 1;
}

.store-item-card.unaffordable {
  opacity: 0.65;
}

.store-item-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.store-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-item-category-chip {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 99px;
  align-self: flex-start;
}

.store-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.store-item-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.store-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.store-item-cost {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.gp-icon-sm {
  color: #a855f7;
  font-weight: 900;
}

.store-item-stock-warn {
  font-size: 0.72rem;
  color: var(--warning-color);
  font-weight: 600;
  background: rgba(245,158,11,0.1);
  padding: 3px 8px;
  border-radius: 99px;
}

.store-item-actions {
  margin-top: 8px;
}

.redeem-btn {
  width: 100%;
  padding: 11px;
  font-size: 0.875rem;
}

.disabled-btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Redemption History */
.gpstore-history-wrap {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.redemption-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.redemption-table thead tr {
  background: var(--bg-tertiary);
}

.redemption-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.redemption-table td {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  color: var(--text-primary);
  vertical-align: middle;
}

.redemption-table tr:hover td {
  background: rgba(99,102,241,0.04);
}

.redemption-item-name {
  font-weight: 600;
}

.redemption-cost {
  color: #a855f7;
  font-weight: 700;
}

.redemption-date {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* Status badge info variant */
.status-badge.info {
  background: rgba(99,102,241,0.15);
  color: var(--accent-light);
}

/* Light theme overrides for badge and store */
.light-theme .badge-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .badge-card.earned {
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 0 20px rgba(99,102,241,0.06);
}

.light-theme .badges-summary-bar,
.light-theme .gpstore-balance-card,
.light-theme .gpstore-conversion-banner,
.light-theme .store-item-card,
.light-theme .gpstore-history-wrap {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .badge-unlock-card {
  background: #ffffff;
  border-color: rgba(99,102,241,0.4);
}

.light-theme .redemption-table thead tr {
  background: rgba(0,0,0,0.04);
}

.light-theme .redemption-table td {
  border-top-color: rgba(0,0,0,0.06);
}

/* Responsive badge grid */
@media (max-width: 768px) {
  .badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .store-items-grid {
    grid-template-columns: 1fr;
  }

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

  .gpstore-balance-card {
    width: 100%;
  }

  .gpstore-conversion-banner {
    gap: 16px;
  }

  .badges-progress-wrap {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .badges-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   QUIZZES & EXAMS STYLES
   ========================================================================== */

.quizzes-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.quiz-setup-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}

.quiz-setup-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.quiz-difficulty-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-glow);
  color: var(--accent-light);
  align-self: flex-start;
}

.quiz-time-limit {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.quiz-rewards-row {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.quiz-rewards-row strong {
  color: var(--accent-light);
}

.quiz-active-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
}

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

.quiz-active-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.quiz-questions-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 32px;
}

.quiz-question-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-light);
}

.question-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
}

.question-answer-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* Choices Buttons */
.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
  font-family: var(--font-family);
  color: var(--text-primary);
  outline: none;
}

.quiz-option-btn:hover {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.05);
}

.quiz-option-btn.selected {
  border-color: var(--accent-color);
  background: var(--accent-glow);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.1);
}

.option-bullet {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.quiz-option-btn.selected .option-bullet {
  background: var(--accent-color);
  color: #fff;
}

/* Fill Input */
.quiz-fill-input {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-family);
  outline: none;
  transition: var(--transition-smooth);
  max-width: 320px;
}

.quiz-fill-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
}

/* Speaking Exam Wrapper */
.quiz-speaking-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-audio-cue {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quiz-record-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.quiz-record-btn svg {
  width: 20px;
  height: 20px;
}

.quiz-record-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent-color);
  background: var(--accent-glow);
}

.quiz-record-btn.recording {
  background: var(--danger-color);
  border-color: var(--danger-color);
  color: #fff;
  animation: quizRecPulse 1.5s infinite alternate;
}

@keyframes quizRecPulse {
  from { box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); }
  to { box-shadow: 0 0 20px rgba(244, 63, 94, 0.8); }
}

.quiz-record-btn.recorded {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.quiz-record-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Simulated Audio Wave */
.quiz-audio-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.quiz-audio-wave.hidden {
  display: none;
}

.quiz-audio-wave .bar {
  width: 3px;
  height: 8px;
  background: var(--danger-color);
  border-radius: 99px;
}

.quiz-audio-wave.pulsing .bar {
  animation: quizWavePulse 0.8s ease-in-out infinite alternate;
}

.quiz-audio-wave.pulsing .bar:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.quiz-audio-wave.pulsing .bar:nth-child(2) { animation-delay: 0.3s; height: 18px; }
.quiz-audio-wave.pulsing .bar:nth-child(3) { animation-delay: 0.5s; height: 10px; }
.quiz-audio-wave.pulsing .bar:nth-child(4) { animation-delay: 0.2s; height: 15px; }
.quiz-audio-wave.pulsing .bar:nth-child(5) { animation-delay: 0.4s; height: 8px; }

@keyframes quizWavePulse {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

/* Speaking Result Box */
.quiz-speaking-result-box {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  border-left: 4px solid var(--success-color);
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.speaking-metric {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 800;
}

.speaking-feedback {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

/* Light Theme Overrides for Quizzes */
.light-theme .quiz-setup-card,
.light-theme .quiz-active-container {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .quiz-question-item {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .quiz-option-btn,
.light-theme .quiz-fill-input,
.light-theme .quiz-speaking-result-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .quiz-option-btn:hover,
.light-theme .quiz-option-btn.selected {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.05);
}


/* ==========================================================================
   ZEN MODE FULLSCREEN EXAMS & NAVIGATOR STYLES
   ========================================================================== */

body.exam-zen-mode .sidebar {
  display: none !important;
}
body.exam-zen-mode .topbar {
  display: none !important;
}
body.exam-zen-mode .main-content {
  margin-left: 0 !important;
  padding: 32px !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.exam-zen-mode .quiz-active-container {
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.light-theme.exam-zen-mode .quiz-active-container {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

/* Navigator Circle Button Hover States */
.nav-circle-btn:hover {
  border-color: var(--accent-color) !important;
  color: var(--accent-light) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.nav-circle-btn.completed {
  border-color: var(--success-color) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: var(--success-color) !important;
}
.nav-circle-btn.completed:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Hint Button & Clues */
.quiz-hint-btn {
  background: none;
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-light);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quiz-hint-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-color);
  color: #fff;
}

.quiz-revealed-hint-box {
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.light-theme .quiz-navigator-panel {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.light-theme .quiz-revealed-hint-box {
  background: rgba(99, 102, 241, 0.04) !important;
}


