/* ============================================================
   MUSCLE MONSTER GYM — DESIGN SYSTEM & THEMES
   ============================================================ */

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

/* ── BASE & THEME TOKENS ── */
:root {
  /* Default Theme: Dark Cyber */
  --bg-void: #0a0a0f;
  --bg-charcoal: #141420;
  --bg-slate: #1c1c2e;
  --bg-panel: #222238;
  --bg-elevated: #2a2a45;

  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #555570;

  --theme-primary: #00c8ff;
  --theme-primary-rgb: 0, 200, 255;
  --theme-secondary: #39ff14;
  --theme-secondary-rgb: 57, 255, 20;

  --accent-red: #ff3b5c;
  --accent-amber: #ffb800;

  /* Dynamically calculated glasses */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);

  --bg-overlay-start: rgba(10, 10, 15, 0.92);
  --bg-overlay-mid: rgba(20, 20, 32, 0.88);
  --bg-overlay-end: rgba(10, 10, 15, 0.92);

  --shadow-glow-primary: 0 0 20px rgba(var(--theme-primary-rgb), 0.15);
  --shadow-glow-secondary: 0 0 20px rgba(var(--theme-secondary-rgb), 0.15);
  --shadow-depth: 0 8px 32px rgba(0, 0, 0, 0.4);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Orbitron', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── DARK THEMES ── */
[data-theme="dark-cyber"] {} /* Uses default */

[data-theme="dark-crimson"] {
  --theme-primary: #ff3b5c;
  --theme-primary-rgb: 255, 59, 92;
  --theme-secondary: #ff7b00;
  --theme-secondary-rgb: 255, 123, 0;
}

[data-theme="dark-amethyst"] {
  --theme-primary: #a855f7;
  --theme-primary-rgb: 168, 85, 247;
  --theme-secondary: #ff007f;
  --theme-secondary-rgb: 255, 0, 127;
}

[data-theme="dark-gold"] {
  --bg-void: #111111;
  --bg-charcoal: #1a1a1a;
  --bg-slate: #242424;
  --bg-panel: #2a2a2a;
  --bg-elevated: #333333;
  --theme-primary: #ffd700;
  --theme-primary-rgb: 255, 215, 0;
  --theme-secondary: #ffaa00;
  --theme-secondary-rgb: 255, 170, 0;
  --bg-overlay-start: rgba(17, 17, 17, 0.92);
  --bg-overlay-mid: rgba(30, 30, 30, 0.88);
  --bg-overlay-end: rgba(17, 17, 17, 0.92);
}

[data-theme="dark-stealth"] {
  --bg-void: #000000;
  --bg-charcoal: #0a0a0a;
  --bg-slate: #141414;
  --bg-panel: #1a1a1a;
  --bg-elevated: #242424;
  --theme-primary: #ffffff;
  --theme-primary-rgb: 255, 255, 255;
  --theme-secondary: #aaaaaa;
  --theme-secondary-rgb: 170, 170, 170;
  --bg-overlay-start: rgba(0, 0, 0, 0.92);
  --bg-overlay-mid: rgba(15, 15, 15, 0.88);
  --bg-overlay-end: rgba(0, 0, 0, 0.92);
}

/* ── LIGHT THEMES ── */
[data-theme^="light-"] {
  --bg-void: #f0f0f5;
  --bg-charcoal: #ffffff;
  --bg-slate: #f8f8fc;
  --bg-panel: #ffffff;
  --bg-elevated: #f0f0f5;

  --text-primary: #1a1a24;
  --text-secondary: #555570;
  --text-muted: #8888a0;

  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(0, 0, 0, 0.05);

  --bg-overlay-start: rgba(240, 240, 245, 0.95);
  --bg-overlay-mid: rgba(255, 255, 255, 0.92);
  --bg-overlay-end: rgba(240, 240, 245, 0.95);
  --shadow-depth: 0 8px 32px rgba(0, 0, 0, 0.06);
}

