@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #4f7cff;
  --primary-container: #dbe5ff;
  --on-primary-container: #001a4d;
  --secondary: #5de0a6;
  --secondary-container: #d6fbe8;
  --background: #f8f9ff;
  --surface: #ffffff;
  --surface-container: #eef1f8;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
  
  /* Overrides for existing style.css */
  --bg: var(--background);
  --surface-strong: var(--surface);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --primary-2: var(--secondary);
  --radius: var(--radius-lg);
  --soft-shadow: var(--shadow-soft);
  --line: rgba(0,0,0,0.05);
}

:root[data-theme="dark"] {
  --background: #0b0f14;
  --surface: #111827;
  --surface-container: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --primary-container: #1e3a8a;
  --on-primary-container: #dbe5ff;
  --secondary-container: #064e2f;
  
  --bg: var(--background);
  --surface-strong: var(--surface);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --line: rgba(255,255,255,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: var(--text-primary);
}

/* Material Symbols */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
}

/* Cards MD3 */
.app-card {
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Buttons MD3 */
.btn-app {
  border-radius: var(--radius-pill);
  min-height: 52px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-app.primary {
  background: var(--primary);
  color: #fff;
}
.btn-app.primary:hover { background: color-mix(in srgb, var(--primary) 90%, black); }

.btn-app.success {
  background: var(--success);
  color: #fff;
}
.btn-app.ghost {
  background: var(--surface-container);
  color: var(--text-primary);
  border: none;
}
.btn-app.danger {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
}

.round-action {
  border-radius: var(--radius-pill);
  background: var(--surface-container);
  border: none;
  width: 48px; height: 48px;
  box-shadow: none;
  color: var(--text-primary);
}

/* Inputs MD3 */
.app-form input, .app-form select, .app-form textarea {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 52px;
  padding: 0 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.app-form input:focus, .app-form select:focus, .app-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-container);
}

/* Bottom Navigation MD3 */
.bottom-nav {
  background: var(--surface-container);
  border: none;
  border-radius: 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  bottom: 0; left: 0; right: 0;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: auto;
  border-radius: 0;
  background: transparent !important;
}
.bottom-nav a .nav-icon-container {
  width: 64px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  transition: background 0.3s ease;
}
.bottom-nav a.active .nav-icon-container {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.bottom-nav a span.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.bottom-nav a.active span.label {
  color: var(--text-primary);
}

/* Desktop Sidebar updates */
.desktop-sidebar {
  border-right: none;
  background: var(--surface-container);
}
.desktop-nav a {
  border-radius: var(--radius-pill);
  margin: 4px 16px;
  padding: 12px 16px;
}
.desktop-nav a.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 600ms linear;
  background-color: rgba(255, 255, 255, 0.4);
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* Fade in */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hide SVG icons if Material Symbols are used alongside them in sidebar */
.bottom-nav a > svg, .desktop-nav a > svg { display: none; }

@media (min-width: 769px) {
  .mobile-only-cardio {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-only-cardio {
    display: flex !important;
  }
}

/* Theme Switch */
.theme-switch {
  position: relative;
  width: 72px;
  height: 40px;
  display: inline-block;
}

.theme-switch input {
  display: none;
}

.theme-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--surface-container);
  border-radius: 999px;
  transition: 0.25s;
  border: 1px solid rgba(255,255,255,0.12);
}

.theme-slider::before {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  left: 4px;
  top: 3px;
  background: var(--surface);
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.theme-switch input:checked + .theme-slider {
  background: var(--primary);
}

.theme-switch input:checked + .theme-slider::before {
  transform: translateX(31px);
}

.theme-icon-off,
.theme-icon-on {
  position: absolute;
  top: 8px;
  font-size: 22px;
  z-index: 2;
  pointer-events: none;
  color: var(--text-primary);
}

.theme-icon-off {
  left: 9px;
}

.theme-icon-on {
  right: 9px;
}


