/* ============================================================
   phone.css — ماکت گوشی، حلقه‌های پیشرفت، نمودار هفتگی
   ============================================================ */

.phone-wrap {
  position: relative;
  z-index: 3;
  animation: phone-float 9s var(--ease-io) infinite;
  will-change: transform;
}
@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotate(0.4deg); }
  50% { transform: translateY(-14px) rotate(-0.4deg); }
}

.phone {
  position: relative;
  width: 306px;
  padding: 10px;
  border-radius: 48px;
  background:
    linear-gradient(160deg, #2a322c 0%, #121713 38%, #0b0f0c 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.09),
    0 2px 0 rgba(255,255,255,.14) inset,
    0 60px 120px -40px rgba(0,0,0,.9),
    0 0 80px -20px rgba(198,255,61,.18);
  transform-style: preserve-3d;
  transition: transform var(--dur-3) var(--ease-out);
}
.phone::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 44px;
  border: 1px solid rgba(255,255,255,.07);
  pointer-events: none;
}

.phone__screen {
  position: relative;
  height: 604px;
  border-radius: 38px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #16201a 0%, #0a0e0c 52%, #080b09 100%);
  display: flex;
  flex-direction: column;
  padding: 12px 15px 10px;
  direction: rtl;
}

.phone__notch {
  position: absolute;
  inset-block-start: 9px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 92px;
  height: 22px;
  border-radius: 99px;
  background: #050706;
  z-index: 5;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05) inset;
}
.phone__notch::after {
  content: "";
  position: absolute;
  inset-block-start: 7px;
  inset-inline-start: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16211a;
  box-shadow: 0 0 6px rgba(198,255,61,.35);
}

.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
  color: var(--muted);
  padding: 2px 4px 0;
  letter-spacing: .02em;
}
.phone__status b { color: var(--ink); font-weight: 700; }
.phone__status .pills { display: flex; gap: 3px; }
.phone__status .pills i {
  width: 12px; height: 6px; border-radius: 2px;
  background: rgba(255,255,255,.32);
}
.phone__status .pills i:first-child { width: 6px; border-radius: 50%; height: 6px; }

.phone__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-start: 20px;
  padding-inline: 4px;
}
.phone__hello { font-size: 0.95rem; font-weight: 800; }
.phone__hello small {
  display: block;
  font-size: 0.6rem;
  color: var(--dim);
  font-weight: 500;
  margin-block-start: 2px;
}
.phone__avatar {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--volt), #6da30c);
  display: grid; place-items: center;
  color: var(--volt-ink);
  font-weight: 900;
  font-size: .8rem;
  box-shadow: 0 6px 18px -6px var(--volt-glow);
}

/* ---- rings ---- */
.phone__rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-block-start: 18px;
  padding: 14px 8px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
}
.ring { text-align: center; }
.ring__svg { width: 66px; height: 66px; margin-inline: auto; position: relative; }
.ring__svg svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 5; }
.ring__bar {
  fill: none;
  stroke: var(--ring-color, var(--volt));
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--ring-color, var(--volt)) 55%, transparent));
  transition: stroke-dashoffset 1.6s var(--ease-out);
}
.ring__val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 800;
  direction: ltr;
}
.ring__val small { font-size: .48rem; color: var(--dim); font-weight: 600; margin-inline-start: 1px; }
.ring__label { font-size: .55rem; color: var(--dim); margin-block-start: 5px; }

/* ---- weekly chart ---- */
.phone__chart {
  margin-block-start: 12px;
  padding: 12px 14px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.028);
  border: 1px solid rgba(255,255,255,.055);
}
.phone__chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .58rem;
  color: var(--dim);
}
.phone__chart-head b { color: var(--ink); font-size: .66rem; }
.phone__bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
  margin-block-start: 8px;
}
.phone__bars i {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, rgba(198,255,61,.22), rgba(198,255,61,.75));
  transform-origin: bottom;
  animation: bar-grow 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 500ms);
}
.phone__bars i.is-hot { background: linear-gradient(to top, rgba(198,255,61,.35), var(--volt)); }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---- workout rows ---- */
.phone__list {
  margin-block-start: 12px;
  display: grid;
  gap: 7px;
}
.phone__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.055);
  font-size: .64rem;
}
.phone__row .ic {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(198,255,61,.1);
  color: var(--volt);
  flex: none;
  font-size: .6rem;
}
.phone__row .txt { display: flex; flex-direction: column; line-height: 1.35; }
.phone__row .txt b { font-weight: 700; font-size: .66rem; }
.phone__row .txt span { color: var(--dim); font-size: .55rem; }
.phone__row .done {
  margin-inline-start: auto;
  color: var(--volt);
  font-size: .7rem;
}
.phone__row .pending {
  margin-inline-start: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.22);
}

/* ---- tabbar ---- */
.phone__tabs {
  margin-block-start: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px 4px 4px;
  border-block-start: 1px solid rgba(255,255,255,.06);
  color: var(--dim);
  font-size: .5rem;
  text-align: center;
}
.phone__tabs span { display: grid; gap: 3px; place-items: center; }
.phone__tabs span.on { color: var(--volt); }
.phone__tabs i {
  width: 15px; height: 15px;
  border-radius: 5px;
  border: 1.5px solid currentColor;
  opacity: .8;
}
.phone__tabs span.on i { background: currentColor; }

@media (max-width: 420px) {
  .phone { width: 280px; }
  .phone__screen { height: 560px; }
  .ring__svg { width: 58px; height: 58px; }
}