[data-theme="light-clean"] {
  --theme-primary: #0055ff;
  --theme-primary-rgb: 0, 85, 255;
  --theme-secondary: #00c8ff;
  --theme-secondary-rgb: 0, 200, 255;
}

[data-theme="light-mint"] {
  --theme-primary: #00a86b;
  --theme-primary-rgb: 0, 168, 107;
  --theme-secondary: #00d2ff;
  --theme-secondary-rgb: 0, 210, 255;
}

[data-theme="light-coral"] {
  --theme-primary: #ff5555;
  --theme-primary-rgb: 255, 85, 85;
  --theme-secondary: #ff8888;
  --theme-secondary-rgb: 255, 136, 136;
}

[data-theme="light-sunset"] {
  --theme-primary: #ff7b00;
  --theme-primary-rgb: 255, 123, 0;
  --theme-secondary: #ffbb00;
  --theme-secondary-rgb: 255, 187, 0;
}

[data-theme="light-mono"] {
  --theme-primary: #000000;
  --theme-primary-rgb: 0, 0, 0;
  --theme-secondary: #444444;
  --theme-secondary-rgb: 68, 68, 68;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-void); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; position: relative; transition: background var(--transition-smooth), color var(--transition-smooth); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-charcoal); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-primary); }

/* ── BACKGROUND LAYER ── */
.bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-layer__image { position: absolute; inset: 0; background-image: url('../assets/gym-bg.png'); background-size: cover; background-position: center; filter: blur(8px) brightness(0.25); transform: scale(1.1); }
.bg-layer__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, var(--bg-overlay-start) 0%, var(--bg-overlay-mid) 50%, var(--bg-overlay-end) 100%); transition: background var(--transition-smooth); }

.bg-layer__blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: blobDrift 12s ease-in-out infinite alternate; transition: background var(--transition-smooth); }
.bg-layer__blob--blue { width: 500px; height: 500px; background: radial-gradient(circle, rgba(var(--theme-primary-rgb), 0.3) 0%, transparent 70%); top: -100px; left: -100px; animation-delay: 0s; }
.bg-layer__blob--green { width: 400px; height: 400px; background: radial-gradient(circle, rgba(var(--theme-secondary-rgb), 0.2) 0%, transparent 70%); bottom: -100px; right: -100px; animation-delay: -6s; }
.bg-layer__blob--purple { width: 300px; height: 300px; background: radial-gradient(circle, rgba(var(--theme-primary-rgb), 0.15) 0%, transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -3s; }

@keyframes blobDrift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.02); }
}

/* ── MAIN CONTENT ── */
.main-content { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; }

/* ── HERO SECTION ── */
.hero { text-align: center; padding: 60px 20px 20px; opacity: 0; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 100px; font-size: 0.7rem; font-family: var(--font-display); color: var(--theme-primary); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; transition: color var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth); }
.hero__badge::before { content: ''; width: 6px; height: 6px; background: var(--theme-secondary); border-radius: 50%; animation: pulse 2s ease-in-out infinite; transition: background var(--transition-smooth); }
.hero__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: 4px; background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 10px; line-height: 1.1; transition: all var(--transition-smooth); }
.hero__subtitle { font-family: var(--font-display); font-size: clamp(0.65rem, 1.5vw, 0.85rem); color: var(--text-secondary); letter-spacing: 6px; text-transform: uppercase; margin-bottom: 8px; transition: color var(--transition-smooth); }
.hero__divider { width: 80px; height: 2px; background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); margin: 0 auto; border-radius: 2px; transition: background var(--transition-smooth); }

