/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
  /* Background */
  --bg-primary: #050510;
  --bg-secondary: #0a0a1a;
  --bg-card: rgba(15, 15, 30, 0.85);
  --bg-card-solid: #0f0f1e;
  
  /* Brand Colors */
  --primary: #00ff9d;
  --primary-dark: #00cc7d;
  --primary-glow: rgba(0, 255, 157, 0.4);
  --secondary: #00d4ff;
  --accent: #ff00ff;
  
  /* Task Types */
  --school: #ff0055;
  --study: #3b82f6;
  --class-color: #d946ef;
  --rest: #f97316;
  
  /* Status */
  --done: #10b981;
  --warning: #fdcb6e;
  --error: #ef4444;
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 255, 157, 0.3);
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Glass Effect */
  --glass-strong: rgba(15, 15, 30, 0.95);
  
  /* Typography */
  --font-tech: 'Orbitron', monospace;
  --font-main: 'Vazirmatn', sans-serif;
  
  /* Border Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 50px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px var(--primary-glow);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Layout */
  --header-height: 56px;
  --nav-height: 70px;
  --safe-area-bottom: env(safe-area-inset-bottom, 10px);
}

/* ==================== RESET ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== BASE STYLES ==================== */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at 30% 20%, rgba(0, 255, 157, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 0, 255, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== BACKGROUND EFFECTS ==================== */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: orbFloat 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  background: var(--primary);
  top: -10%;
  left: -10%;
}

.orb-2 {
  width: 35vw;
  height: 35vw;
  max-width: 400px;
  max-height: 400px;
  background: var(--secondary);
  bottom: -10%;
  right: -10%;
  animation-delay: 7s;
  animation-duration: 25s;
}

.orb-3 {
  width: 25vw;
  height: 25vw;
  max-width: 300px;
  max-height: 300px;
  background: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
  animation-duration: 30s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.9);
  }
  100% {
    transform: translate(20px, -20px) scale(1.05);
  }
}

/* Particles */
.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  animation: particleRise linear infinite;
  opacity: 0;
}

@keyframes particleRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-100vh) scale(0);
    opacity: 0;
  }
}

/* ==================== LOADING OVERLAY ==================== */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 16, 0.98);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

#loadingOverlay.active {
  display: flex;
}

.loader-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 30px var(--primary-glow);
}

.loader-text {
  margin-top: 24px;
  font-family: var(--font-tech);
  color: var(--primary);
  font-size: 0.9rem;
  letter-spacing: 3px;
  animation: pulse 2s infinite;
}

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

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

/* ==================== MAIN APPLICATION ==================== */
#appWrapper {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  padding: 12px 12px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#appWrapper.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== HEADER ==================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px 6px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.user-chip:active {
  transform: scale(0.97);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #000;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.user-plan {
  font-size: 0.6rem;
  color: var(--warning);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hud-stats {
  display: flex;
  gap: 6px;
}

.hud-badge {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-smooth);
}

.hud-badge:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
  background: var(--bg-card);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  min-height: 0;
}

/* ==================== CALENDAR NAVIGATION ==================== */
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cal-title {
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.today-btn {
  display: inline-block;
  margin-top: 2px;
  padding: 4px 12px;
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: var(--font-main);
}

.today-btn:hover {
  background: rgba(0, 255, 157, 0.2);
  box-shadow: var(--shadow-glow);
}

.today-btn:active {
  transform: scale(0.95);
}

.nav-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
}

.nav-icon-btn:active {
  background: var(--primary);
  color: #000;
  transform: scale(0.9);
  box-shadow: var(--shadow-glow);
}

/* ==================== WEEKDAYS ==================== */
.weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
}

.weekdays-row .friday {
  color: var(--school);
}

/* ==================== DAYS GRID ==================== */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.days-grid::-webkit-scrollbar {
  width: 3px;
}

.days-grid::-webkit-scrollbar-track {
  background: transparent;
}

.days-grid::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

.day-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 5px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 65px;
  position: relative;
  overflow: hidden;
}

.day-cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.015));
  pointer-events: none;
}

.day-cell:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.day-cell:active {
  transform: scale(0.94);
}

.day-cell.today {
  border-color: var(--primary);
  background: rgba(0, 255, 157, 0.06);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.15);
}

.day-cell.exam-day {
  border-color: var(--secondary);
  background: rgba(0, 212, 255, 0.06);
  animation: examPulse 2.5s infinite alternate;
}

