/* ========================================
   MODERN DASHBOARD STYLES - SHOWCASE QUALITY
   Glassmorphism, Neon Accents, Smooth Animations
======================================== */

/* Reset & Base Overrides */
.dashboard-body {
  overflow-x: hidden;
}

.dashboard-main {
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.05), transparent 40%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 40%),
    var(--bg-primary);
  min-height: 100vh;
  padding-top: var(--header-h);
}

.dashboard-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

/* ========================================
   SIDEBAR NAV
======================================== */
.dashboard-sidebar {
  background: rgba(17, 24, 39, 0.6);
  /* Semi-transparent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  z-index: 10;
}

.user-profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 1rem;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  transition: transform 0.3s ease;
}

.avatar-container:hover img {
  transform: scale(1.05);
}

.status-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background-color: #10b981;
  border: 3px solid var(--bg-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.user-profile-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.user-rank {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}

.rank-icon {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

/* Sidebar Links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  transition: transform 0.3s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), transparent);
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  border-radius: 0 4px 4px 0;
}

.nav-item:hover svg,
.nav-item.active svg {
  transform: scale(1.1);
  stroke: var(--accent-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-btn {
  width: 100%;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

/* ========================================
   MAIN CONTENT
======================================== */
.dashboard-content {
  padding: 2.5rem 3rem;
  overflow-y: auto;
  position: relative;
}

/* Tab System Transition */
.dashboard-tab {
  display: none;
  /* Hidden by default */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.dashboard-tab.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.content-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.wave {
  display: inline-block;
  animation: wave 2.5s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0% {
    transform: rotate(0.0deg)
  }

  10% {
    transform: rotate(14.0deg)
  }

  20% {
    transform: rotate(-8.0deg)
  }

  30% {
    transform: rotate(14.0deg)
  }

  40% {
    transform: rotate(-4.0deg)
  }

  50% {
    transform: rotate(10.0deg)
  }

  60% {
    transform: rotate(0.0deg)
  }

  100% {
    transform: rotate(0.0deg)
  }
}

.header-actions .btn-primary {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glow-effect {
  position: relative;
  overflow: hidden;
}

.glow-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.5s, transform 0.5s;
}

.glow-effect:hover::after {
  opacity: 1;
  transform: scale(1);
  transition: 0s;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(30, 41, 59, 0.4);
  /* Glass dark */
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 1.25rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover Glow */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.stat-icon.primary {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.stat-icon.info {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Layout Grid for Widgets */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.widget-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Universal Dashboard Card */
.dashboard-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-filter {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* Lists */
.list-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  gap: 1.25rem;
  transition: background 0.2s;
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.list-item:last-child {
  border-bottom: none;
}

.item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-icon.win {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.item-icon.loss {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.item-icon.draw {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.item-details h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.item-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.item-meta {
  margin-left: auto;
  text-align: right;
}

.badg {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.2rem;
}

.badg.success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.badg.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.badg.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.badg.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

/* Puzzle Card */
.puzzle-preview {
  padding: 2rem;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: opacity 0.3s;
}

.puzzle-preview:hover {
  opacity: 0.9;
}

.board-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.board-placeholder svg {
  color: var(--text-muted);
}

.card-footer {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* Schedule Widget */
.schedule-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.date-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.5rem 0.8rem;
  text-align: center;
  min-width: 60px;
}

.date-box .day {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.date-box .month {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.schedule-details h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.schedule-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-icon {
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
  padding: 0;
}

.btn-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Course Cards */
.course-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.course-card .course-image-placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.gradient-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.gradient-2 {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.course-card .card-body {
  padding: 1.5rem;
}

.progress-container {
  margin: 1rem 0;
}

.progress-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.add-course {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  transition: all 0.3s;
}

.add-course:hover {
  border-color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.05);
}

.btn-clean {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
}

.plus-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent-primary);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 80px 1fr;
    /* Collapsed Sidebar */
  }

  .dashboard-sidebar {
    padding: 1.5rem 0.5rem;
    align-items: center;
  }

  .user-profile-summary h3,
  .user-profile-summary .user-rank,
  .nav-item {
    display: none;
    /* Hide text, show icons only? Or simple collapse */
  }

  /* Better approach: keep text hidden but icons centered */
  .nav-item {
    justify-content: center;
    padding: 1rem;
    font-size: 0;
  }

  .nav-item svg {
    margin: 0;
  }

  .user-profile-summary {
    margin-bottom: 2rem;
    border-bottom: none;
  }

  .avatar-container {
    width: 50px;
    height: 50px;
    margin: 0;
  }

  .logout-btn {
    font-size: 0;
    padding: 1rem;
  }

  /* Tooltips for sidebar items could be added here */
}

@media (max-width: 768px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    display: block;
  }

  .dashboard-sidebar {
    display: none;
    /* Hide sidebar on mobile, assume mobile menu handles navigation or convert to bottom nav */
  }

  /* Alternatively, turn sidebar into a horizontal scrollable strip on top? */

  .dashboard-widgets-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-content {
    padding: 1.5rem;
  }

  .content-header h1 {
    font-size: 1.75rem;
  }

  /* Mobile Tab Nav (if sidebar is hidden) */
  /* We might need to rely on the main Header Mobile Menu for page navigation, 
     but for switching TABS within dashboard, we need a solution. 
     Let's style the sidebarNav as a horizontal scroll menu on mobile.
  */
  .dashboard-sidebar {
    display: flex;
    flex-direction: row;
    position: relative;
    top: 0;
    height: auto;
    width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .user-profile-summary {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
  }

  .nav-item {
    display: flex;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    justify-content: flex-start;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-item.active {
    background: var(--accent-primary);
    color: white;
  }

  .nav-item.active svg {
    transform: none;
    stroke: white;
  }

  .nav-item.active::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .notification-dropdown {
    right: -3rem;
    width: calc(100vw - 2rem);
    max-width: 380px;
  }
}

/* ========================================
   NOTIFICATION BELL + DROPDOWN
   ======================================== */
.notification-wrapper {
  position: relative;
  display: inline-flex;
}

.notification-bell {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.6rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-bell:hover {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-primary);
  border-color: rgba(245, 158, 11, 0.3);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  overflow: hidden;
}

.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-dropdown-header h4 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.mark-read-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.mark-read-btn:hover {
  background: rgba(245, 158, 11, 0.1);
}

.notification-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
  background: rgba(245, 158, 11, 0.05);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.notification-item {
  position: relative;
}

.notification-item.unread {
  padding-left: 1.5rem;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-primary);
  font-size: 0.85rem;
}

.notification-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.notification-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-content small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.notification-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.notification-empty i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* ========================================
   LEADERBOARD
   ======================================== */
.leaderboard-list {
  padding: 0;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-item.top-3 {
  background: rgba(245, 158, 11, 0.02);
}

.leaderboard-rank {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--text-muted);
}

.leaderboard-item.top-3 .leaderboard-rank {
  font-size: 1.3rem;
}

.leaderboard-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.leaderboard-rating {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

/* ========================================
   STREAK CALENDAR
   ======================================== */
.streak-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.streak-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 1rem 1.25rem 1.25rem;
}

.streak-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  transition: all 0.2s;
}

.streak-day.active {
  background: rgba(245, 158, 11, 0.25);
  color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.streak-day.today {
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 800;
}

.streak-day.active.today {
  background: var(--accent-primary);
  color: #111827;
}

/* ========================================
   ANALYTICS PROGRESS BARS
   ======================================== */
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Analytics stats overrides */
#analyticsContent .stats-grid {
  margin-bottom: 2rem;
}

#analyticsContent .stat-card .stat-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

#analyticsContent .stat-card .stat-icon.primary {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

#analyticsContent .stat-card .stat-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

#analyticsContent .chart-filter {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}