/* ── MODE SWITCHER ── */
.mode-switcher {
  display: inline-flex;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 6px;
  border-radius: 40px;
  margin: 15px auto 30px;
  backdrop-filter: blur(10px);
  z-index: 10;
}
.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}
.mode-btn:hover {
  color: var(--text-primary);
}
.mode-btn--active {
  color: #000;
}
.mode-switcher__bg {
  position: absolute;
  top: 6px;
  left: 6px;
  height: calc(100% - 12px);
  width: 50%;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  border-radius: 30px;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mode-switcher[data-mode="client"] .mode-switcher__bg {
  transform: translateX(100%);
}
.mode-switcher[data-mode="client"] .mode-btn:nth-child(2) {
  color: var(--text-muted);
}
.mode-switcher[data-mode="client"] .mode-btn:nth-child(3) {
  color: #000;
}

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

/* ── SHOWCASE AREA ── */
.showcase { display: flex; align-items: flex-start; justify-content: center; gap: 50px; padding: 40px 30px 60px; width: 100%; max-width: 1500px; opacity: 0; }

/* ── FOOTER ── */
.footer { text-align: center; padding: 40px 20px; opacity: 0; }
.footer__text { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; font-family: var(--font-display); transition: color var(--transition-smooth); }
.footer__text span { background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; transition: all var(--transition-smooth); }

/* ── THEME SWITCHER UI ── */
.theme-configurator { position: fixed; right: 20px; top: 100px; width: 50px; background: var(--bg-panel); border: 1px solid var(--glass-border); border-radius: 25px; padding: 8px; display: flex; flex-direction: column; gap: 10px; z-index: 100; box-shadow: var(--shadow-depth); transition: background var(--transition-smooth), border-color var(--transition-smooth); }
.theme-group-label { font-size: 8px; text-transform: uppercase; text-align: center; color: var(--text-muted); font-family: var(--font-display); letter-spacing: 1px; margin: 4px 0 2px; transition: color var(--transition-smooth); }
.theme-btn { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform var(--transition-fast), border-color var(--transition-fast); position: relative; }
.theme-btn:hover { transform: scale(1.1); }
.theme-btn[data-active="true"] { border-color: var(--text-primary); transform: scale(1.1); }
.theme-divider { width: 100%; height: 1px; background: var(--glass-border); margin: 5px 0; }

/* Theme Button Colors - manual mapping for the UI swatches */
.t-btn-cyber { background: linear-gradient(135deg, #00c8ff, #39ff14); }
.t-btn-crimson { background: linear-gradient(135deg, #ff3b5c, #ff7b00); }
.t-btn-amethyst { background: linear-gradient(135deg, #a855f7, #ff007f); }
.t-btn-gold { background: linear-gradient(135deg, #ffd700, #ffaa00); }
.t-btn-stealth { background: linear-gradient(135deg, #ffffff, #aaaaaa); }
.t-btn-clean { background: linear-gradient(135deg, #0055ff, #00c8ff); }
.t-btn-mint { background: linear-gradient(135deg, #00a86b, #00d2ff); }
.t-btn-coral { background: linear-gradient(135deg, #ff5555, #ff8888); }
.t-btn-sunset { background: linear-gradient(135deg, #ff7b00, #ffbb00); }
.t-btn-mono { background: linear-gradient(135deg, #000000, #444444); }

/* ── UTILITIES ── */
.glass-panel { background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--radius-md); transition: background var(--transition-smooth), border-color var(--transition-smooth); }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) { .showcase { flex-direction: column; align-items: center; gap: 40px; } }
@media (max-width: 768px) { 
  .hero { padding: 40px 16px 16px; } 
  .showcase { padding: 20px 16px 80px; } /* extra padding for bottom bar */
  
  .theme-configurator { 
    top: auto; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    width: 100%; 
    flex-direction: row; 
    border-radius: 12px 12px 0 0; 
    justify-content: flex-start;
    overflow-x: auto;
    padding: 12px 20px;
    background: rgba(10, 10, 15, 0.95);
    border-left: none;
    border-right: none;
    border-bottom: none;
  } 
  
  .theme-divider { 
    width: 1px; 
    height: 20px; 
    margin: 0 10px; 
    align-self: center; 
  }
}