@keyframes examPulse {
  from {
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.2);
  }
  to {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
  }
}

.day-cell.empty {
  pointer-events: none;
  opacity: 0.15;
}

.day-num {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--text-muted);
}

.today .day-num {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.exam-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 0.5rem;
  color: var(--secondary);
  background: rgba(0, 0, 0, 0.8);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mini-dot.study {
  background: var(--study);
}

.mini-dot.school {
  background: var(--school);
}

.mini-dot.class {
  background: var(--class-color);
}

.mini-dot.rest {
  background: var(--rest);
}

.mini-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.6s var(--transition-smooth);
}

/* ==================== LEGEND ==================== */
.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 0;
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.study {
  background: var(--study);
}

.legend-dot.school {
  background: var(--school);
}

.legend-dot.class {
  background: var(--class-color);
}

.legend-dot.rest {
  background: var(--rest);
}

/* ==================== BOTTOM NAVIGATION - MENISCUS STYLE ==================== */

.tab-bar-wrapper {
  position: relative;
  width: 100%;
  height: 100px;
  margin-top: 4px;
  margin-bottom: 25px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
}

.track-and-neon {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 58px;
}

/* نوار تیره با سوراخ */
.bar-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f0f1e;
  border-radius: 29px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.04);

  -webkit-mask-image: radial-gradient(
    circle 42px at var(--hole-x, 12%) var(--hole-y, 8%),
    transparent 36px,
    rgba(0, 0, 0, 0.15) 39px,
    rgba(0, 0, 0, 0.4) 42px,
    rgba(0, 0, 0, 0.7) 45px,
    black 48px
  );
  mask-image: radial-gradient(
    circle 42px at var(--hole-x, 12%) var(--hole-y, 8%),
    transparent 36px,
    rgba(0, 0, 0, 0.15) 39px,
    rgba(0, 0, 0, 0.4) 42px,
    rgba(0, 0, 0, 0.7) 45px,
    black 48px
  );
}

/* دایره نئونی */
.neon-circle {
  position: absolute;
  width: 66px;
  height: 66px;
  background: radial-gradient(circle, #00ff9d 0%, #00cc7d 40%, #009966 100%);
  border-radius: 50%;
  z-index: 0;
  box-shadow: 
    0 0 25px rgba(0, 255, 157, 0.9),
    0 0 50px rgba(0, 255, 157, 0.6),
    0 0 80px rgba(0, 200, 130, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.neon-circle.active {
  opacity: 1;
}

/* کانتینر تب‌ها */
.tabs-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 30px;
  z-index: 10;
}

/* تب‌ها */
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5a5a7a;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  user-select: none;
  position: relative;
  z-index: 10;
  padding-bottom: 6px;
  min-width: 65px;
  text-align: center;
  background: none;
  border: none;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

.tab i {
  font-size: 1.3rem;
  margin-bottom: 5px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  position: relative;
  z-index: 10;
}

.tab span {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  font-family: 'Vazirmatn', sans-serif;
  white-space: nowrap;
}

/* تب فعال */
.tab.active {
  color: #ffffff;
  transform: translateY(-24px);
}

.tab.active i {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 12px rgba(0, 255, 157, 0.9));
}

.tab.active span {
  opacity: 1;
  transform: translateY(0);
  color: #ffffff;
}

/* Hover */
.tab:not(.active):hover {
  color: #7a7a9a;
}

.tab:not(.active):active {
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 380px) {
  .tab-bar-wrapper {
    height: 105px;
  }
  
  .track-and-neon {
    height: 50px;
  }
  
  .tabs-container {
    height: 50px;
    padding: 0 16px;
  }
  
  .bar-track {
    border-radius: 25px;
    -webkit-mask-image: radial-gradient(
      circle 35px at var(--hole-x, 12%) var(--hole-y, 8%),
      transparent 28px,
      rgba(0, 0, 0, 0.15) 31px,
      rgba(0, 0, 0, 0.4) 34px,
      rgba(0, 0, 0, 0.7) 37px,
      black 40px
    );
    mask-image: radial-gradient(
      circle 35px at var(--hole-x, 12%) var(--hole-y, 8%),
      transparent 28px,
      rgba(0, 0, 0, 0.15) 31px,
      rgba(0, 0, 0, 0.4) 34px,
      rgba(0, 0, 0, 0.7) 37px,
      black 40px
    );
  }
  
  .neon-circle {
    width: 54px;
    height: 54px;
  }
  
  .tab i {
    font-size: 1.1rem;
  }
  
  .tab.active i {
    font-size: 1.3rem;
  }
  
  .tab.active {
    transform: translateY(-20px);
  }
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
  display: flex;
}

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

.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  width: 93%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--transition-bounce);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content::-webkit-scrollbar {
  width: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 900;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--error);
  transform: rotate(90deg);
}

