/* Terrateana — pogledi: danas, vežbe, planovi, trening, statistika */

/* ================= DANAS ================= */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
}
@media (max-width: 380px) { .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.hero .side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero .side .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero .side .kpis .kpi .k { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.hero .side .kpis .kpi .v { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hero .side .kpis .kpi .v small { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-left: 1px; white-space: nowrap; }

.hero .hint {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); font-weight: 550;
}
.hero .hint .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.streak {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border-radius: 100px;
  background: rgba(201, 247, 92, 0.1);
  border: 1px solid rgba(201, 247, 92, 0.22);
  color: var(--accent);
  font-size: 12.5px; font-weight: 700;
}
.streak svg { width: 14px; height: 14px; stroke-width: 2.2; }

.plan-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 74%);
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scroll-snap-type: x mandatory;
}
.plan-cards::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .plan-cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 0; padding: 0; }
}

.plancard {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(201, 247, 92, 0.10), transparent 55%),
    linear-gradient(168deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 0.24s var(--spring), border-color 0.24s;
  animation: rise 0.36s var(--spring) both;
  animation-delay: calc(min(var(--i, 0), 6) * 40ms);
}
.plancard:active { transform: scale(0.98); }
@media (hover: hover) { .plancard:hover { border-color: var(--line-2); transform: translateY(-2px); } }
.plancard .nm { font-size: 16px; font-weight: 690; letter-spacing: -0.02em; }
.plancard .mt { font-size: 12px; color: var(--muted); }
.plancard .go {
  margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; border-radius: 12px;
  background: rgba(201, 247, 92, 0.14);
  color: var(--accent);
  font-size: 13px; font-weight: 700;
  border: 1px solid rgba(201, 247, 92, 0.2);
}
.plancard .go svg { width: 15px; height: 15px; stroke-width: 2.3; }

/* ================= VEŽBE ================= */
.exgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 620px) { .exgrid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .exgrid { grid-template-columns: repeat(4, 1fr); } }

