/* ===== COMPLETE MODERN CSS UPDATES ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --warning: #fbbf24;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-dark: linear-gradient(135deg, var(--dark), #0f172a);
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--warning));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  
  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --light: #1e293b;
  --dark: #f8fafc;
  --gray-light: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
}

body {
  background: var(--light);
  color: var(--dark);
  transition: var(--transition-base);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== ANIMATED GRADIENT BACKGROUND ===== */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(-45deg, #6366f1, #10b981, #f59e0b, #ef4444);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  opacity: 0.1;
}

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

/* ===== PARTICLES BACKGROUND ===== */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ===== LANDING PAGE ===== */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.landing-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 50px;
  max-width: 800px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.8s ease-out;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.landing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: progressLoad 2s ease;
}

@keyframes progressLoad {
  from { width: 0; }
  to { width: 100%; }
}

.landing-card h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.landing-card > p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 40px;
  color: var(--gray);
}

/* ===== MODERN STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.stat-card {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 25px;
  text-align: center;
  border: 1px solid var(--glass-border);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-card .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.stat-card .label {
  color: var(--gray);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.feature {
  background: var(--glass-bg);
  padding: 25px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  transition: var(--transition-base);
  text-align: left;
}

.feature:hover {
  transform: translateY(-5px);
  background: var(--glass-bg);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: block;
}

.feature h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.feature p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== BUTTONS ===== */
.btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

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

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 50px;
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.6s ease-out;
  box-shadow: var(--shadow-xl);
}

.auth-card h2 {
  margin-bottom: 15px;
  color: var(--dark);
  font-size: 2rem;
}

.auth-card > p {
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.auth-card input {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark);
  font-size: 1rem;
  transition: var(--transition-base);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.15);
}

.auth-card input::placeholder {
  color: var(--gray);
}

.auth-link {
  margin-top: 25px;
  text-align: center;
  color: var(--gray);
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.auth-link a:hover {
  text-decoration: underline;
}

/* ===== DASHBOARD HEADER ===== */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

header h3 i {
  color: var(--primary);
}

/* ===== NAVIGATION ===== */
.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav button {
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--dark);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-base);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.nav button:active {
  transform: translateY(0);
}

.nav button i {
  font-size: 1.1em;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* ===== MAIN CONTENT ===== */
main {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease;
}

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

/* ===== CARD SYSTEM ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: cardAppear 0.6s ease-out forwards;
  opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-base);
}

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

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.card h2, .card h3 {
  margin-bottom: 20px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card h2 i, .card h3 i {
  color: var(--primary);
}

.card > p {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ===== ENHANCED NEPALI CLOCK WITH 3D EFFECTS ===== */
.clock-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: floatClock 6s ease-in-out infinite;
  margin: 20px 0;
}

@keyframes floatClock {
  0%, 100% { 
    transform: translateY(0px) rotateX(0deg) rotateY(0deg); 
  }
  25% { 
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg); 
  }
  50% { 
    transform: translateY(0px) rotateX(0deg) rotateY(0deg); 
  }
  75% { 
    transform: translateY(10px) rotateX(-5deg) rotateY(-5deg); 
  }
}

.nepali-date-display {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-xl);
  padding: 30px;
  backdrop-filter: blur(10px);
  transform: translateZ(20px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.date-badge {
  text-align: center;
  margin-bottom: 30px;
}

.day-name {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
  display: block;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Noto Sans Devanagari', sans-serif;
}

.date-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.date-number {
  font-size: 5rem;
  font-weight: 900;
  color: var(--dark);
  text-shadow: 
    3px 3px 0px rgba(0,0,0,0.1),
    6px 6px 20px rgba(0,0,0,0.1);
  font-family: 'Noto Sans Devanagari', sans-serif;
  line-height: 1;
}

.date-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.month {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary);
  font-family: 'Noto Sans Devanagari', sans-serif;
}

