:root {
  --bg: #0b0d12;
  --bg-2: #11141c;
  --card: rgba(22, 26, 36, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e9edf5;
  --muted: #8a93a6;
  --accent: #ff6b35;
  --accent-2: #ffb347;
  --accent-grad: linear-gradient(135deg, #ff6b35 0%, #ffb347 100%);
  --ring: rgba(255, 107, 53, 0.35);
  --green: #3ddc97;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.orb-1 { width: 520px; height: 520px; background: #ff6b35; top: -180px; left: -120px; }
.orb-2 { width: 480px; height: 480px; background: #6a5bff; bottom: -160px; right: -120px; opacity: 0.45;}
.orb-3 { width: 360px; height: 360px; background: #3ddc97; top: 40%; left: 55%; opacity: 0.22; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.shell > .card,
.shell > .metrics,
.shell > .split { margin-bottom: 20px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.split-col { margin-bottom: 0; }
.split .card-head { margin-bottom: 18px; }

.result-col { position: sticky; top: 20px; }

.burn-form { display: flex; flex-direction: column; gap: 16px; }
.burn-form .field.full { grid-column: auto; }

.result-empty.hidden { display: none; }
.result-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.empty-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
  filter: grayscale(0.3);
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-sub { font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .result-col { position: static; }
}

.lang-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  backdrop-filter: blur(12px);
}
.lang-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all .2s ease;
}
.lang-btn.active {
  background: var(--accent-grad);
  color: #1a0e06;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.hero { text-align: center; margin-bottom: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.25);
  color: var(--accent-2);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  margin: 18px 0 12px;
  letter-spacing: -0.02em;
}
.hero .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.metrics {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(106, 91, 255, 0.08));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: pop .35s cubic-bezier(.2, .9, .3, 1.2);
}
.metrics.hidden { display: none; }

.metrics-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.metrics-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.metrics-sub {
  font-size: 13px;
  color: var(--muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.metric {
  position: relative;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent-grad);
  opacity: 0.85;
}
.metric-maintain::before { background: linear-gradient(180deg, #6a5bff, #3ddc97); }
.metric-lose::before,
.metric-lose-fast::before { background: linear-gradient(180deg, #3ddc97, #2ab887); }
.metric-gain::before,
.metric-gain-fast::before { background: linear-gradient(180deg, #ff6b35, #ffb347); }
.metric-rest::before { background: linear-gradient(180deg, #8a93a6, #4f5668); }

.metric-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric-value em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.metric-hint {
  font-size: 12px;
  color: #6c7487;
}

@media (max-width: 720px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 22px; }
}
@media (max-width: 460px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.card-head h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.unit-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.unit-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.unit-btn.active {
  background: var(--accent-grad);
  color: #1a0e06;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field > span, .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.field em { font-style: normal; color: #6c7487; font-weight: 500; }

input[type="number"], select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: rgba(255, 107, 53, 0.6);
  box-shadow: 0 0 0 4px var(--ring);
  background: rgba(255, 255, 255, 0.06);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a93a6' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.slider-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.5);
  cursor: pointer;
  border: 3px solid #1a0e06;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #ff6b35;
  cursor: pointer;
  border: 3px solid #1a0e06;
}
#minutesOut {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-2);
  min-width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.activities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.activities::-webkit-scrollbar { width: 8px; }
.activities::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.activities::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }
.activity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: all .18s ease;
  text-align: left;
  min-height: 56px;
}
.activity:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.activity.selected {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.18), rgba(255, 179, 71, 0.08));
  border-color: rgba(255, 107, 53, 0.55);
  box-shadow: 0 0 0 3px var(--ring);
}
.activity .em {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.activity .nm { flex: 1; }
.activity .met {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(255, 107, 53, 0.12);
  padding: 3px 7px;
  border-radius: 6px;
}

.cta {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--accent-grad);
  color: #1a0e06;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.35);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  margin-top: 8px;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 107, 53, 0.45); }
.cta:active { transform: translateY(0); }
.cta[disabled] { opacity: 0.55; cursor: not-allowed; }

.result {
  animation: pop .35s cubic-bezier(.2, .9, .3, 1.2);
}
.result.hidden { display: none; }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.result-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.result-emoji {
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}
.result-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.result-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.result-big em {
  font-style: normal;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  -webkit-text-fill-color: var(--muted);
}
.result-sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-hint {
  font-size: 11.5px;
  color: #6c7487;
  margin-top: 2px;
}

.equivalents { margin-top: 22px; }
.eq-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.eq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eq-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
}
.eq-pill b { color: var(--accent-2); font-weight: 700; }

.foot {
  margin-top: 28px;
  text-align: center;
  font-size: 12.5px;
  color: #6c7487;
}

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .result-big { font-size: 44px; }
  .result-emoji { font-size: 46px; }
  .card, .result { padding: 22px; }
}