.excard {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 0.22s var(--spring), border-color 0.22s;
  animation: rise 0.44s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
.excard:active { transform: scale(0.975); }
@media (hover: hover) { .excard:hover { border-color: var(--line-2); } }
.excard .ph {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0d0f0e center/cover no-repeat;
  overflow: hidden;
}
.excard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
@media (hover: hover) { .excard:hover .ph img { transform: scale(1.06); } }
.excard .ph .tgt {
  position: absolute; left: 7px; bottom: 7px;
  height: 21px; padding: 0 8px;
  display: inline-flex; align-items: center;
  border-radius: 7px;
  background: rgba(6, 8, 7, 0.72);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: capitalize;
}
.excard .ph .vidbadge {
  position: absolute; right: 7px; top: 7px;
  height: 21px; padding: 0 7px;
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 7px;
  background: rgba(201, 247, 92, 0.9);
  color: #0b1005;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.excard .ph .vidbadge svg { width: 10px; height: 10px; stroke-width: 3; }

.excard .bd { padding: 9px 10px 11px; }
.excard .bd .nm {
  font-size: 12.5px; font-weight: 640; line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.excard .bd .eq { font-size: 10.5px; color: var(--dim); margin-top: 4px; text-transform: capitalize; }

.loadmore { display: grid; place-items: center; padding: 18px 0 6px; }
.loadmore button { font-size: 13px; font-weight: 650; color: var(--accent); }

/* ================= DETALJ VEŽBE ================= */
.exdetail .media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0d0f0e;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.exdetail .media img { width: 100%; height: 100%; object-fit: cover; }
.exdetail .media .play {
  position: absolute; right: 10px; top: 10px;
  height: 26px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px;
  background: rgba(6, 8, 7, 0.7);
  backdrop-filter: blur(10px);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--fg);
}
.exdetail .media .play .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.exdetail h2 { font-size: 21px; font-weight: 720; letter-spacing: -0.03em; line-height: 1.2; margin: 14px 0 8px; }
.exdetail .tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.steps { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.steps li { display: flex; gap: 11px; font-size: 13.5px; line-height: 1.5; color: #d5dbd6; }
.steps li .n {
  flex: 0 0 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(201, 247, 92, 0.12);
  color: var(--accent);
  font-size: 11px; font-weight: 750;
  margin-top: 1px;
}

.metnote {
  display: flex; align-items: center; gap: 9px;
  margin-top: 14px; padding: 11px 13px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed var(--line-2);
  font-size: 12.5px; color: var(--muted);
}
.metnote svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 2; color: var(--accent); }
.metnote b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ================= PLANOVI ================= */
.planitem {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.planitem .idx {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(201, 247, 92, 0.12);
  color: var(--accent);
  font-size: 11.5px; font-weight: 750;
}
.planitem .thumb { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; object-fit: cover; }
.planitem .main { flex: 1; min-width: 0; }
.planitem .main .nm { font-size: 13.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planitem .main .mt { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.planitem .rm { color: var(--dim); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.planitem .rm:active { background: rgba(255, 115, 115, 0.14); color: var(--danger); }
.planitem .rm svg { width: 15px; height: 15px; stroke-width: 2.2; }

.picked {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(201, 247, 92, 0.06);
  border: 1px solid rgba(201, 247, 92, 0.18);
  margin-bottom: 6px;
  animation: rise 0.3s var(--spring) both;
}
.picked .nm { flex: 1; font-size: 13px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked .numset { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.picked input {
  width: 42px; height: 30px; text-align: center;
  border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line); font-size: 13px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* ================= TRENING ================= */
.sess-head {
  position: sticky; top: 0; z-index: 20;
  margin: -14px -16px 14px;
  padding: 12px 16px 12px;
  background: rgba(8, 9, 10, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
@media (min-width: 900px) { .sess-head { margin: -26px -34px 18px; padding: 14px 34px; } }
.sess-head .t { display: flex; flex-direction: column; }
.sess-head .t .lab { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.sess-head .t .clock { font-size: 25px; font-weight: 730; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }

.sessitem { display: flex; flex-direction: column; gap: 11px; }
.sessitem .top { display: flex; align-items: center; gap: 12px; }
.sessitem .top .thumb { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; flex: 0 0 54px; }
.sessitem .top .main { flex: 1; min-width: 0; }
.sessitem .top .main .nm { font-size: 15px; font-weight: 660; letter-spacing: -0.01em; }
.sessitem .top .main .mt { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sessitem .dots { display: flex; gap: 5px; flex-wrap: wrap; }
.sessitem .dots .d {
  width: 100%; height: 5px; flex: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.3s var(--ease), box-shadow 0.3s;
}
.sessitem .dots .d.on { background: var(--accent); box-shadow: 0 0 10px rgba(201, 247, 92, 0.4); }
.sessitem .logged { display: flex; gap: 6px; flex-wrap: wrap; }
.sessitem .logged .l {
  font-size: 11.5px; font-weight: 650;
  font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  animation: rise 0.3s var(--spring) both;
}

.restbar {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + var(--safe) + 12px);
  z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px 9px 10px;
  border-radius: 100px;
  background: rgba(20, 25, 21, 0.95);
  border: 1px solid rgba(201, 247, 92, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.34s var(--spring) both;
}
@media (min-width: 900px) { .restbar { bottom: 26px; } }
.restbar .cd {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(201, 247, 92, 0.14);
  color: var(--accent);
  font-size: 12.5px; font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.restbar .lbl { font-size: 12.5px; font-weight: 620; color: var(--muted); }
.restbar button { margin-left: 4px; color: var(--accent); font-size: 12.5px; font-weight: 700; }

.summary { text-align: center; padding: 6px 0 4px; }
.summary .kcal {
  font-size: 46px; font-weight: 760; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.05;
}
.summary .cap { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-top: 2px; }
.summary .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }

/* ================= STATISTIKA ================= */
.chartcard { padding: 16px 14px 10px; }
.chartcard .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chartcard .head .t { font-size: 13px; font-weight: 680; letter-spacing: -0.01em; }
.chartcard .head .s { font-size: 11.5px; color: var(--dim); font-weight: 600; }

.musc-list { display: flex; flex-direction: column; gap: 9px; }
.musc-list .m { display: flex; align-items: center; gap: 10px; }
.musc-list .m .nm { width: 96px; flex: 0 0 96px; font-size: 12px; font-weight: 620; text-transform: capitalize; color: var(--muted); }
.musc-list .m .bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.musc-list .m .bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  animation: growX 0.7s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes growX { from { transform: scaleX(0); } }
.musc-list .m .v { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg); width: 26px; text-align: right; }

.mggrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .mggrid { grid-template-columns: repeat(4, 1fr); } }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.empty .ico {
  width: 46px; height: 46px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--dim);
}
.empty .ico svg { width: 22px; height: 22px; stroke-width: 1.7; }
.empty b { display: block; color: var(--fg); font-size: 14.5px; margin-bottom: 5px; font-weight: 660; }


/* ================= MIŠIĆI ================= */
.mgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 760px) { .mgrid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1100px) { .mgrid { grid-template-columns: repeat(4, 1fr); } }

.mgcard {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: var(--r-md);
  background: linear-gradient(168deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 0.22s var(--spring), border-color 0.22s;
  animation: rise 0.36s var(--spring) both;
  animation-delay: calc(min(var(--i, 0), 8) * 24ms);
}
.mgcard:active { transform: scale(0.975); }
@media (hover: hover) { .mgcard:hover { border-color: var(--line-2); transform: translateY(-2px); } }
.mgcard .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mgcard .nm { font-size: 15px; font-weight: 690; letter-spacing: -0.02em; }
.mgcard .pct { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.mgcard .pct small { color: var(--dim); font-weight: 600; }
.mgcard .track { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mgcard .track i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  animation: growX 0.6s var(--spring) both;
}
.mgcard .sub { font-size: 11px; color: var(--dim); }

.backrow { margin-bottom: 10px; }

.hero-muscle {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 14px;
  align-items: center;
  padding: 18px;
}
.hero-muscle .hm-label { font-size: 24px; font-weight: 730; letter-spacing: -0.03em; }
.hero-muscle .hm-stats { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.hero-muscle .hm-stats > div { display: flex; flex-direction: column; gap: 2px; }
.hero-muscle .hm-stats .k { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.hero-muscle .hm-stats .v { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-muscle .hm-stats .v small { font-size: 10.5px; color: var(--muted); margin-left: 2px; }
.hero-muscle .hm-sub { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.hero-muscle .hm-map .musclemap { border: 0; background: transparent; padding: 0; gap: 4px; }
.hero-muscle .hm-map svg { max-height: 150px; }

.row-cta { display: flex; gap: 9px; margin: 12px 0 4px; }
.row-cta .btn { flex: 1; }


/* HD video u detalju vežbe */
.exdetail .media.video { aspect-ratio: 16 / 9; background: #050706; }
.exdetail .media.video video { width: 100%; height: 100%; object-fit: cover; }
.sexswitch {
  position: absolute; left: 10px; top: 10px;
  display: inline-flex; padding: 3px; gap: 3px;
  border-radius: 10px;
  background: rgba(6, 8, 7, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sexswitch button {
  height: 24px; padding: 0 10px;
  border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--muted);
  transition: all 0.18s var(--ease);
}
.sexswitch button.on { background: var(--accent); color: var(--accent-ink); }

.ex-summary { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 10px; }

.ex-list { display: flex; flex-direction: column; gap: 8px; }
.ex-list li { display: flex; gap: 9px; font-size: 13px; line-height: 1.5; color: #d5dbd6; }
.ex-list li svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; stroke-width: 2.4; }
.ex-list.cues li svg { color: var(--accent); }
.ex-list.mistakes li svg { color: var(--danger); }

/* BMR/TDEE kartica */
.energy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.energy .stat .v small { color: var(--dim); }
.sexseg { display: inline-flex; gap: 6px; }