.year {
  font-size: 1.4rem;
  color: var(--gray);
  font-family: 'Noto Sans Devanagari', sans-serif;
}

.time-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.time-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 500px;
}

.digit {
  font-size: 3rem;
  font-weight: 800;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 20px;
  border-radius: var(--radius-md);
  min-width: 90px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
  font-family: 'Noto Sans Devanagari', sans-serif;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.digit:hover {
  transform: rotateX(10deg) rotateY(10deg);
  background: rgba(255, 255, 255, 0.3);
}

.colon {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 25px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.label {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 5px;
  font-family: 'Noto Sans Devanagari', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== STATS RINGS ===== */
.stats-rings {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}

.ring-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.progress-ring {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke-linecap: round;
  fill: transparent;
  transition: stroke-dashoffset 1s ease;
}

.ring-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}

.ring-label {
  font-size: 0.95rem;
  color: var(--gray);
  margin-top: 5px;
  display: block;
}

/* ===== GOAL TRACKER ===== */
.goal-tracker {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 25px;
  margin: 30px 0;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.goal-tracker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: progressLoad 2s ease;
}

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

.goal-percentage {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.5rem;
}

.goal-progress {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 6px;
  position: relative;
  width: 0;
  animation: fillProgress 1.5s ease-out forwards;
}

@keyframes fillProgress {
  to { width: 65%; }
}

.progress-sparkles {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: sparkle 2s infinite;
  filter: blur(2px);
}

@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(10px); }
}

.goal-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 0.95rem;
  color: var(--gray);
}

.time-left {
  color: var(--accent);
  font-weight: 600;
}

/* ===== AI ASSISTANT ===== */
.ai-assistant {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
  border-radius: var(--radius-xl);
  padding: 30px;
  margin: 40px 0;
  border: 1px solid rgba(16, 185, 129, 0.2);
  position: relative;
  overflow: hidden;
}

.ai-assistant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.ai-avatar {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.ai-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ai-avatar i {
  font-size: 1.8rem;
  color: white;
}

.ai-info h4 {
  font-size: 1.4rem;
  margin-bottom: 5px;
  color: var(--dark);
}

.ai-info p {
  color: var(--gray);
  font-size: 0.95rem;
}

.ai-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
}

.status-dot.active {
  animation: blink 2s infinite;
}

.ai-recommendations {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.recommendation {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border-left: 4px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

.recommendation:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.1);
}

.recommendation.active {
  border-left-color: var(--secondary);
  background: rgba(16, 185, 129, 0.1);
}

.recommendation i {
  font-size: 1.3rem;
  color: var(--secondary);
  width: 30px;
  text-align: center;
}

.recommendation span {
  flex: 1;
  color: var(--dark);
  font-weight: 500;
}

/* ===== LEADERBOARD ===== */
.leaderboard {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin: 30px 0;
  border: 1px solid var(--glass-border);
}

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

.leaderboard-header h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  font-size: 1.3rem;
}

.leaderboard-header h4 i {
  color: var(--accent);
}

.refresh-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
}

.refresh-btn:hover {
  transform: rotate(180deg);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.leaderboard-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.1);
}