/* ==================== FORM ELEMENTS ==================== */
.input-group {
  position: relative;
  margin-bottom: 12px;
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.field-input,
.field-select {
  width: 100%;
  padding: 12px 14px;
  padding-right: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: all var(--transition-fast);
  outline: none;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus,
.field-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.field-select {
  padding-right: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
}

.field-select option {
  background: var(--bg-card-solid);
  color: var(--text-primary);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-main);
  transition: all var(--transition-smooth);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-lg {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* ==================== TASK LIST ==================== */
.add-task-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border-right: 4px solid #555;
  transition: all var(--transition-fast);
  animation: fadeIn 0.3s ease;
}

.task-item.study {
  border-right-color: var(--study);
}

.task-item.school {
  border-right-color: var(--school);
  background: rgba(255, 0, 85, 0.04);
}

.task-item.class {
  border-right-color: var(--class-color);
}

.task-item.rest {
  border-right-color: var(--rest);
}

.task-item.done {
  opacity: 0.5;
}

.task-check {
  width: 22px;
  height: 22px;
  border: 2px solid #555;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.task-check:hover {
  border-color: var(--primary);
}

.task-item.done .task-check {
  background: var(--done);
  border-color: var(--done);
  animation: checkPop 0.3s var(--transition-bounce);
}

@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.task-item.done .task-check::after {
  content: '✓';
  color: #000;
  font-weight: 900;
  font-size: 12px;
}

.task-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.task-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-item.done .task-name {
  text-decoration: line-through;
}

.task-time {
  font-size: 0.7rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-del {
  color: #555;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.task-del:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* ==================== PLANNER MODAL ==================== */
.planner-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--secondary);
}

.planner-options {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ==================== STATS MODAL ==================== */
.stats-period {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.period-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: var(--font-main);
}

.period-btn.active {
  background: var(--primary);
  color: #000;
}

.period-btn:hover:not(.active) {
  color: var(--text-primary);
}

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all var(--transition-smooth);
}

.stat-box:hover {
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.05);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-tech);
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== TOAST ==================== */
.toast-area {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: var(--glass-strong);
  border: 1px solid var(--primary);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  pointer-events: auto;
  animation: toastIn 0.4s var(--transition-bounce);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
  justify-content: center;
}

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

.toast.out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-30px);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 380px) {
  .day-cell {
    min-height: 55px;
    padding: 4px 3px;
  }
  
  .day-num {
    font-size: 0.8rem;
  }
  
  .cal-title {
    font-size: 1.1rem;
  }
  
  .hud-badge {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  
  .stat-num {
    font-size: 1.4rem;
  }
}

@media (min-width: 768px) {
  #appWrapper {
    max-width: 560px;
  }
  
  .day-cell {
    min-height: 75px;
  }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .bg-layer,
  .bottom-nav,
  .app-header,
  .modal-overlay,
  .toast-area {
    display: none !important;
  }
  
  .main-container {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
/* ==================== LOGOUT BUTTON ==================== */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-main);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

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

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

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

.logout-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.logout-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.logout-btn:hover i {
  transform: translateX(-3px) rotate(-90deg);
  animation: doorOpen 0.5s ease;
}

@keyframes doorOpen {
  0% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(-5px) rotate(-45deg); }
  100% { transform: translateX(-3px) rotate(-90deg); }
}

/* نسخه مهمان - رنگ نارنجی */
.logout-btn.guest {
  background: rgba(253, 203, 110, 0.1);
  border-color: rgba(253, 203, 110, 0.3);
  color: #fdcb6e;
}

.logout-btn.guest:hover {
  background: rgba(253, 203, 110, 0.2);
  border-color: rgba(253, 203, 110, 0.6);
  box-shadow: 0 0 20px rgba(253, 203, 110, 0.3);
}

