/* ==========================================================================
   BANK FITNESS - DARK MODE GLASSMORPHISM DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

:root {
  --bg-color: #0B0E14;
  --bg-card: rgba(18, 24, 36, 0.75);
  --bg-glass: rgba(22, 30, 46, 0.65);
  --border-glass: rgba(0, 229, 255, 0.15);
  
  --primary-color: #00E5FF; /* Cyan Accent */
  --secondary-color: #00FF87; /* Neon Green Accent */
  --accent-purple: #9D00FF;
  
  --text-main: #F0F4F8;
  --text-muted: #8E9BAE;
  
  --danger-color: #FF4757;
  --warning-color: #FFA502;
  --success-color: #00FF87;
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.2);
  --shadow-neon: 0 0 20px rgba(0, 255, 135, 0.25);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  padding-bottom: 80px; /* Space for Bottom Nav on mobile */
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* Background Ambient Glow Orbs */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  will-change: transform;
}

.glow-orb-1 {
  top: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: var(--primary-color);
}

.glow-orb-2 {
  bottom: 10%;
  left: -10%;
  width: 380px;
  height: 380px;
  background: var(--secondary-color);
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

/* Top App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B0E14;
  font-weight: bold;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(90deg, #FFFFFF, var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-clock {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Glassmorphism Cards */
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.card-glass:hover {
  border-color: rgba(0, 229, 255, 0.3);
}

/* Typography & Badges */
h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-info {
  background: rgba(0, 229, 255, 0.12);
  color: var(--primary-color);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.badge-success {
  background: rgba(0, 255, 135, 0.12);
  color: var(--secondary-color);
  border: 1px solid rgba(0, 255, 135, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.15);
}

.badge-warning {
  background: rgba(255, 165, 0, 0.12);
  color: var(--warning-color);
  border: 1px solid rgba(255, 165, 0, 0.3);
}

/* SPA Views */
.app-view {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

.app-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Muscle Group Checklist Grid */
.checklist-summary-banner {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.25rem;
}

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

.checklist-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: var(--transition-smooth);
}

.checklist-card.completed {
  border-color: var(--secondary-color);
  background: rgba(0, 255, 135, 0.03);
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.1);
}

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

.subchips-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.sub-chip.trained {
  background: rgba(0, 255, 135, 0.15);
  color: var(--secondary-color);
  border: 1px solid rgba(0, 255, 135, 0.35);
  box-shadow: 0 0 8px rgba(0, 255, 135, 0.2);
}

.sub-chip.remaining {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.75;
}

/* Category Filter Chips */
.category-filter-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  scrollbar-width: none;
}

.category-filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-chip.active {
  background: rgba(0, 229, 255, 0.15);
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0099FF);
  color: #0B0E14;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger-color);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 71, 87, 0.25);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(11, 14, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Set Logger Table Rows */
.exercise-log-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.set-row {
  display: grid;
  grid-template-columns: 45px 1fr 1fr 50px 40px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.set-checkbox {
  width: 28px;
  height: 28px;
  accent-color: var(--secondary-color);
  cursor: pointer;
}

/* Rest Timer Widget */
.timer-widget-card {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(0, 255, 135, 0.05));
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.timer-display-huge {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--secondary-color);
  text-shadow: 0 0 15px rgba(0, 255, 135, 0.4);
  letter-spacing: 2px;
}

/* Modal Popup & Animations (@keyframes modalPopIn & bellPulse) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box-glass {
  background: rgba(18, 24, 36, 0.95);
  border: 2px solid var(--secondary-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 255, 135, 0.35);
  transform: scale(0.7);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.show .modal-box-glass {
  animation: modalPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bell-icon-pulse {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: bellPulse 1s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes bellPulse {
  0% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 5px var(--secondary-color));
  }
  50% {
    transform: scale(1.15) rotate(15deg);
    filter: drop-shadow(0 0 20px var(--secondary-color));
  }
  100% {
    transform: scale(1.15) rotate(-15deg);
    filter: drop-shadow(0 0 25px var(--secondary-color));
  }
}

/* Bottom Navigation Bar (Mobile-First SPA) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.65rem 0.5rem;
  box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.4);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.nav-item i {
  width: 22px;
  height: 22px;
}

.nav-item.active {
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(18, 24, 36, 0.95);
  border: 1px solid var(--primary-color);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  animation: modalPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .app-container {
    padding: 2rem 1.5rem;
  }
}
