/* IronLog v6 — mycolor.space palette: #00D68F */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*,*::before,*::after{ margin:0; padding:0; box-sizing:border-box; }
html{ font-size:16px; -webkit-tap-highlight-color:transparent; }

body{
  font-family:'Inter',-apple-system,sans-serif;
  background:#fafdf8;
  color:#002610;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

/* ═══════════ HERO ═══════════ */
.hero{
  text-align:center;
  padding:48px 24px 32px;
  background:linear-gradient(180deg, rgba(0,214,143,0.08) 0%, rgba(0,136,255,0.04) 60%, transparent 100%);
}
.hero h1{
  font-size:2.8rem; font-weight:900; letter-spacing:-0.06em; line-height:1;
  margin-bottom:6px;
}
.hero h1 span{
  background:linear-gradient(135deg, #00D68F, #0088ff);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.hero .tagline{ color:#558866; font-size:0.92rem; font-weight:500; }
.hero-steps{
  display:flex; justify-content:center; gap:24px; margin-top:22px; flex-wrap:wrap;
}
.hero-step{
  font-size:0.85rem; font-weight:600; color:#558866;
  display:flex; align-items:center; gap:8px;
}
.hero-step .num{
  width:26px; height:26px; border-radius:50%;
  background:linear-gradient(135deg, #00D68F, #00b870);
  color:#fff; font-size:0.8rem; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}

/* ═══════════ STATS ═══════════ */
.stats-section{ padding:0 16px; max-width:600px; margin:0 auto; }
.stats-bar{
  display:flex; justify-content:space-around;
  padding:22px 20px;
  background:#fff; border-radius:18px;
  box-shadow:0 2px 12px rgba(0,38,16,0.05);
  margin-bottom:20px;
}
.stat{ text-align:center; }
.stat-val{ display:block; font-size:1.9rem; font-weight:900; letter-spacing:-0.04em; color:#002610; }
.stat-val.lit{
  background:linear-gradient(135deg, #00D68F, #0088ff);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.stat-label{ font-size:0.68rem; color:#88aa88; text-transform:uppercase; letter-spacing:0.12em; font-weight:700; }

/* ═══════════ EMPTY ═══════════ */
.empty-state{
  text-align:center; padding:32px 24px 12px;
}
.empty-state .empty-icon{ font-size:3rem; display:block; margin-bottom:10px; }
.empty-state h3{ font-size:1.2rem; font-weight:800; }
.empty-state p{ font-size:0.88rem; color:#558866; line-height:1.5; margin-top:6px; }

/* ═══════════ DIFFICULTY ═══════════ */
.diff-group{ padding:0 16px; max-width:600px; margin:0 auto 4px; }
.diff-label{
  font-size:0.72rem; font-weight:800; text-transform:uppercase; letter-spacing:0.12em;
  padding:18px 6px 8px; display:flex; align-items:center; gap:8px;
}
.diff-label.beginner{ color:#00b870; }
.diff-label.intermediate{ color:#0088ff; }
.diff-label.advanced{ color:#ff6b35; }

/* ═══════════ CARDS ═══════════ */
.template-grid{ display:flex; flex-direction:column; gap:10px; }
.template-card{
  background:#fff; border-radius:18px; padding:20px;
  box-shadow:0 2px 12px rgba(0,38,16,0.04); transition:all 0.2s;
  position:relative; overflow:hidden;
}
.template-card::before{ content:''; position:absolute; top:0; left:0; right:0; height:4px; }
.template-card.beginner::before{ background:#00D68F; }
.template-card.intermediate::before{ background:#0088ff; }
.template-card.advanced::before{ background:#ff6b35; }
.template-card:active{ transform:scale(0.985); }
@media(hover:hover){ .template-card:hover{ box-shadow:0 4px 20px rgba(0,38,16,0.08); } }

.tc-header{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.tc-badge{
  font-size:0.64rem; padding:3px 10px; border-radius:20px; font-weight:700;
  text-transform:uppercase; letter-spacing:0.06em;
}
.tc-badge.beginner{ background:rgba(0,214,143,0.1); color:#00b870; }
.tc-badge.intermediate{ background:rgba(0,136,255,0.1); color:#0088ff; }
.tc-badge.advanced{ background:rgba(255,107,53,0.1); color:#ff6b35; }
.tc-source{ font-size:0.68rem; color:#aaccaa; margin-left:auto; font-weight:500; }
.template-card h3{ font-size:1.1rem; font-weight:800; letter-spacing:-0.02em; margin-bottom:4px; }
.tc-desc{ font-size:0.84rem; color:#558866; line-height:1.5; margin-bottom:14px; }
.tc-meta{ display:flex; align-items:center; gap:12px; font-size:0.74rem; color:#88aa88; margin-bottom:12px; font-weight:600; }
.tc-days-list{ display:flex; flex-direction:column; gap:5px; }

/* ═══════════ BUTTONS ═══════════ */
.btn{
  display:flex; align-items:center; justify-content:center;
  width:100%; padding:13px 20px; border-radius:16px; border:none;
  font-size:0.9rem; font-weight:600; cursor:pointer;
  background:#f0f5ee; color:#558866;
  transition:all 0.15s; font-family:inherit; min-height:48px;
  -webkit-tap-highlight-color:transparent;
}
.btn:active{ transform:scale(0.975); }
.btn-primary{ background:linear-gradient(135deg, #00D68F, #00b870); color:#fff; font-weight:700; }
.btn-start{
  padding:10px 14px; font-size:0.84rem; text-align:left; justify-content:flex-start;
  background:#f5f9f3; border-radius:14px; min-height:44px; color:#002610; font-weight:500;
}
.btn-start:active{ background:rgba(0,214,143,0.1); color:#00b870; }
.btn-giant{ padding:17px; font-size:1.05rem; margin-top:18px; }
.btn-finish{ background:linear-gradient(135deg, #0088ff, #0066cc); color:#fff; font-weight:700; }
.btn-sm{
  padding:9px 14px; border-radius:12px; border:1.5px solid #d0ddcc;
  background:#f5f9f3; color:#558866; font-size:0.86rem; font-weight:600;
  cursor:pointer; min-width:44px; font-family:inherit;
}
.btn-sm:active{ background:rgba(0,214,143,0.1); border-color:#00D68F; color:#00b870; }

/* ═══════════ NAV ═══════════ */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0; display:flex;
  background:rgba(255,255,255,0.92); border-top:1px solid #e8efe4;
  padding:6px 8px; padding-bottom:max(6px, env(safe-area-inset-bottom));
  z-index:100; backdrop-filter:blur(12px);
}
.nav-btn{
  flex:1; padding:12px 8px; border:none; background:none; color:#88aa88;
  font-size:0.8rem; font-weight:600; cursor:pointer; border-radius:14px;
  font-family:inherit; min-height:44px;
}
.nav-btn:active,.nav-btn.active{ color:#00b870; background:rgba(0,214,143,0.06); }

/* ═══════════ WORKOUT ═══════════ */
.workout-header{
  display:flex; align-items:center; padding:14px 20px;
  background:rgba(255,255,255,0.92); border-bottom:1px solid #e8efe4;
  position:sticky; top:0; z-index:50; backdrop-filter:blur(12px);
}
.btn-back{ background:none; border:none; color:#88aa88; font-size:1.3rem; cursor:pointer; padding:8px 12px 8px 0; }
.wh-info{ flex:1; margin-left:4px; min-width:0; }
.wh-template{ display:block; font-size:0.74rem; color:#88aa88; font-weight:600; }
.wh-focus{ font-size:1.05rem; font-weight:700; color:#002610; }
.wh-progress{ font-size:1.05rem; font-weight:700; color:#00b870; margin-left:12px; }

/* ═══════════ EXERCISE ═══════════ */
.exercise-card{ padding:20px; max-width:520px; margin:0 auto; }
.ex-gif{ width:100%; border-radius:18px; margin-bottom:18px; background:#f0f5ee; }
.ex-name{ font-size:1.6rem; font-weight:900; letter-spacing:-0.04em; margin-bottom:6px; }
.ex-equip{ font-size:0.84rem; color:#88aa88; margin-bottom:22px; font-weight:500; }
.sets-tracker{ display:flex; gap:10px; margin-bottom:26px; justify-content:center; }
.set-dot{
  width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  font-size:0.92rem; font-weight:700; background:#f0f5ee; color:#88aa88;
  border:2px solid transparent; transition:all 0.2s;
}
.set-dot.done{ background:rgba(0,214,143,0.1); color:#00b870; border-color:#00D68F; }
.set-dot.current{ background:rgba(0,136,255,0.08); color:#0088ff; border-color:#0088ff; box-shadow:0 0 0 4px rgba(0,136,255,0.1); }
.input-group{ margin-bottom:22px; }
.input-row{ display:flex; align-items:center; margin-bottom:12px; gap:6px; }
.input-label{ width:56px; font-size:0.84rem; color:#558866; font-weight:600; }
.btn-group{ display:flex; gap:4px; flex:1; }
.num-input{
  width:78px; padding:12px 8px; border-radius:14px; border:2px solid #d0ddcc;
  background:#fff; color:#002610; font-size:1.3rem; text-align:center;
  font-weight:800; font-family:inherit; letter-spacing:-0.02em;
}
.num-input:focus{ outline:none; border-color:#00D68F; box-shadow:0 0 0 4px rgba(0,214,143,0.1); }
.unit{ font-size:0.76rem; color:#88aa88; width:36px; text-align:center; font-weight:600; }
.set-complete{ text-align:center; padding:22px; color:#00b870; font-size:1.2rem; font-weight:700; }

/* ═══════════ REST ═══════════ */
.rest-overlay{
  position:fixed; inset:0; background:rgba(250,253,248,0.97);
  display:flex; align-items:center; justify-content:center; z-index:200;
}
.rest-card{ text-align:center; }
.rest-label{ color:#88aa88; font-size:0.92rem; text-transform:uppercase; letter-spacing:0.18em; font-weight:700; }
.rest-timer{
  font-size:7rem; font-weight:900; letter-spacing:-0.06em; line-height:1;
  background:linear-gradient(135deg, #00D68F, #0088ff);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  margin:28px 0;
}

/* ═══════════ RESULT ═══════════ */
.result-card{ max-width:480px; margin:0 auto; padding:48px 24px; text-align:center; }
.result-badge{
  display:inline-block; font-size:0.86rem; font-weight:700; color:#00b870;
  background:rgba(0,214,143,0.1); padding:6px 20px; border-radius:20px; margin-bottom:16px;
}
.result-title{ font-size:1.8rem; font-weight:900; letter-spacing:-0.04em; }
.result-meta{ color:#558866; font-size:0.88rem; margin-bottom:32px; }
.result-stats{
  display:flex; justify-content:center; gap:40px; margin-bottom:32px; padding:26px;
  background:#fff; border-radius:20px; box-shadow:0 2px 12px rgba(0,38,16,0.04);
}
.rstat{ text-align:center; }
.rval{ display:block; font-size:2.2rem; font-weight:900; letter-spacing:-0.04em; color:#002610; }
.rval.lit{
  background:linear-gradient(135deg, #00D68F, #0088ff);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.rlab{ font-size:0.7rem; color:#88aa88; text-transform:uppercase; letter-spacing:0.1em; font-weight:700; }
.result-exercises{ text-align:left; margin-bottom:28px; }
.re-item{ display:flex; justify-content:space-between; padding:15px 0; border-bottom:1px solid #e8efe4; }
.re-name{ font-size:0.92rem; font-weight:700; }
.re-sets{ font-size:0.86rem; color:#558866; font-weight:500; }
.result-actions{ display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.result-footer{ font-size:0.72rem; color:#aaccaa; margin-top:12px; }

/* ═══════════ STATES ═══════════ */
.error-banner{
  background:rgba(255,107,53,0.06); border:1px solid rgba(255,107,53,0.15);
  border-radius:16px; padding:12px 16px; margin:12px 16px; font-size:0.84rem; color:#ff6b35;
  display:flex; align-items:center; gap:8px;
}
.offline-indicator{
  position:fixed; top:0; left:0; right:0; text-align:center;
  background:#002610; color:#fff; padding:8px; font-size:0.74rem; font-weight:600; z-index:999;
}

/* ═══════════ SKELETON ═══════════ */
.skeleton{
  background:linear-gradient(90deg, #e8efe4 25%, #dce8d8 50%, #e8efe4 75%);
  background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:12px;
}
@keyframes shimmer{ 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-text{ height:1rem; margin-bottom:8px; }
.skeleton-text.short{ width:60%; }
.skeleton-heading{ height:1.6rem; width:50%; margin-bottom:14px; }
.skeleton-card{ height:110px; margin-bottom:10px; }
.skeleton-loader{ max-width:480px; margin:0 auto; padding:40px 20px; }

/* ═══════════ FOOTER ═══════════ */
.app-footer{
  text-align:center; padding:28px 20px 100px;
  font-size:0.7rem; color:#aaccaa; font-weight:500;
}
.app-footer a{ color:#88aa88; text-decoration:none; }

@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.5} }
@keyframes fadeInUp{ from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0.01ms!important}}
.loading{ display:flex; align-items:center; justify-content:center; height:100vh; color:#88aa88; font-size:0.88rem; }
.loading::after{ content:''; width:8px; height:8px; border-radius:50%; background:#00D68F; margin-left:8px; animation:pulse 1s infinite; }
