:root {
  --primary: #F9F9FA;
  --accent: #f53333;
  --text: #1E1E2F;
  --secondary: #2C2C3E;
  --primary-bg: #f8fafc;
  --secondary-bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --accent-red: #eb1717c5;
  --accent-red-dark: #dc2626;
  --accent-purple: #667eea;
  --accent-purple-dark: #5a6fd6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-primary: rgba(239, 68, 68, 0.15);
  --border-secondary: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 8px 32px rgba(239, 68, 68, 0.08);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #EFF2F7;
  color: var(--text-primary);
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--text);
  color: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: center;
  height: 100px;
}

.landing-page-container-codemate-logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.landing-page-container-codemate-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link { text-decoration: none; color: inherit; }
.nav-link:hover { color: var(--accent); }

.header-profile {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-profile-pic {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: block;
  border: 2px solid #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown {
  position: absolute;
  top: 80px;
  right: 5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 220px;
  display: none;
  z-index: 1001;
  padding: 0.8rem 0.5rem;
}

.dropdown.show { display: block; }

.dropdown a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown a:hover { background: #f0f0f0; }
.dropdown a i { margin-right: 10px; color: #666; }
hr { margin: 0.5rem 0.7rem; }

/* ===== HAMBURGER ===== */
.topnav {
  display: none;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-icon span {
  background-color: white;
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.active .bar1 { transform: translateY(9px) rotate(45deg); }
.menu-icon.active .bar2 { opacity: 0; transform: scaleX(0); }
.menu-icon.active .bar3 { transform: translateY(-9px) rotate(-45deg); }

#myLinks {
  display: none;
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  background: #1E1E2F;
  z-index: 998;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#myLinks.show { display: flex; }

#myLinks a {
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
}

#myLinks a:hover { background: rgba(255,255,255,0.05); }

/* ===== LAYOUT ===== */
.content {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 100px);
  gap: 2.5rem;
  padding: 8rem 5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== SIDEBAR ===== */
.content-left {
  background: #fff;
  border: 1px solid var(--border-secondary);
  border-radius: 20px;
  padding: 1.5rem;
  height: fit-content;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 8rem;
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
}

.content-left:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(236, 51, 51, 0.06);
}

.dashboard-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.4rem;
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.dashboard-link:hover {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.06);
  border-color: rgba(102, 126, 234, 0.15);
}

.dashboard-link.active {
  color: white;
  background: var(--accent-red);
  font-weight: 600;
  box-shadow: var(--shadow-primary);
  border-color: transparent;
}

.dashboard-link.active:hover { border-color: var(--border-primary); }
.dashboard-link:focus { outline: 2px solid var(--accent-red); outline-offset: 2px; }

/* ===== CONTENT RIGHT ===== */
.content-right { display: flex; flex-direction: column; gap: 1.75rem; }
.content-right h2 { font-size: 1.1rem; }

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-circle { width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0; }
.profile-skeleton {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.profile-info-skeleton { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.skeleton-line { height: 16px; }
.skeleton-card { height: 110px; border-radius: 14px; margin-bottom: 0.75rem; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w80 { width: 80%; }

/* ===== PROFILE ===== */
.profile {
  background: #fff;
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-card);
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
}

.profile:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(236, 51, 51, 0.06); }

.profile-loaded { display: flex; align-items: center; gap: 2rem; width: 100%; }

.profile-loaded .profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-primary);
  object-fit: cover;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.profile-loaded .profile-pic:hover { transform: scale(1.05); }

.profile-details { flex: 1; min-width: 0; }

.profile-details h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.7rem 0;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.profile-details .profile-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.profile-details .profile-meta span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-details .profile-meta span i { color: var(--accent-red); font-size: 0.8rem; }

.profile-stat-badge { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; flex-shrink: 0; }

.stat-item {
  text-align: center;
  padding: 0.6rem 1.2rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-item strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-purple);
  line-height: 1;
}

.stat-item span { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.2rem; display: block; }

/* ===== LEARNING ===== */
.learning, .certificates {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  padding-top: 0.3rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border: 1px solid var(--border-secondary);
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
}

.learning:hover, .certificates:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.1);
}

.learning h2, .streak-left h2, .set-goal h2, .certificates h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.streak-left h2 { margin-top: 0.4rem; }
.certificates h2 { margin-top: 1.5rem; margin-bottom: 0.9rem; }

.learning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  position: relative;
}

.see-all-btn {
  font-size: 0.85rem;
  color: var(--accent-purple);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 500;
  padding: 4px 0;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.see-all-btn:hover { color: var(--accent-purple-dark); }

/* ===== COURSES DROPDOWN ===== */
.courses-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  z-index: 100;
  width: 340px;
  padding: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.courses-dropdown.open { display: block; }

.dropdown-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px 3px;
}

