/* ========================================
   FitLife Bulgaria — Page-Specific Styles
   ======================================== */

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 440px);
  max-width: var(--max-width);
  height: calc(var(--navbar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  padding-top: 8px;
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-navbar);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), color var(--transition-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--primary-light);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  background: linear-gradient(135deg, #6C5CE7, #00D2FF);
  border-radius: var(--radius-full);
}

.nav-item span:first-child {
  font-size: 1.2rem;
}

.nav-badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Home Page ── */
.home-greeting {
  margin-bottom: var(--space-lg);
}

.home-greeting h2 {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  font-weight: var(--fw-normal);
}

.home-greeting h1 {
  font-size: var(--fs-2xl);
  margin-top: 2px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.today-plan {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.today-plan::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: var(--primary-glow);
  border-radius: 50%;
  filter: blur(30px);
}

.today-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.today-plan-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.today-plan-tag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: rgba(0, 230, 118, 0.15);
  color: var(--success);
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
  z-index: 1;
}

.exercise-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  transition: background var(--transition-fast);
}

.exercise-item:active {
  background: var(--bg-glass-strong);
}

.exercise-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
}

.exercise-info {
  flex: 1;
}

.exercise-name {
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
}

.exercise-detail {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

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

.exercise-check.done {
  background: var(--success);
  border-color: var(--success);
  color: var(--text-inverse);
  font-size: 12px;
}

/* ── Weekly Calendar Strip ── */
.week-strip {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) 0;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.week-day.active {
  background: var(--primary);
  border-color: var(--primary);
}

.week-day.has-workout::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

.week-day-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.week-day.active .week-day-label {
  color: rgba(255,255,255,0.8);
}

.week-day-num {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

/* ── Workout Page ── */
.workout-plan-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-base);
  margin-bottom: var(--space-md);
}

.workout-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.muscle-group-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(108, 92, 231, 0.12);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--primary-light);
  font-weight: var(--fw-medium);
}

/* ── Nutrition Page ── */
.meal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.meal-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.meal-type {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.meal-time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-left: auto;
}

.meal-name {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.macros-row {
  display: flex;
  gap: var(--space-md);
}

.macro {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
}

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

.macro-protein .macro-dot { background: var(--accent); }
.macro-carbs .macro-dot { background: var(--warning); }
.macro-fats .macro-dot { background: var(--danger); }

.scan-food-btn {
  width: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 210, 255, 0.1));
  border: 2px dashed rgba(108, 92, 231, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-primary);
}

.scan-food-btn:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(0, 210, 255, 0.15));
}

.scan-food-icon {
  font-size: 2.5rem;
  animation: float 3s ease-in-out infinite;
}

/* ── Wallet Page ── */
.wallet-balance-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.wallet-balance-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.wallet-balance-card::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.wallet-label {
  font-size: var(--fs-sm);
  opacity: 0.8;
  margin-bottom: var(--space-xs);
  position: relative;
  z-index: 1;
}

.wallet-amount {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  position: relative;
  z-index: 1;
}

.wallet-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  position: relative;
  z-index: 1;
}

.wallet-action-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
}

.wallet-action-btn:active {
  background: rgba(255,255,255,0.3);
}

.crypto-balances {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.crypto-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.crypto-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.crypto-name {
  flex: 1;
  font-weight: var(--fw-medium);
}

.crypto-value {
  text-align: right;
}

.crypto-amount {
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
}

.crypto-usd {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ── Challenge Wager ── */
.wager-pool {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.08), rgba(255, 145, 0, 0.08));
  border: 1px solid rgba(255, 214, 0, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.wager-pool-amount {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--warning);
}

.wager-pool-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.wager-participants {
  display: flex;
  justify-content: center;
  margin-top: var(--space-sm);
}

.wager-avatars {
  display: flex;
}

.wager-avatars .avatar {
  margin-left: -8px;
  border: 2px solid var(--bg-primary);
}

.wager-avatars .avatar:first-child {
  margin-left: 0;
}

/* ── Discover / Map Page ── */
.map-container {
  width: calc(100% + var(--space-base) * 2);
  margin-left: calc(var(--space-base) * -1);
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background: var(--bg-glass);
}

.map-filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
}
.map-filters::-webkit-scrollbar { display: none; }

.location-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.location-card:active {
  background: var(--bg-card-hover);
}

.location-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-glass-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  flex-shrink: 0;
}

.location-info {
  flex: 1;
}

.location-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  margin-bottom: 2px;
}

.location-address {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.location-distance {
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: var(--fw-medium);
  margin-top: 4px;
}

/* ── Profile Page ── */
.profile-header {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-xl);
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.profile-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--bg-primary);
}

.profile-name {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
}

.profile-bio {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.profile-follow-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
}

.profile-follow-stat {
  text-align: center;
}

.profile-follow-num {
  font-weight: var(--fw-black);
  font-size: var(--fs-lg);
}

.profile-follow-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ── Settings List ── */
.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.settings-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
}

.settings-label {
  flex: 1;
  font-weight: var(--fw-medium);
}

.settings-value {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.settings-arrow {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ── Running Plan ── */
.running-plan-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.select-group {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.select-option {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.select-option.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: var(--fw-semibold);
}

.select-option:active {
  transform: scale(0.95);
}

/* ── Running Schedule ── */
.run-schedule {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.run-day-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.run-day-label {
  width: 40px;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--primary-light);
  text-transform: uppercase;
}

.run-day-info {
  flex: 1;
}

.run-day-type {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}

.run-day-detail {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.run-day-distance {
  font-weight: var(--fw-bold);
  color: var(--accent);
  font-size: var(--fs-base);
}

/* ── Notifications ── */
.notification-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:active {
  background: var(--bg-glass);
}

.notification-item.unread {
  background: rgba(108, 92, 231, 0.05);
  border-left: 3px solid var(--primary);
}

.notification-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.notification-text strong {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.notification-time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Language Switcher ── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
  border: none;
  background: transparent;
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

/* ── Challenge Card ── */
.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-base);
  margin-bottom: var(--space-md);
  animation: slideUp 0.4s ease-out both;
}

.challenge-card.wagered {
  border-color: rgba(255, 214, 0, 0.25);
}

.challenge-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.challenge-emoji {
  font-size: var(--fs-xl);
}

.challenge-title {
  flex: 1;
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
}

.challenge-wager-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  background: rgba(255, 214, 0, 0.15);
  color: var(--warning);
}

.challenge-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.challenge-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-meta {
  display: flex;
  gap: var(--space-md);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ── Leaderboard ── */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  transition: background var(--transition-fast);
}

.leaderboard-item:nth-child(1) { background: rgba(255, 214, 0, 0.08); }
.leaderboard-item:nth-child(2) { background: rgba(192, 192, 192, 0.06); }
.leaderboard-item:nth-child(3) { background: rgba(205, 127, 50, 0.06); }

.leaderboard-item.you {
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.25);
}

.leaderboard-rank {
  width: 28px;
  font-weight: var(--fw-black);
  font-size: var(--fs-lg);
  text-align: center;
  color: var(--text-muted);
}

.leaderboard-item:nth-child(1) .leaderboard-rank { color: var(--warning); }
.leaderboard-item:nth-child(2) .leaderboard-rank { color: #C0C0C0; }
.leaderboard-item:nth-child(3) .leaderboard-rank { color: #CD7F32; }

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.leaderboard-stat {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.leaderboard-value {
  font-weight: var(--fw-bold);
  color: var(--primary-light);
  font-size: var(--fs-base);
}

/* ── Map Markers ── */
.map-custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
}

.custom-div-icon {
  background: transparent !important;
  border: none !important;
}
