:root {
  --white: #ffffff;
  --white-glow: 0 0 24px rgba(255,255,255,0.6), 0 0 60px rgba(255,255,255,0.15);
  --white-dim: rgba(255,255,255,0.45);
  --glass-border: rgba(255,255,255,0.12);
  --glass-border-bright: rgba(255,255,255,0.3);
  --text-primary: rgba(255,255,255,0.95);
  --text-dim: rgba(255,255,255,0.38);
  --bg: #0000;
  /*#060a0c;*/
  --red: #ff4d6a;
  --blue: #7ab8ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  font-size: 18px;
}

/* ─── FULLSCREEN MIRROR ─── */
.mirror-frame {
  position: fixed;
  inset: 0;
  /* background: linear-gradient(155deg, rgba(14,20,26,0.97) 0%, rgba(6,10,14,1) 100%);*/
  background-color: #000;
  overflow: hidden;
  z-index: 1;
}

/* Center body ambient glow */
.mirror-frame::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 78%;
  background: radial-gradient(ellipse at 50% 75%, rgba(255,255,255,0.045), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

/* ─── GLASS PANEL BASE ─── */
.panel {
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  background: rgba(255,255,255,0.042);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 18px 22px;
  animation: fadeInUp 0.7s ease both;
}


@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── PANEL TITLE ─── */
.panel-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem; /* العناوين لازم تكون واضحة */
  letter-spacing: 3px;  
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.vitals-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.vital-item { display: flex; flex-direction: column; }

.vital-value {
  font-family: 'Orbitron', monospace;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: var(--white-glow);
}

.vital-value.red-val {
  color: var(--red);
  text-shadow: 0 0 22px rgba(255,77,106,0.65);
}

.vital-label {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.vital-unit {
  font-size: 12px;
  font-family: 'Rajdhani', sans-serif;
  color: var(--text-dim);
  align-self: flex-end;
  margin-bottom: 12px;
}

.v-sep {
  width: 1px; height: 48px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
}

.chart-label {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sparkline { height: 52px; width: 100%; }
.sparkline svg { width: 100%; height: 100%; }

.chart-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.chart-axis span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: rgba(255,255,255,0.18);
}

.hr-line {
  stroke-dasharray: 450;
  stroke-dashoffset: 450;
  animation: drawHR 2.8s 0.5s ease both;
}
@keyframes drawHR { to { stroke-dashoffset: 0; } }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ─── EXERCISE TAG — center ─── */
.reps-label-text {
  font-family: 'Orbitron', monospace;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 700;
  color: var(--white-dim);
  letter-spacing: 3px;
}

.reps-number {
  font-family: 'Orbitron', monospace;
  font-size: clamp(70px, 7vw, 96px);
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  text-shadow: var(--white-glow);
  letter-spacing: -4px;
  animation: countUp 0.3s ease;
}

@keyframes countUp {
  from { opacity: 0.4; transform: scale(1.06); }
  to   { opacity: 1;   transform: scale(1); }
}

.set-info {
  display: flex;
  gap: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.set-item { display: flex; flex-direction: column; }

.set-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  color: var(--white);
}

.set-lbl {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.feedback-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 0 16px rgba(255,255,255,0.1);
}

.feedback-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  line-height: 1.65;
}

.feedback-text strong {
  color: var(--white);
  display: block;
  font-size: 13px;
  font-family: 'Orbitron', monospace;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-shadow: 0 0 16px rgba(255,255,255,0.55);
}

/* ─── GOAL RING — bottom left ─── */
.ring-container {
  position: relative;
  width: 78px; height: 78px;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 5;
}

.ring-fill {
  fill: none;
  stroke: var(--white);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 88;
  filter: drop-shadow(0 0 7px rgba(255,255,255,0.75));
  animation: ringFill 2.4s ease both;
}

@keyframes ringFill {
  from { stroke-dashoffset: 220; }
  to   { stroke-dashoffset: 88; }
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-pct {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  text-shadow: var(--white-glow);
}

.ring-sub {
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

.goal-info .goal-title {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.goal-info .goal-stat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}

.goal-info .goal-stat span {
  color: var(--white);
  text-shadow: 0 0 12px rgba(255,255,255,0.55);
}

/* ─── DURATION — bottom center ─── */
.dur-label {
  
  font-family: 'Orbitron', monospace;
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.dur-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 26px;
  color: var(--white);
  text-shadow: var(--white-glow);
  letter-spacing: 3px;
}

/* ─── CALORIES — bottom right ─── */
.cals-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.cals-value {
  font-family: 'Orbitron', monospace;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 900;
  color: var(--red);
  text-shadow: 0 0 28px rgba(255,77,106,0.55);
  line-height: 1;
  letter-spacing: -2px;
}

.cals-unit {
  font-size: 14px;
  color: var(--text-dim);
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 1px;
}

.cals-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.cals-bar-fill {
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, var(--red), #ff8c69);
  border-radius: 2px;
  animation: barFill 1.9s ease both;
  box-shadow: 0 0 12px rgba(255,77,106,0.55);
}

@keyframes barFill {
  from { width: 0; }
  to   { width: 65%; }
}


/* ─── SKELETON TRACKING ─── */
.skeleton-overlay {
  display: none !important; /* To hide the the fixed overlay by default */
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(120px, 12vw, 170px);
  height: clamp(360px, 52vh, 520px);
  z-index: 3;
  pointer-events: none;
  animation: squat 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
#skeletonCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

@keyframes squat {
  0%, 100% { transform: translateX(-50%) scaleY(1) translateY(0); }
  50%       { transform: translateX(-50%) scaleY(0.93) translateY(14px); }
}

.skel-svg { width: 100%; height: 100%; }

.skel-line {
  stroke: rgba(255,255,255,0.38);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 250;
  stroke-dashoffset: 250;
  animation: drawLine 1s ease forwards;
}

.skel-dot {
  fill: var(--white);
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.95));
  animation: popIn 0.35s ease both;
}

@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes popIn    { from { opacity: 0; } to { opacity: 1; } }

.skel-line:nth-child(1)  { animation-delay: 0.08s; }
.skel-line:nth-child(2)  { animation-delay: 0.16s; }
.skel-line:nth-child(3)  { animation-delay: 0.24s; }
.skel-line:nth-child(4)  { animation-delay: 0.32s; }
.skel-line:nth-child(5)  { animation-delay: 0.40s; }
.skel-line:nth-child(6)  { animation-delay: 0.50s; }
.skel-line:nth-child(7)  { animation-delay: 0.58s; }
.skel-dot:nth-child(8)   { animation-delay: 0.12s; }
.skel-dot:nth-child(9)   { animation-delay: 0.20s; }
.skel-dot:nth-child(10)  { animation-delay: 0.28s; }
.skel-dot:nth-child(11)  { animation-delay: 0.36s; }
.skel-dot:nth-child(12)  { animation-delay: 0.44s; }
.skel-dot:nth-child(13)  { animation-delay: 0.52s; }
.skel-dot:nth-child(14)  { animation-delay: 0.60s; }
.skel-dot:nth-child(15)  { animation-delay: 0.68s; }
.skel-dot:nth-child(16)  { animation-delay: 0.76s; }

/* ─── SCANLINES ─── */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.022) 2px, rgba(0,0,0,0.022) 4px
  );
  pointer-events: none;
  z-index: 20;
}

.user-name{
  position: absolute;
  left: 43%;
  top:35%;
}
.user-name h1{
  color: white;
}
.user-name h2{
  color: white;
}
.control{
  
  width: 80px;
  height: 50px;
   display: flex;
    align-items: center;
    gap: 15px;
}
.exercises-menu {
    width: 320px;        
    height: 65px;        
    font-size: 38px;     
    padding: 8px 12px;
    border-radius: 10px;
    position: absolute;
    right: 40%;
    background-color: #000;
    color: #ffffff;
    font-weight: bolder;
}


.exercises-menu option {
    font-size: 18px;
    padding: 10px;
    font-size: 38px;     
    font-weight: bolder;
}

.exercise-controls {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;

    z-index: 5;
}
.exercise-tag {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 30px;
  padding: 7px 26px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--white);
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 36px rgba(255,255,255,0.07), inset 0 1px 0 rgba(255,255,255,0.14);
  animation: fadeInUp 0.7s 0.55s ease both;
}