.dropdown-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.dropdown-course-item:hover { background: #f5f5f5; }

.dci-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.dci-info { flex: 1; min-width: 0; }
.dci-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.dci-bar-wrap { height: 4px; background: #eee; border-radius: 99px; margin-top: 4px; }
.dci-bar { height: 4px; border-radius: 99px; background: var(--accent-red); }
.dci-pct { font-size: 11px; font-weight: 600; color: var(--accent-purple); white-space: nowrap; }
.dropdown-empty { padding: 1rem; font-size: 0.875rem; color: var(--text-muted); text-align: center; }

/* ===== COURSE CARD ===== */
.course-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-secondary);
  background: #fafafa;
  margin-bottom: 0.75rem;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.1);
  background: #fff;
}

.course-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.course-info { flex: 1; min-width: 0; }
.course-info h4 { margin: 0 0 0.2rem 0; font-size: 0.95rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-info .course-meta { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.55rem; }
.progress-bar-wrap { background: #eeeeee; border-radius: 99px; height: 6px; overflow: hidden; width: 100%; }
.progress-bar-fill { height: 100%; border-radius: 99px; background: var(--accent-red); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.course-pct { font-size: 0.78rem; font-weight: 600; color: var(--accent-purple); white-space: nowrap; }

.course-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* ===== STREAK + GOAL ===== */
.streak-goal-row { display: flex; gap: 1.5rem; }

.streak-goal-row .streak-left {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border: 1px solid var(--border-secondary);
  flex: 1.5;
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
}

.streak-goal-row .set-goal {
  background: white;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border: 1px solid var(--border-secondary);
  flex: 1;
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
}

.streak-goal-row .streak-left:hover,
.streak-goal-row .set-goal:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.06);
}

.streak-days { display: flex; gap: 0.6rem; margin: 1rem 0; }

.day {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.day.today { border-color: var(--accent-red); color: var(--accent-red); }
.day.active { background: var(--accent-red); color: white; border-color: var(--accent-red); }
.day.active.today { background: var(--accent-red); color: white; border-color: var(--accent-red); }

.streak-week-label { font-size: 0.78rem; color: var(--text-muted); margin: 0.3rem 0 0 0; }

/* ===== GOAL ===== */
.goal-display-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: rgba(102, 126, 234, 0.04);
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-top: 0.6rem;
  margin-bottom: 0.65rem;
}

.goal-accent-bar { width: 3px; border-radius: 99px; background: var(--accent-red); flex-shrink: 0; align-self: stretch; min-height: 20px; }
.goal-text-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.goal-text { font-size: 0.875rem; color: var(--text-primary); line-height: 1.55; margin: 0 0 0.5rem 0; }
.goal-empty { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }

.goal-edit-btn {
  display: inline-block;
  align-self: flex-start;
  background: none;
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 8px;
  color: var(--accent-purple);
  font-size: 0.775rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: 0.2s;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 500;
}

.goal-edit-btn:hover { background: rgba(102, 126, 234, 0.06); }
.goal-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }

.goal-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  border: 1px solid rgba(102, 126, 234, 0.25);
  font-size: 0.875rem;
  font-family: 'Segoe UI', sans-serif;
  outline: none;
  box-sizing: border-box;
  background: #fafafa;
  color: var(--text-primary);
  resize: none;
}

.goal-input:focus { border-color: var(--accent-purple); background: #fff; }

.goal-save-btn {
  align-self: flex-start;
  padding: 0.45rem 1.1rem;
  background: var(--accent-purple);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: 'Segoe UI', sans-serif;
}

.goal-save-btn:hover { background: var(--accent-purple-dark); }

/* ===== EMPTY STATE ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.2rem 2rem; text-align: center; gap: 1rem; }

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: rgba(239, 68, 68, 0.07);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 68, 68, 0.12);
}

.empty-state-icon i { font-size: 1.6rem; color: var(--accent-red); }
.empty-state h3 { margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--text-primary); }
.empty-state p { margin: 0; font-size: 1rem; color: var(--text-secondary); max-width: 240px; line-height: 1.5; }

.empty-state-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-red);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.empty-state-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25); }

/* ===== CERTIFICATES ===== */
.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-secondary);
  background: #fafafa;
  margin-bottom: 0.75rem;
  transition: 0.25s;
  text-decoration: none;
  color: inherit;
}

