@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #121829;
  --card-bg: rgba(22, 29, 50, 0.7);
  --card-border: rgba(0, 180, 216, 0.15);
  --card-border-focus: rgba(0, 245, 255, 0.4);
  
  --sky-blue: #00b4d8;
  --sky-blue-hover: #0077b6;
  --electric-blue: #00f5ff;
  --electric-blue-glow: rgba(0, 245, 255, 0.25);
  
  --success: #06d6a0;
  --success-glow: rgba(6, 214, 160, 0.25);
  --warning: #ff9f1c;
  --danger: #ef476f;
  
  --text-primary: #f8f9fa;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-main: 'Outfit', sans-serif;
  --transition-speed: 0.3s;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sky-blue-hover);
}

/* Glassmorphism Background Elements */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.orb-1 {
  top: -10%;
  left: 10%;
  width: 40vw;
  height: 40vw;
  background: var(--sky-blue);
}

.orb-2 {
  bottom: -10%;
  right: 10%;
  width: 45vw;
  height: 45vw;
  background: var(--electric-blue);
}

/* Auth Screens */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 180, 216, 0.05);
  animation: fadeIn 0.5s ease-out;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sky-blue), var(--electric-blue));
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 0 20px var(--electric-blue-glow);
}

.logo-container svg {
  fill: #fff;
  width: 32px;
  height: 32px;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, var(--sky-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper input, .input-wrapper textarea, .input-wrapper select {
  width: 100%;
  background: rgba(10, 15, 29, 0.8);
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  padding-left: 44px;
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all var(--transition-speed);
}

.input-wrapper input:focus, .input-wrapper textarea:focus, .input-wrapper select:focus {
  border-color: var(--electric-blue);
  outline: none;
  box-shadow: 0 0 10px var(--electric-blue-glow);
}

.input-wrapper svg.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
  transition: fill var(--transition-speed);
}

.input-wrapper input:focus ~ svg.input-icon {
  fill: var(--electric-blue);
}

/* Checkbox Style */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.checkbox-group input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.checkbox-group input:checked + .checkmark {
  background: var(--sky-blue);
  border-color: var(--sky-blue);
}

.checkmark::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: none;
}

.checkbox-group input:checked + .checkmark::after {
  display: block;
}

/* Buttons */
.btn {
  width: 100%;
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-blue-hover));
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn:hover {
  background: linear-gradient(135deg, var(--electric-blue), var(--sky-blue));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--electric-blue-glow);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--sky-blue);
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c92a4e);
  box-shadow: 0 4px 15px rgba(239, 71, 111, 0.3);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ff5c8a, var(--danger));
  box-shadow: 0 6px 20px rgba(239, 71, 111, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #05b083);
  box-shadow: 0 4px 15px var(--success-glow);
}
.btn-success:hover {
  background: linear-gradient(135deg, #10f3bb, var(--success));
  box-shadow: 0 6px 20px var(--success-glow);
}

/* Setup Help Link */
.setup-help-trigger {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--sky-blue);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition-speed);
}

.setup-help-trigger:hover {
  color: var(--electric-blue);
  text-decoration: underline;
}

/* App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Nav (Desktop) */
.sidebar-nav {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--card-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-left: 10px;
}

.nav-logo svg {
  fill: var(--sky-blue);
  width: 28px;
  height: 28px;
}