.leaderboard-item.you {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.rank {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

.leaderboard-item.you .rank {
  background: var(--primary);
  color: white;
}

.user {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.name {
  font-weight: 600;
  color: var(--dark);
}

.score {
  font-size: 0.9rem;
  color: var(--gray);
}

.trend {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
}

.trend.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
}

.trend.down {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* ===== STUDY TIMELINE ===== */
.study-timeline {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin: 30px 0;
  border: 1px solid var(--glass-border);
}

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

.timeline-header h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  font-size: 1.3rem;
}

.timeline-header h4 i {
  color: var(--primary);
}

.timeline-stats {
  display: flex;
  gap: 20px;
}

.timeline-stats span {
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 40px 0;
  overflow: visible;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 45%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: timelineProgress 2s ease-out;
}

@keyframes timelineProgress {
  from { width: 0; }
  to { width: 45%; }
}

.timeline-milestones {
  display: flex;
  justify-content: space-between;
  position: relative;
  top: -18px;
}

.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.milestone-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 3px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  position: relative;
}

.milestone.completed .milestone-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.milestone.current .milestone-dot {
  background: var(--gradient-primary);
  border-color: var(--primary);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
}

.milestone span {
  font-weight: 500;
  color: var(--gray);
  text-align: center;
  font-size: 0.9rem;
}

.milestone.completed span {
  color: var(--primary);
  font-weight: 600;
}

.milestone.current span {
  color: var(--dark);
  font-weight: 700;
}

/* ===== NEWS GRID ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.news-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 25px;
  transition: all var(--transition-base);
}

.news-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.news-card h4 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--dark);
}

.news-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.news-card a:hover {
  gap: 12px;
}

/* ===== UPDATES CONTAINER ===== */
.updates-container {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-xl);
  padding: 30px;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.updates-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  animation: progressLoad 2s ease;
}

.updates-container h3 {
  color: var(--accent);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.update-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  transition: var(--transition-base);
}

.update-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.1);
}

.update-date {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 1.1rem;
}

.update-desc {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.quick-action-btn {
  padding: 25px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
  text-decoration: none;
  color: var(--dark);
  transition: all var(--transition-base);
  cursor: pointer;
}

.quick-action-btn:hover {
  transform: translateY(-5px);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn i {
  font-size: 2.5rem;
}

.quick-action-btn span {
  font-weight: 600;
  font-size: 1.1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .landing-card {
    padding: 40px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  header {
    padding: 15px 30px;
  }
  
  .nav {
    gap: 8px;
  }
  
  .nav button {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .date-number {
    font-size: 4rem;
  }
  
  .digit {
    font-size: 2.5rem;
    min-width: 80px;
  }
}

@media (max-width: 768px) {
  /* Mobile Menu */
  header {
    flex-direction: row;
    padding: 15px 20px;
  }
  
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 20px;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav button {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  /* Content */
  main {
    padding: 25px;
  }
  
  .landing-card {
    padding: 30px 20px;
  }
  
  .landing-card h1 {
    font-size: 2.2rem;
  }
  
  .auth-card {
    padding: 30px 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  /* Clock adjustments */
  .date-main {
    flex-direction: column;
    gap: 10px;
  }
  
  .date-number {
    font-size: 3.5rem;
  }
  
  .time-display {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .digit {
    font-size: 2rem;
    min-width: 70px;
    padding: 12px 15px;
  }
  
  .stats-rings {
    gap: 20px;
  }
  
  .ring-container {
    width: 120px;
    height: 120px;
  }
  
  .ring-value {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  header h3 {
    font-size: 1.2rem;
  }
  
  .landing-card h1 {
    font-size: 1.8rem;
  }
  
  .landing-card > p {
    font-size: 1rem;
  }
  
  .btn {
    padding: 14px 24px;
    font-size: 1rem;
  }
  
  .card {
    padding: 25px;
  }
  
  .date-number {
    font-size: 3rem;
  }
  
  .digit {
    font-size: 1.8rem;
    min-width: 60px;
    padding: 10px;
  }
  
  .stats-rings {
    gap: 15px;
  }
  
  .ring-container {
    width: 100px;
    height: 100px;
  }
  
  .ring-value {
    font-size: 1.8rem;
  }
  
  .timeline-stats {
    flex-direction: column;
    gap: 10px;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.shadow-hover {
  transition: box-shadow var(--transition-base);
}

.shadow-hover:hover {
  box-shadow: var(--shadow-xl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 5px;
}

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

/* ===== CURSOR EFFECT ===== */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.2s ease;
}

.custom-cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
  transition: transform 0.4s ease;
}