.logout-btn.guest:active {
  box-shadow: 0 0 30px rgba(253, 203, 110, 0.5);
}

/* رسپانسیو */
@media (max-width: 480px) {
  .logout-btn span {
    display: none;
  }
  
  .logout-btn {
    padding: 8px 12px;
    border-radius: 50%;
  }
  
  .logout-btn i {
    margin: 0;
  }
}

/* ==================== دکمه خروج ==================== */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-main);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

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

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

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

.logout-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.logout-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.logout-btn:hover i {
  transform: translateX(-3px) rotate(-90deg);
}

.logout-btn.guest {
  background: rgba(253, 203, 110, 0.1);
  border-color: rgba(253, 203, 110, 0.3);
  color: #fdcb6e;
}

.logout-btn.guest:hover {
  background: rgba(253, 203, 110, 0.2);
  border-color: rgba(253, 203, 110, 0.6);
  box-shadow: 0 0 20px rgba(253, 203, 110, 0.3);
}

.logout-btn.guest:active {
  box-shadow: 0 0 30px rgba(253, 203, 110, 0.5);
}

@media (max-width: 480px) {
  .logout-btn span {
    display: none;
  }
  
  .logout-btn {
    padding: 8px 12px;
    border-radius: 50%;
  }
  
  .logout-btn i {
    margin: 0;
  }
}
/* ==================== PROFILE MODAL ==================== */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 3px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.profile-avatar::after {
  content: '📷';
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--bg-card-solid);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid var(--border-light);
}

.profile-avatar:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-glow);
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.input-label i {
  color: var(--primary);
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* Gender Selector */
.gender-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-btn {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gender-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.gender-btn.active {
  background: rgba(0, 255, 157, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.gender-btn i {
  font-size: 1.2rem;
}

/* Delete Account Button */
.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  margin-top: 8px;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
  transform: scale(0.95);
}

/* ==================== PROFILE REMINDER ==================== */
.reminder-card {
  background: linear-gradient(160deg, #0f0f1e, #1a1a2e);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 32px 24px;
  width: 92%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 255, 157, 0.1);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: none;
}

.reminder-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.reminder-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.reminder-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: reminderIconBounce 2s ease-in-out infinite;
}

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

.reminder-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  line-height: 1.4;
}

.reminder-progress-container {
  margin-bottom: 16px;
}

.reminder-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.reminder-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-progress-text {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-tech);
}

.reminder-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.reminder-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.reminder-buttons .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.reminder-buttons .btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.reminder-buttons .btn-ghost:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 400px) {
  .reminder-card {
    padding: 24px 16px;
  }
  
  .reminder-buttons {
    flex-direction: column;
  }
}

/* ==================== ADVERTISEMENT SYSTEM ==================== */

/* Banner Ad */
.ad-banner-container {
  width: 100%;
  margin: 10px 0;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.ad-banner-container:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(0, 255, 157, 0.15);
}

.ad-banner-image {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.ad-banner-content {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ad-banner-text {
  flex: 1;
}

.ad-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.ad-banner-badge {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.ad-close-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.ad-close-btn:hover {
  background: var(--error);
  transform: scale(1.1);
}

/* Video Ad Modal */
.ad-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
}

.ad-video-modal.active {
  display: flex;
}

.ad-video-content {
  width: 95%;
  max-width: 700px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--transition-bounce);
}

.ad-video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
}

.ad-video-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.ad-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.ad-video-wrapper iframe,
.ad-video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.ad-video-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Image Ad Modal */
.ad-image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ad-image-modal.active {
  display: flex;
}

.ad-image-modal img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--transition-bounce);
}

.ad-image-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ad-image-close:hover {
  background: var(--error);
}