.cert-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(239, 68, 68, 0.07); border-color: rgba(239, 68, 68, 0.18); background: #fff; }

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.cert-info h4 { margin: 0 0 0.15rem 0; font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.cert-info span { font-size: 0.78rem; color: var(--text-secondary); }
.cert-download { margin-left: auto; color: var(--text-muted); font-size: 0.85rem; transition: 0.2s; }
.cert-download:hover { color: var(--accent-red); }

/* ===== SIDEBAR LEARNING DROPDOWN ===== */
.sidebar-learning-wrap { margin-bottom: 0.4rem; }

.sidebar-learning-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.sidebar-learning-trigger.sidebar-trigger-active {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.06);
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.sidebar-chevron { font-size: 10px; transition: transform 0.2s ease; color: var(--text-secondary); }

.sidebar-courses-dropdown {
  display: none;
  background: #f9f9fb;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 0.4rem;
  margin: 4px 0 6px;
  max-height: 380px;
  overflow-y: auto;
}

.sidebar-courses-dropdown.open { display: block; }

.sidebar-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.sidebar-course-item:hover { background: #efefef; }

.sci-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.sci-info { flex: 1; min-width: 0; }
.sci-title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.sci-bar-wrap { height: 3px; background: #e0e0e0; border-radius: 99px; margin-top: 4px; }
.sci-bar { height: 3px; border-radius: 99px; background: var(--accent-red); }
.sci-pct { font-size: 10px; font-weight: 600; color: var(--accent-purple); white-space: nowrap; }
.sidebar-course-empty { padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--text-muted); }

/* ===== CONTRIBUTOR STYLES ===== */
.golden-username {
  background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3s linear infinite;
  font-weight: 700;
  font-size: 1.75rem;
}

@keyframes goldShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.contributor-frame {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #FFD700, #ef4444, #FFD700);
  background-size: 300% 300%;
  animation: frameRotate 4s linear infinite;
  flex-shrink: 0;
}

.contributor-frame img { display: block; border-radius: 50%; width: 80px; height: 80px; object-fit: cover; border: 2px solid #fff; }

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

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 1170px) and (max-width: 1410px) {
  .header { padding: 0 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
  .content { padding: 8rem 3rem 3rem; gap: 2rem; }
  .dropdown { right: 2rem; }
  .landing-page-container-codemate-logo { flex: 0 0 auto; margin-right: 15rem; }
}


/* Large desktop adjustments */
@media (min-width: 1000px) and (max-width: 1170px) {
  .header { padding: 0 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
  .content { padding: 8rem 3rem 3rem; gap: 2rem; }
  .dropdown { right: 2rem; }
  .landing-page-container-codemate-logo { flex: 0 0 auto; margin-right: 9rem; }
}

/* Medium desktop */
@media (max-width: 1000px) {
  .header { padding: 0 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
  .landing-page-container-codemate-logo { flex: 0 0 auto; margin-right: 5rem; }
  .landing-page-container-codemate-logo a span { font-size: 1.5rem !important; }
  .landing-page-container-codemate-logo a img { height: 44px !important; width: 44px !important; }
  .content { padding: 7rem 2rem 3rem; gap: 1.75rem; }
  .dropdown { right: 2rem; }
}

/* Tablet — switch to hamburger */
@media (max-width: 850px) {
  .header { padding: 0 1.25rem; height: 70px; }
  .landing-page-container-codemate-logo { flex: 1; }
  .navbar { display: none; }
  .header-profile { flex: 0; margin-right: 0.5rem; }
  .topnav { display: flex; }
  #myLinks { top: 70px; }
  .dropdown { right: 1rem; top: 60px; }

  /* Single column, no sidebar on mobile — it's in the hamburger menu */
  .content {
    grid-template-columns: 1fr;
    padding: 5rem 1.25rem 3rem;
    gap: 1.25rem;
  }

  /* Hide the desktop sidebar entirely — nav is in hamburger */
  .content-left {
    display: none;
  }

  /* Streak + goal stay side by side while there's room */
  .streak-goal-row { flex-wrap: wrap; gap: 1.25rem; }
  .streak-goal-row .streak-left { flex: 1 1 220px; }
  .streak-goal-row .set-goal { flex: 1 1 160px; }

  /* Profile stats hidden */
  .profile-stat-badge { display: none; }
}

/* Mobile */
@media (max-width: 600px) {
  .content { padding: 4.75rem 1rem 2.5rem; gap: 1rem; }

  .profile { padding: 1.25rem; gap: 1rem; }
  .profile-loaded { gap: 1rem; }
  .profile-details h2 { font-size: 1.3rem; }
  .profile-details .profile-meta { gap: 0.75rem; }

  /* Stack streak and goal */
  .streak-goal-row { flex-direction: column; }
  .streak-goal-row .streak-left,
  .streak-goal-row .set-goal { flex: 1 1 auto; }

  .streak-days { gap: 0.35rem; }
  .day { width: 36px; height: 36px; font-size: 0.82rem; border-radius: 10px; }

  .course-card { padding: 0.9rem 1rem; gap: 1rem; }
  .course-icon { width: 42px; height: 42px; border-radius: 10px; }
}

/* Extra small */
@media (max-width: 380px) {
  .header { padding: 0 1rem; }
  .day { width: 30px; height: 30px; font-size: 0.75rem; border-radius: 8px; }
  .content { padding: 4.5rem 0.75rem 2rem; }
  .profile-details h2 { font-size: 1.15rem; }
}

