/* ==========================================================================
   MODERN PROFILE PAGE CSS - FitJourney Dashboard Theme
   ========================================================================== */

/* CSS Custom Properties */
:root {
  /* Brand Colors */
  --primary: #6a1b9a;
  --accent: #ff6f00;

  /* Background Colors */
  --dark-bg: #1c1c1c;
  --darker-bg: #121212;
  --card-bg: #1e1e1e;
  --elevated-bg: #242424;

  /* Text Colors */
  --text-color: #e0e0e0;
  --light-text: #b0b0b0;
  --muted-text: #757575;

  /* Status Colors */
  --success: #4caf50;
  --warning: #ffc107;
  --error: #f44336;
  --info: #2196f3;

  /* Spacing */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

  /* Transitions */
  --transition-speed: 0.3s;
  --transition-fast: 0.15s;
}

/* Light Mode */
body.light-mode {
  background-color: #f8fafc;
  color: #1a202c;
  --dark-bg: #f2f2f2;
  --darker-bg: #ffffff;
  --card-bg: #ffffff;
  --elevated-bg: #ffffff;
  --text-color: #212121;
  --light-text: #515c6f;
  --muted-text: #718096;
}

/* Base Styles */
body {
  background-color: #0a0a0a;
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 0.75rem 0;
  box-shadow: 0 4px 20px rgba(106, 27, 154, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

body.light-mode .header {
  background: linear-gradient(90deg, #f2cfff, #ffe0b2);
  box-shadow: 0 4px 20px rgba(106, 27, 154, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

body.light-mode .logo {
  color: var(--primary);
}

.logo-circle {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-weight: 800;
}

body.light-mode .logo-circle {
  background: var(--primary);
  color: white;
}

.nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  font-weight: 500;
}

body.light-mode .nav a {
  color: var(--primary);
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.15);
}

body.light-mode .nav a:hover,
body.light-mode .nav a.active {
  background: rgba(255, 111, 0, 0.1);
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

body.light-mode .theme-toggle button {
  background: rgba(106, 27, 154, 0.1);
  color: var(--primary);
}

.theme-toggle button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

body.light-mode .theme-toggle button:hover {
  background: rgba(106, 27, 154, 0.2);
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: relative;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
}

body.light-mode .user-profile {
  background: rgba(106, 27, 154, 0.1);
  color: var(--primary);
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.light-mode .user-profile:hover {
  background: rgba(106, 27, 154, 0.2);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--elevated-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  z-index: 1200;
  padding: 0.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .dropdown-menu {
  background: var(--card-bg);
  box-shadow: 0 10px 40px rgba(106, 27, 154, 0.1);
  border: 1px solid #e2e8f0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  margin: 0 0.5rem;
  border-radius: 4px;
}

.dropdown-menu a:hover {
  background: rgba(106, 27, 154, 0.1);
  color: var(--primary);
}

body.light-mode .dropdown-menu a:hover {
  background: rgba(255, 111, 0, 0.1);
  color: var(--accent);
}

/* Main Content */
.main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Guest Profile */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.guest-welcome {
  text-align: center;
  max-width: 500px;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .guest-welcome {
  box-shadow: 0 20px 60px rgba(106, 27, 154, 0.1);
  border: 1px solid #e2e8f0;
}

.guest-avatar-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.guest-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  background: var(--card-bg);
  padding: 10px;
}

.avatar-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.3;
  animation: pulse 2s infinite;
  z-index: -1;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
}

.guest-welcome h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guest-welcome p {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.auth-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Profile Container */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Profile Hero Section */
.profile-hero {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .profile-hero {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.1);
  border: 1px solid #e2e8f0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.1;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-avatar-container {
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  background: var(--card-bg);
  position: relative;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  background-clip: padding-box;
  z-index: -1;
}

.avatar-upload {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.avatar-upload:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(106, 27, 154, 0.4);
}

.profile-info h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--text-color), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-info p {
  color: var(--light-text);
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.profile-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-badge,
.level-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge.active {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.3));
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.level-badge {
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.2), rgba(106, 27, 154, 0.3));
  color: var(--primary);
  border: 1px solid rgba(106, 27, 154, 0.4);
}

.profile-stats-quick {
  display: flex;
  gap: 2rem;
}

.quick-stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation Tabs */
.profile-nav-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: var(--card-bg);
  padding: 0.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

body.light-mode .profile-nav-tabs {
  box-shadow: 0 4px 12px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: var(--border-radius);
  color: var(--light-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 111, 0, 0.1), transparent);
  transition: left var(--transition-speed);
}

.nav-tab:hover::before {
  left: 100%;
}

.nav-tab:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .nav-tab:hover {
  background: rgba(106, 27, 154, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
}

.nav-tab i {
  font-size: 1.2rem;
}

/* Profile Content */
.profile-content {
  min-height: 500px;
}

.profile-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.profile-tab-content.active {
  display: block;
}

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

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Overview Cards */
.overview-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

body.light-mode .overview-card {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

.overview-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.overview-card:hover::before {
  transform: scaleX(1);
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

body.light-mode .overview-card:hover {
  box-shadow: 0 12px 40px rgba(106, 27, 154, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color);
}

.card-header i {
  font-size: 1.5rem;
  color: var(--accent);
}

/* Fitness Metrics */
.fitness-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.metric {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

body.light-mode .metric {
  background: rgba(106, 27, 154, 0.03);
}

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

body.light-mode .metric:hover {
  background: rgba(106, 27, 154, 0.06);
}

.metric-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.metric-info {
  flex: 1;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 500;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

body.light-mode .activity-item {
  background: rgba(106, 27, 154, 0.03);
}

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

body.light-mode .activity-item:hover {
  background: rgba(106, 27, 154, 0.06);
}

.activity-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.activity-details {
  flex: 1;
}

.activity-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.85rem;
  color: var(--light-text);
}

.activity-stats {
  font-weight: 600;
  color: var(--accent);
}

/* Chart Container */
.chart-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-placeholder {
  text-align: center;
  color: var(--light-text);
}

.chart-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Quick Actions */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

body.light-mode .action-btn {
  background: rgba(106, 27, 154, 0.03);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.action-btn:hover {
  background: rgba(106, 27, 154, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.action-btn i {
  color: var(--accent);
  font-size: 1.2rem;
}

/* Activity Cards */
.activity-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

body.light-mode .activity-card {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

.workout-history-card {
  grid-column: 1 / -1;
}

.calendar-card {
  grid-column: 1 / -1;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

body.light-mode .filter-btn {
  background: rgba(106, 27, 154, 0.05);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.filter-btn:hover {
  background: rgba(106, 27, 154, 0.1);
  border-color: var(--primary);
}

.workout-history-container {
  padding: 1.5rem;
}

.workout-history-list {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Calendar */
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calendar-nav {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.calendar-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

body.light-mode .calendar-nav:hover {
  background: rgba(106, 27, 154, 0.1);
}

.calendar-month {
  font-weight: 600;
  color: var(--text-color);
}

.activity-calendar {
  padding: 1.5rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-loading {
  text-align: center;
  color: var(--light-text);
}

.calendar-loading i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  animation: spin 2s linear infinite;
}

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

/* Achievements */
.achievements-grid {
  display: grid;
  gap: 2rem;
}

.achievement-section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .achievement-section {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

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

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color);
}

.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.progress-indicator span {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 500;
}

.progress-bar {
  width: 150px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

body.light-mode .progress-bar {
  background: rgba(106, 27, 154, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width var(--transition-speed);
}

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

body.light-mode .badge-item {
  background: rgba(106, 27, 154, 0.03);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.badge-item.earned {
  border-color: var(--success);
  background: rgba(76, 175, 80, 0.1);
}

.badge-item.locked {
  opacity: 0.6;
}

.badge-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.light-mode .badge-item:hover {
  box-shadow: 0 8px 25px rgba(106, 27, 154, 0.1);
}

.badge-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-item.earned .badge-icon {
  background: linear-gradient(135deg, var(--success), #66bb6a);
}

.badge-item.locked .badge-icon {
  background: var(--muted-text);
}

.badge-info {
  flex: 1;
}

.badge-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.badge-info p {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0;
  line-height: 1.4;
}

.badge-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-item.earned .badge-status {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success);
}

.badge-item.locked .badge-status {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-text);
}

body.light-mode .badge-item.locked .badge-status {
  background: rgba(106, 27, 154, 0.1);
}

/* Milestones Timeline */
.milestones-timeline {
  position: relative;
  padding-left: 2rem;
}

.milestones-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.milestone {
  position: relative;
  margin-bottom: 2rem;
}

.milestone:last-child {
  margin-bottom: 0;
}

.milestone-marker {
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted-text);
  border: 3px solid var(--card-bg);
  z-index: 1;
}

.milestone.completed .milestone-marker {
  background: var(--success);
}

.milestone.pending .milestone-marker {
  background: var(--warning);
}

.milestone-content {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

body.light-mode .milestone-content {
  background: rgba(106, 27, 154, 0.03);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.milestone-content:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(5px);
}

body.light-mode .milestone-content:hover {
  background: rgba(106, 27, 154, 0.06);
}

.milestone-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.milestone-content p {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.milestone-date {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
}

.milestone.completed .milestone-date {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success);
}

.milestone.pending .milestone-date {
  background: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.milestone.locked .milestone-date {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-text);
}

body.light-mode .milestone.locked .milestone-date {
  background: rgba(106, 27, 154, 0.1);
}

/* Goals */
.goals-container {
  max-width: 1000px;
  margin: 0 auto;
}

.goals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .goals-header {
  border-bottom: 2px solid rgba(106, 27, 154, 0.1);
}

.goals-header h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text-color), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.goals-section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .goals-section {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

.goals-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  position: relative;
}

.goals-section h4::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.goals-list {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .settings-card {
  box-shadow: 0 8px 32px rgba(106, 27, 154, 0.06);
  border: 1px solid #e2e8f0;
}

.settings-card.danger-zone {
  border-color: rgba(244, 67, 54, 0.3);
}

.settings-card .card-header {
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .settings-card .card-header {
  background: rgba(106, 27, 154, 0.02);
  border-bottom: 1px solid rgba(106, 27, 154, 0.1);
}

.settings-form {
  padding: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
  font-size: 1.1rem;
  z-index: 2;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

body.light-mode .input-wrapper input,
body.light-mode .input-wrapper select,
body.light-mode .input-wrapper textarea {
  background: rgba(106, 27, 154, 0.05);
  border: 2px solid rgba(106, 27, 154, 0.1);
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(106, 27, 154, 0.1);
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.2);
}

.input-wrapper input:focus + i,
.input-wrapper select:focus + i,
.input-wrapper textarea:focus + i {
  color: var(--primary);
}

.password-field {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--light-text);
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition-fast);
  padding: 0.25rem;
  border-radius: 4px;
}

.toggle-password:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}

body.light-mode .toggle-password:hover {
  background: rgba(106, 27, 154, 0.1);
}

.input-wrapper textarea {
  resize: vertical;
  min-height: 120px;
  padding-top: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .form-actions {
  border-top: 1px solid rgba(106, 27, 154, 0.1);
}

/* Preferences */
.preferences-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

body.light-mode .preference-item {
  background: rgba(106, 27, 154, 0.03);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.preference-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.light-mode .preference-item:hover {
  background: rgba(106, 27, 154, 0.06);
}

.preference-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
}

.preference-info p {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0;
  line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: var(--transition-speed);
  border-radius: 34px;
}

body.light-mode .slider {
  background-color: rgba(106, 27, 154, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition-speed);
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Danger Zone */
.danger-actions {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: rgba(244, 67, 54, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.action-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
}

.action-info p {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0;
  line-height: 1.4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  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 var(--transition-speed);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 27, 154, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .btn-secondary {
  border: 2px solid rgba(106, 27, 154, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

body.light-mode .btn-secondary:hover {
  background: rgba(106, 27, 154, 0.1);
}

.btn-danger {
  background: linear-gradient(135deg, var(--error), #e57373);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--light-text);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--primary);
  opacity: 0.7;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.5;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s ease forwards;
}

body.light-mode .modal-content {
  box-shadow: 0 25px 80px rgba(106, 27, 154, 0.2);
  border: 1px solid #e2e8f0;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .modal-header {
  border-bottom: 1px solid rgba(106, 27, 154, 0.1);
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text-color), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--light-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0.5rem;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.1);
}

body.light-mode .modal-close:hover {
  background: rgba(106, 27, 154, 0.1);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .modal-footer {
  border-top: 1px solid rgba(106, 27, 154, 0.1);
}

.modal-form .form-grid {
  margin-bottom: 1rem;
}

.warning-message {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(244, 67, 54, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 67, 54, 0.3);
  margin-bottom: 1.5rem;
}

.warning-message i {
  font-size: 1.5rem;
  color: var(--error);
}

.warning-message p {
  margin: 0;
  color: var(--text-color);
  line-height: 1.5;
}

/* Message Styles */
.message {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

.message.success {
  background: rgba(76, 175, 80, 0.15);
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
  background: rgba(244, 67, 54, 0.15);
  color: var(--error);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.message.info {
  background: rgba(33, 150, 243, 0.15);
  color: var(--info);
  border: 1px solid rgba(33, 150, 243, 0.3);
}

.message.hidden {
  display: none;
}

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

/* AI Chatbot */
.ai-chatbot {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 380px;
  height: 600px;
  background: var(--elevated-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow: hidden;
  animation: slideInUp var(--transition-speed);
}

body.light-mode .ai-chatbot {
  box-shadow: 0 20px 60px rgba(106, 27, 154, 0.15);
  border: 1px solid #e2e8f0;
}

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

.ai-chatbot.hidden {
  display: none;
}

.chat-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chat-header button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.chat-header button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  max-width: 85%;
  animation: messageSlideIn var(--transition-speed);
}

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

.chat-message.bot {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  align-self: flex-start;
}

body.light-mode .chat-message.bot {
  background: rgba(106, 27, 154, 0.1);
}

.chat-message.user {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  align-self: flex-end;
}

.chat-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 0.5rem;
}

body.light-mode .chat-footer {
  border-top: 1px solid rgba(106, 27, 154, 0.1);
}

.chat-footer input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

body.light-mode .chat-footer input {
  background: rgba(106, 27, 154, 0.05);
  border: 1px solid rgba(106, 27, 154, 0.1);
}

.chat-footer input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-footer button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat-footer button:hover {
  transform: scale(1.05);
}

/* Chat Toggle */
#chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(106, 27, 154, 0.3);
  z-index: 1030;
  transition: all var(--transition-speed);
}

#chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(106, 27, 154, 0.4);
}

#chat-toggle i {
  font-size: 1.5rem;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(106, 27, 154, 0.3);
  z-index: 1030;
  transition: all var(--transition-speed);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(106, 27, 154, 0.4);
}

.theme-toggle i {
  font-size: 1.5rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

body.light-mode .footer {
  background: linear-gradient(90deg, #f2cfff, #ffe0b2);
  color: var(--primary);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--transition-fast);
}

body.light-mode .footer-section a {
  color: rgba(106, 27, 154, 0.8);
}

.footer-section a:hover {
  color: white;
}

body.light-mode .footer-section a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

body.light-mode .social-links a {
  background: rgba(106, 27, 154, 0.1);
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

body.light-mode .social-links a:hover {
  background: rgba(106, 27, 154, 0.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .footer-bottom {
  border-top: 1px solid rgba(106, 27, 154, 0.2);
}

.footer-bottom p {
  margin: 0;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .profile-stats-quick {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  /* Hide header theme toggle on mobile */
  .header-right .theme-toggle {
    display: none;
  }

  .profile-nav-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .profile-nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    padding: 0.75rem 1rem;
  }

  .nav-tab span {
    display: none;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .profile-stats-quick {
    gap: 1rem;
  }

  .goals-grid {
    grid-template-columns: 1fr;
  }

  .badges-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .ai-chatbot {
    width: 100%;
    height: 80vh;
    bottom: 0;
    right: 0;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
  }

  #chat-toggle,
  .theme-toggle {
    bottom: 1rem;
  }

  #chat-toggle {
    right: 1rem;
  }

  .theme-toggle {
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .main {
    padding: 1rem 0;
  }

  .profile-hero {
    margin-bottom: 1rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  .quick-stat {
    text-align: center;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .overview-card {
    padding: 1rem;
  }

  .settings-card .card-header,
  .settings-form,
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .auth-buttons {
    flex-direction: column;
  }

  .guest-welcome {
    padding: 2rem 1rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

body.light-mode ::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

/* Focus Management */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: white;
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
}

body.light-mode .loading {
  border: 2px solid rgba(106, 27, 154, 0.3);
  border-top-color: var(--accent);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --text-color: #ffffff;
    --light-text: #ffffff;
  }

  body.light-mode {
    --text-color: #000000;
    --light-text: #000000;
  }
}

/* Reduced Motion */
@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 {
  .header,
  .profile-nav-tabs,
  .ai-chatbot,
  #chat-toggle,
  .theme-toggle,
  .footer {
    display: none !important;
  }

  .profile-hero,
  .overview-card,
  .settings-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