/* Corner Ad */
.ad-corner {
  position: fixed;
  bottom: 90px;
  right: 16px;
  width: 250px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 1500;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.5s var(--transition-bounce);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.ad-corner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.ad-corner img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.ad-corner-content {
  padding: 10px 12px;
}

.ad-corner-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.ad-corner-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Ad Countdown */
.ad-countdown {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--warning);
  background: rgba(253, 203, 110, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-right: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .ad-corner {
    width: 200px;
    bottom: 80px;
    right: 8px;
  }
  
  .ad-corner img {
    height: 100px;
  }
}

/* ==================== STATS DASHBOARD 3.0 - REACT-LIKE ==================== */

/* Stats Modal - Glass Effect */
#statsModal .modal-content {
  max-width: 580px;
  background: linear-gradient(160deg, #060610 0%, #0a0a18 30%, #0d0d20 60%, #08081a 100%);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 20px 16px;
}

/* Period Selector - Floating Pills */
.stats-period-selector {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 40px;
  padding: 4px;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.period-chip {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-main);
  position: relative;
}

.period-chip.active {
  background: linear-gradient(135deg, #00ff9d, #00cc7d);
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 255, 157, 0.4), 0 0 0 1px rgba(0, 255, 157, 0.3);
  transform: scale(1.02);
}

.period-chip:hover:not(.active) {
  color: rgba(255,255,255,0.8);
}

/* KPI Cards Grid */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  opacity: 0.06;
  transition: all 0.6s ease;
}