.nav-logo span {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, var(--sky-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: var(--text-secondary);
  transition: all var(--transition-speed);
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(0, 180, 216, 0.1);
}

.nav-item.active {
  border-left: 3px solid var(--sky-blue);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: linear-gradient(to right, rgba(0, 180, 216, 0.15), transparent);
}

.nav-item:hover svg, .nav-item.active svg {
  fill: var(--electric-blue);
  filter: drop-shadow(0 0 5px var(--electric-blue-glow));
}

.nav-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sync-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.status-dot.syncing {
  background: var(--warning);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Mobile Bottom Nav (hidden on desktop) */
.mobile-nav {
  display: none;
}

/* Main Area */
.main-content {
  flex-grow: 1;
  margin-left: 260px;
  padding: 40px;
  max-width: 1200px;
  width: calc(100% - 260px);
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

.view-header {
  margin-bottom: 30px;
}

.view-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Dashboard View styling */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1-fraction);
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: all var(--transition-speed);
}

.card:hover {
  border-color: var(--card-border-focus);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title svg {
  width: 18px;
  height: 18px;
  fill: var(--sky-blue);
}

/* Metric / Quick Stats Cards */
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Progress Ring Layout */
.progress-ring-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-circle-bg {
  fill: transparent;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 8;
}

.progress-ring-circle {
  fill: transparent;
  stroke: var(--sky-blue);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease-in-out;
  filter: drop-shadow(0 0 3px var(--sky-blue));
}

.progress-ring-text {
  text-align: center;
  flex-grow: 1;
}

/* Goal Checklist Styles */
.goal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.goal-item:last-child {
  border-bottom: none;
}

.goal-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid var(--sky-blue);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.goal-checkbox.completed {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.goal-checkbox.completed::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.goal-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.goal-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.goal-badge.daily {
  background: rgba(0, 180, 216, 0.15);
  color: var(--sky-blue);
}

.goal-badge.weekly {
  background: rgba(6, 214, 160, 0.15);
  color: var(--success);
}

/* Log Workout Section */
.workout-builder {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workout-header-inputs {
  display: flex;
  gap: 20px;
}

.exercise-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

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

.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.exercise-header input {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 4px 0;
  width: 100%;
  transition: border-color var(--transition-speed);
}

.exercise-header input:focus {
  outline: none;
  border-color: var(--sky-blue);
}

.btn-remove-exercise {
  background: transparent;
  border: none;
  cursor: pointer;
  fill: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: fill var(--transition-speed);
}

.btn-remove-exercise:hover {
  fill: var(--danger);
}

.sets-header {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 50px;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.set-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 50px;
  gap: 12px;
  margin-bottom: 8px;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.2s ease-out;
}

.set-num {
  font-weight: 600;
  color: var(--text-secondary);
}

.set-row input {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  text-align: center;
  width: 100%;
  transition: all var(--transition-speed);
}

.set-row input:focus {
  outline: none;
  border-color: var(--sky-blue);
  box-shadow: 0 0 5px var(--sky-blue);
}

.btn-remove-set {
  background: transparent;
  border: none;
  cursor: pointer;
  fill: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: fill var(--transition-speed);
}

.btn-remove-set:hover {
  fill: var(--danger);
}

.exercise-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.btn-add-set {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 500;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-add-set svg {
  width: 14px;
  height: 14px;
  fill: var(--text-secondary);
  transition: fill var(--transition-speed);
}

.btn-add-set:hover {
  border-color: var(--sky-blue);
  color: var(--sky-blue);
}

.btn-add-set:hover svg {
  fill: var(--sky-blue);
}

.workout-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

/* Weight Section styling */
.weight-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weight-input-group {
  display: flex;
  align-items: center;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding-right: 12px;
  flex-grow: 1;
}

.weight-input-group input {
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  width: 100%;
}

.weight-input-group input:focus {
  outline: none;
}

.weight-unit {
  font-weight: 600;
  color: var(--sky-blue);
}

/* History / Calendar View */
.history-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
}

.calendar-card {
  grid-column: span 2;
}

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

.calendar-month-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.calendar-nav-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.calendar-nav-btn:hover {
  background: var(--sky-blue);
  border-color: var(--sky-blue);
}

.calendar-nav-btn svg {
  fill: #fff;
  width: 16px;
  height: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-weekday {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 0;
}

.calendar-day {
  aspect-ratio: 1.1;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-speed);
}

.calendar-day:hover {
  background: rgba(0, 180, 216, 0.1);
  border-color: var(--sky-blue);
}

.calendar-day.empty {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day-num {
  font-size: 0.9rem;
  font-weight: 500;
}

.calendar-day.today {
  border-color: var(--electric-blue);
  box-shadow: inset 0 0 8px rgba(0, 245, 255, 0.2);
}

.calendar-day.today .calendar-day-num {
  color: var(--electric-blue);
  font-weight: 700;
}

.calendar-day-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky-blue);
  align-self: center;
  margin-bottom: 4px;
  display: none;
  box-shadow: 0 0 6px var(--sky-blue);
}

.calendar-day.has-workout .calendar-day-indicator-dot {
  display: block;
}

.calendar-day.selected {
  background: rgba(0, 180, 216, 0.25);
  border-color: var(--sky-blue);
}

/* History logs list below calendar */
.history-logs-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}

.history-log-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.history-log-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.history-log-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.history-log-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.history-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-exercise-item {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.history-exercise-name {
  font-weight: 500;
  color: #fff;
}

.history-sets-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.history-log-notes {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid var(--sky-blue);
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* Settings / Setup View */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-card {
  max-width: 600px;
}

.setup-guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.setup-guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.setup-step-num {
  background: rgba(0, 180, 216, 0.15);
  color: var(--sky-blue);
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  border: 1px solid var(--sky-blue);
}

.setup-step-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.setup-step-content p {
  margin-bottom: 6px;
}

.code-block-container {
  position: relative;
  margin-top: 8px;
}

.code-block {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--sky-blue);
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255,255,255,0.05);
}

.btn-copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-copy-code:hover {
  background: var(--sky-blue);
  color: #fff;
  border-color: var(--sky-blue);
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  animation: modalScale var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  cursor: pointer;
  fill: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: fill var(--transition-speed);
}

.btn-close-modal:hover {
  fill: #fff;
}

.modal-body {
  padding: 24px;
}

/* Goal Tracker Elements */
.goals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.new-goal-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.new-goal-form input, .new-goal-form select {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
}

.new-goal-form input[type="text"] {
  flex-grow: 1;
}

.new-goal-form .btn-add-goal {
  width: auto;
  padding: 10px 20px;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .history-layout {
    grid-template-columns: 1fr;
  }
  .calendar-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }
  
  .sidebar-nav {
    display: none; /* Hide on mobile */
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px 20px 90px 20px; /* Leave space for bottom nav */
  }
  
  /* Mobile Bottom Nav Bar */
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(18, 24, 41, 0.9);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--card-border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    cursor: pointer;
    flex-grow: 1;
    height: 100%;
    transition: color var(--transition-speed);
  }
  
  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill var(--transition-speed);
  }
  
  .mobile-nav-item.active {
    color: var(--electric-blue);
  }
  
  .mobile-nav-item.active svg {
    fill: var(--electric-blue);
    filter: drop-shadow(0 0 5px var(--electric-blue-glow));
  }
  
  /* Grid adjust */
  .dashboard-grid {
    gap: 16px;
  }
  
  .col-4 { grid-column: span 12; }
  .col-6 { grid-column: span 12; }
  .col-8 { grid-column: span 12; }
  
  .workout-header-inputs {
    flex-direction: column;
    gap: 12px;
  }
}

/* Weight trends progress CSS chart */
.weight-chart-container {
  display: flex;
  align-items: flex-end;
  height: 120px;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.weight-chart-bar-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.weight-chart-bar {
  width: 100%;
  max-width: 24px;
  background: linear-gradient(to top, var(--sky-blue-hover), var(--sky-blue));
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease-out;
  position: relative;
  min-height: 4px;
}

.weight-chart-bar:hover {
  background: linear-gradient(to top, var(--sky-blue), var(--electric-blue));
  box-shadow: 0 0 10px var(--electric-blue-glow);
}

.weight-chart-tooltip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-speed);
  pointer-events: none;
}

.weight-chart-bar:hover .weight-chart-tooltip {
  opacity: 1;
}

.weight-chart-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
}