.kpi-card.streak::before { background: #ff6b6b; }
.kpi-card.done::before { background: #00ff9d; }
.kpi-card.active::before { background: #a29bfe; }
.kpi-card.rate::before { background: #fdcb6e; }

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.kpi-card:hover::before {
  transform: scale(1.5);
  opacity: 0.1;
}

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

.kpi-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.kpi-card.streak .kpi-card-icon { background: rgba(255,107,107,0.15); }
.kpi-card.done .kpi-card-icon { background: rgba(0,255,157,0.15); }
.kpi-card.active .kpi-card-icon { background: rgba(162,155,254,0.15); }
.kpi-card.rate .kpi-card-icon { background: rgba(253,203,110,0.15); }

.kpi-card-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.kpi-card.streak .kpi-card-badge { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.kpi-card.done .kpi-card-badge { background: rgba(0,255,157,0.15); color: #00ff9d; }
.kpi-card.active .kpi-card-badge { background: rgba(162,155,254,0.15); color: #a29bfe; }
.kpi-card.rate .kpi-card-badge { background: rgba(253,203,110,0.15); color: #fdcb6e; }

.kpi-card-value {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-tech);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-card.streak .kpi-card-value { color: #ff6b6b; }
.kpi-card.done .kpi-card-value { color: #00ff9d; }
.kpi-card.active .kpi-card-value { color: #a29bfe; }
.kpi-card.rate .kpi-card-value { color: #fdcb6e; }

.kpi-card-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}

.kpi-card-trend {
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-card-trend.up { color: #00ff9d; }
.kpi-card-trend.down { color: #ff6b6b; }

/* Activity Heatmap - Compact & Modern */
.activity-heatmap {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
}

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

.heatmap-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.heatmap-title i { color: var(--primary); }

.heatmap-legend {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
}

.heatmap-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.heatmap-legend-dot.l0 { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.heatmap-legend-dot.l1 { background: rgba(0,255,157,0.2); }
.heatmap-legend-dot.l2 { background: rgba(0,255,157,0.5); }
.heatmap-legend-dot.l3 { background: rgba(0,255,157,0.8); }
.heatmap-legend-dot.l4 { background: #00ff9d; }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.heatmap-cell.level-0 { background: rgba(255,255,255,0.04); }
.heatmap-cell.level-1 { background: rgba(0,255,157,0.15); }
.heatmap-cell.level-2 { background: rgba(0,255,157,0.35); }
.heatmap-cell.level-3 { background: rgba(0,255,157,0.6); }
.heatmap-cell.level-4 { background: #00ff9d; box-shadow: 0 0 8px rgba(0,255,157,0.4); }

.heatmap-cell::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(0,0,0,0.95);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.heatmap-cell:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Chart Container - Elevated Card */
.stats-chart-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 20px 16px;
  margin-bottom: 20px;
}

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

.chart-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-card-title i { color: var(--primary); }

.chart-card-badge {
  font-size: 0.65rem;
  color: var(--primary);
  background: rgba(0,255,157,0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.stats-chart-card canvas {
  max-height: 180px;
}

/* Weekday Distribution Bars */
.weekday-distribution {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 80px;
  padding: 0 4px;
}

.weekday-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.weekday-bar-fill {
  width: 100%;
  max-width: 36px;
  border-radius: 8px 8px 2px 2px;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 4px;
  background: linear-gradient(180deg, #00ff9d 0%, rgba(0,255,157,0.1) 100%);
  position: relative;
}

.weekday-bar-fill::after {
  content: attr(data-value);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #00ff9d;
  opacity: 0;
  transition: opacity 0.3s;
}

.weekday-col:hover .weekday-bar-fill::after {
  opacity: 1;
}

.weekday-col:hover .weekday-bar-fill {
  background: linear-gradient(180deg, #00ff9d 0%, rgba(0,255,157,0.3) 100%);
  box-shadow: 0 0 20px rgba(0,255,157,0.3);
}

.weekday-name {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
}

.weekday-col:hover .weekday-name {
  color: rgba(255,255,255,0.8);
}

/* Responsive */
@media (max-width: 400px) {
  .stats-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .kpi-card-value {
    font-size: 2rem;
  }
  
  .heatmap-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }
  
  .heatmap-cell {
    border-radius: 3px;
  }
}
/* ==================== UPGRADE PROMPT MODAL ==================== */
.upgrade-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 3500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.upgrade-prompt-overlay.active {
  display: flex;
}

.upgrade-prompt-card {
  background: linear-gradient(160deg, #0a0a1a 0%, #0f0f1e 40%, #0d0d20 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px 16px 20px;
  width: 94%;
  max-width: 400px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 255, 157, 0.08);
  animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.upgrade-prompt-card::-webkit-scrollbar {
  width: 3px;
}

.upgrade-prompt-card::-webkit-scrollbar-track {
  background: transparent;
}

.upgrade-prompt-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.upgrade-prompt-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.15), rgba(0, 212, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 12px;
  border: 2px solid rgba(0, 255, 157, 0.2);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.3); }
  50% { box-shadow: 0 0 0 16px rgba(0, 255, 157, 0); }
}

.upgrade-prompt-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: white;
  margin-bottom: 6px;
}

.upgrade-prompt-feature {
  display: inline-block;
  background: rgba(0, 255, 157, 0.1);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.upgrade-prompt-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.6;
  margin-bottom: 6px;
}

.upgrade-prompt-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 16px;
}

.upgrade-prompt-perk {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.upgrade-prompt-perk i {
  color: var(--done);
  font-size: 0.65rem;
}

.upgrade-prompt-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-prompt-buttons .btn-pro {
  background: linear-gradient(135deg, #00ff9d, #00cc7d);
  color: #000;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 255, 157, 0.3);
}

.upgrade-prompt-buttons .btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 255, 157, 0.4);
}

.upgrade-prompt-buttons .btn-pro:active {
  transform: scale(0.96);
}

.upgrade-prompt-buttons .btn-ultra {
  background: linear-gradient(135deg, #fdcb6e, #ff7675);
  color: #000;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(253, 203, 110, 0.3);
}

.upgrade-prompt-buttons .btn-ultra:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(253, 203, 110, 0.5);
}

.upgrade-prompt-buttons .btn-ultra:active {
  transform: scale(0.96);
}

.upgrade-prompt-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.upgrade-prompt-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* ==================== UPGRADE PROMPT - ULTRA BUTTON ==================== */
.upgrade-prompt-buttons .btn-ultra {
  background: linear-gradient(135deg, #fdcb6e, #ff7675);
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(253, 203, 110, 0.3);
}

.upgrade-prompt-buttons .btn-ultra:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(253, 203, 110, 0.5);
}

.upgrade-prompt-buttons .btn-ultra:active {
  transform: scale(0.96);
}
@keyframes statsLockPulse {
  0%, 100% { 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 157, 0.1);
  }
  50% { 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 255, 157, 0.25);
  }
}
/* ==================== UPGRADE PROMOTION BOXES ==================== */
.upgrade-promo-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  text-align: right;
  transition: all 0.3s ease;
}

.upgrade-promo-box.pro-box {
  background: rgba(0, 255, 157, 0.04);
  border-color: rgba(0, 255, 157, 0.15);
}

.upgrade-promo-box.pro-box:hover {
  border-color: rgba(0, 255, 157, 0.3);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

.upgrade-promo-box.ultra-box {
  background: rgba(253, 203, 110, 0.04);
  border-color: rgba(253, 203, 110, 0.15);
}

.upgrade-promo-box.ultra-box:hover {
  border-color: rgba(253, 203, 110, 0.3);
  box-shadow: 0 0 20px rgba(253, 203, 110, 0.1);
}

.upgrade-promo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.upgrade-promo-icon {
  font-size: 1.3rem;
}

.upgrade-promo-name {
  font-weight: 800;
  font-size: 0.9rem;
}

.upgrade-promo-name.pro { color: white; }
.upgrade-promo-name.ultra { color: #fdcb6e; }

.upgrade-promo-badge {
  font-size: 0.6rem;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.upgrade-promo-badge.pro {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
}

.upgrade-promo-badge.ultra {
  background: rgba(253, 203, 110, 0.15);
  color: #fdcb6e;
}

.upgrade-promo-desc {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-bottom: 6px;
  line-height: 1.5;
}

.upgrade-promo-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 0.6rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

@media (max-width: 360px) {
  .upgrade-promo-features {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.upgrade-promo-features span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.upgrade-promo-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-promo-price {
  font-weight: 700;
  font-size: 0.75rem;
}

.upgrade-promo-price small {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
}

.upgrade-promo-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.72rem;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.upgrade-promo-price.pro { color: white; }
.upgrade-promo-price.ultra { color: #fdcb6e; }

.upgrade-promo-price small {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.7;
}

.upgrade-promo-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.8rem;
  font-family: var(--font-main);
  transition: all 0.3s ease;
}

.upgrade-promo-btn.pro-btn {
  background: linear-gradient(135deg, #00ff9d, #00cc7d);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
}

.upgrade-promo-btn.pro-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 157, 0.4);
}

.upgrade-promo-btn.ultra-btn {
  background: linear-gradient(135deg, #fdcb6e, #ff7675);
  color: #000;
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
}

.upgrade-promo-btn.ultra-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(253, 203, 110, 0.4);
}

.upgrade-promo-btn:active {
  transform: scale(0.95);
}
/* ==================== UPGRADE LATER BUTTON ==================== */
.upgrade-later-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-main);
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upgrade-later-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.upgrade-later-btn:active {
  transform: scale(0.97);
}
/* ==================== SUBSCRIPTION PLAN CARDS V2 ==================== */
.sp-card {
  background: rgba(255,255,255,0.02);
  border: 1.5px solid var(--sp-border);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--sp-bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sp-card:hover {
  transform: translateY(-4px);
  border-color: var(--sp-color);
  box-shadow: 0 12px 35px rgba(0,0,0,0.5);
}

.sp-card:hover::before {
  opacity: 1;
}

.sp-card:active {
  transform: scale(0.97);
}

/* Selected State */
.sp-card.sp-current {
  border-color: var(--sp-color);
  box-shadow: 0 0 0 2px var(--sp-color), 0 0 30px var(--sp-color)33;
  background: var(--sp-bg);
}

.sp-card.sp-current::before {
  opacity: 1;
}

.sp-card.selected {
  border-color: var(--sp-color);
  box-shadow: 0 0 0 2px var(--sp-color), 0 8px 30px rgba(0,0,0,0.6);
}

/* Badges */
.sp-current-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: #94a3b8;
  padding: 3px 10px;
  border-radius: 20px;
}

.sp-recommend-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Icon */
.sp-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

/* Name */
.sp-name {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* Price */
.sp-price {
  font-family: var(--font-tech);
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  line-height: 1.1;
}

.sp-unit {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
}

.sp-period {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 2px;
  margin-bottom: 14px;
}

/* Features */
.sp-features {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #b2bec3;
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-feature i {
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.6rem;
}

.sp-feature.locked {
  opacity: 0.4;
}

.sp-feature.locked span {
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 550px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }
}
/* ==================== EXAM MODAL ==================== */
.exam-modal-content {
  max-width: 520px !important;
}

/* Hero */
.exam-hero {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 157, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.exam-hero-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: examIconPulse 2s infinite;
}

@keyframes examIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.exam-hero-date {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.exam-hero-countdown {
  font-size: 0.8rem;
  color: var(--secondary);
  font-family: var(--font-tech);
}

/* Quick Stats */
.exam-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.exam-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.exam-stat i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--secondary);
}

/* Sections */
.exam-section {
  margin-bottom: 16px;
}

.exam-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Topics */
.exam-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  border-right: 3px solid var(--secondary);
}

.exam-topic-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.exam-topic-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.exam-topic-badge {
  margin-right: auto;
  font-size: 0.65rem;
  background: rgba(0,212,255,0.1);
  color: var(--secondary);
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* Tips */
.exam-tips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(253,203,110,0.05);
  border: 1px solid rgba(253,203,110,0.1);
  border-radius: 12px;
  padding: 10px 14px;
}

.exam-tip-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.exam-tip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Day Plan */
.exam-day-plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
}

.exam-plan-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary);
  font-family: var(--font-tech);
  width: 70px;
  flex-shrink: 0;
}

.exam-plan-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exam-plan-dot.test { background: #ff0055; }
.exam-plan-dot.review { background: #3b82f6; }
.exam-plan-dot.rest { background: #f97316; }

.exam-plan-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex: 1;
}
/* ==================== DAY TAB SWITCHER ==================== */
.day-tab-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.day-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.day-tab.active {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
}

.day-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.day-tab-content {
  display: none;
}

.day-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ==================== EXAM MODAL STYLES ==================== */
.exam-hero {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 157, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.exam-hero-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: examIconPulse 2s infinite;
}

@keyframes examIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.exam-hero-date {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.exam-hero-countdown {
  font-size: 0.8rem;
  color: var(--secondary);
  font-family: var(--font-tech);
}

/* Quick Stats */
.exam-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.exam-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.exam-stat i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--secondary);
}

/* Sections */
.exam-section {
  margin-bottom: 16px;
}

.exam-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Topics */
.exam-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  border-right: 3px solid var(--secondary);
}

.exam-topic-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.exam-topic-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.exam-topic-badge {
  margin-right: auto;
  font-size: 0.65rem;
  background: rgba(0, 212, 255, 0.1);
  color: var(--secondary);
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* Tips */
.exam-tips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(253, 203, 110, 0.05);
  border: 1px solid rgba(253, 203, 110, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
}

.exam-tip-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.exam-tip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
/* ==================== EXAM SOURCE SELECTOR ==================== */
.exam-source-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.exam-source-bar::-webkit-scrollbar {
  display: none;
}

.exam-source-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  color: var(--text-muted);
}

.exam-source-chip.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--secondary);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.exam-source-chip:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.exam-source-chip-icon {
  font-size: 1rem;
}

/* Exam Day Cell - Source Badge */
.exam-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
}

/* ==================== PAGE SYSTEM ==================== */
.pages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.app-page {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-page.active {
  display: flex;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Page Header */
.page-header {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title i {
  color: var(--primary);
}

/* Settings Cards */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
  transform: translateX(-4px);
}

.settings-card:active {
  transform: scale(0.98);
}

.settings-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.settings-card-text {
  flex: 1;
}

.settings-card-text h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.settings-card-text p {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* PDF Content */
.pdf-content {
  padding: 1rem 0;
}
/* ==================== HOLIDAY & SPECIAL DAYS ==================== */
.day-cell.holiday-day {
  background: rgba(255, 0, 85, 0.06) !important;
  border-color: rgba(255, 0, 85, 0.3) !important;
}

.day-cell.holiday-day:hover {
  background: rgba(255, 0, 85, 0.1) !important;
  border-color: rgba(255, 0, 85, 0.5) !important;
}

.day-cell.special-day {
  border-color: rgba(253, 203, 110, 0.25) !important;
}

.holiday-num {
  color: #ff0055 !important;
}

.holiday-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 0.42rem;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
  line-height: 1.3;
}

/* ==================== NOWRUZ DAYS - MINIMAL CELEBRATION ==================== */
.day-cell.nowruz-day {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(52, 211, 153, 0.03)) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  position: relative;
  overflow: hidden;
}

/* ذرات ریز طلایی/سبز پس‌زمینه */
/* ==================== NOWRUZ DAYS - STATIC GREEN ==================== */
.day-cell.nowruz-day {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.04)) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* ==================== NOWRUZ DAYS - STATIC GREEN ==================== */
.day-cell.nowruz-day {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.04)) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.day-cell.nowruz-day::after {
  content: '🌿';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}





.day-cell.nowruz-day:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(52, 211, 153, 0.08)) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}



.nowruz-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 0.55rem;
  z-index: 2;
  pointer-events: none;
}



.day-cell.nowruz-day:active {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}

.nowruz-num {
  color: #10b981 !important;
  font-weight: 900 !important;
  position: relative;
  z-index: 1;
}

/* بج مینیمال */
.nowruz-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 0.55rem;
  z-index: 2;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 380px) {
  .nowruz-badge {
    font-size: 0.5rem;
    top: 2px;
    left: 2px;
  }
}