*{
  margin:0;
  padding:0;
  box-sizing:border-box;

  -webkit-user-select:none;
  user-select:none;
}

body{

  background:#000;
  color:white;

  font-family:-apple-system,BlinkMacSystemFont,sans-serif;

  overflow:hidden;
}

/* =========================
   BACKGROUND VIDEO
========================= */

#bg-video{

  position:fixed;

  top:0;
  left:0;

  width:100vw;
  height:100vh;

  object-fit:cover;

  z-index:-10;

  opacity:0.7;

  filter:
    blur(10px)
    brightness(0.7);

  pointer-events:none;
}

.overlay{

  position:fixed;

  inset:0;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.15),
      rgba(0,0,0,0.68)
    );

  z-index:-9;

  pointer-events:none;
}

.overlay{

  position:fixed;

  inset:0;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.2),
      rgba(0,0,0,0.65)
    );

  z-index:-1;
}

.app{

  height:100vh;

  display:flex;
  flex-direction:column;
}

.page{

  flex:1;

  overflow-y:auto;

  padding:
    28px
    20px
    120px;

  display:none;
}

.page.active{
  display:block;
}

.hero-score{

  margin-top:20px;

  text-align:center;
}

.score-label{

  opacity:0.7;

  font-size:18px;
}

/* =========================
   SCORE GLOW
========================= */

.hero-score{

  position:relative;

  display:flex;
  flex-direction:column;

  align-items:center;
  justify-content:center;
}

.score-ring{

  position:absolute;

  width:180px;
  height:180px;

  border-radius:50%;

  background:

    radial-gradient(
      circle,
      rgba(255,69,58,.22),
      transparent 70%
    );

  filter:blur(10px);

  animation:
    rotateGlow 10s linear infinite,
    pulseGlow 3s ease-in-out infinite;

  z-index:-1;
}

@keyframes rotateGlow{

  from{
    transform:rotate(0deg);
  }

  to{
    transform:rotate(360deg);
  }
}

@keyframes pulseGlow{

  0%{
    opacity:.5;
    scale:.95;
  }

  50%{
    opacity:1;
    scale:1.05;
  }

  100%{
    opacity:.5;
    scale:.95;
  }
}

.score-main{

  font-size:48px;
  font-weight:800;

  margin-top:6px;
  
  text-shadow:

  0 0 12px
  rgba(255, 237, 193, 0.4),

  0 0 28px
  rgba(255, 41, 30, 0.25);
}

.card{

  background:
    rgba(30, 30, 30, 0.5);

  backdrop-filter:blur(24px);

  border-radius:28px;

  padding:22px;

  margin-top:24px;

  border:

   1px solid
   rgba(255,255,255,.06);

  box-shadow:

   0 8px 32px
   rgba(0,0,0,.28);
}

.score-details{

  display:grid;

  grid-template-columns:
    repeat(2,1fr);

  gap:18px;
}

.mini-score{

  background:#29272789;

  border-radius:18px;

  padding:18px;

  text-align:center;
}

.mini-score span{

  opacity:0.7;

  font-size:14px;
}

.mini-score strong{

  display:block;

  margin-top:8px;

  font-size:30px;
}

.boost strong{

  color:#ff453a;

  animation:pulse 1.5s infinite;
}

@keyframes pulse{

  0%{
    opacity:0.6;
  }

  50%{
    opacity:1;
  }

  100%{
    opacity:0.6;
  }
}

.graph-card{

  height:300px;

  overflow:hidden;

  padding:18px;
}

.graph-wrapper{

  width:100%;
  height:100%;

  overflow:hidden;

  position:relative;
}

.graph-slider{

  display:flex;

  width:100%;
  height:100%;

  transition:.35s ease;
}

.graph-page{

  min-width:100%;
  height:100%;

  flex-shrink:0;

  display:flex;
  flex-direction:column;
}

.graph-title{

  text-align:center;

  font-size:15px;
  font-weight:700;

  margin-bottom:8px;

  opacity:.9;
}

#graphUpper,
#graphLower{

  width:100%;
  flex:1;

  display:block;
}

.exercise-row{

  display:flex;

  justify-content:space-between;
  align-items:center;

  margin:22px 0;
}

.exercise-left{

  display:flex;

  align-items:center;

  gap:14px;
}

/* =========================
   EXERCISE ICONS
========================= */

.exercise-left img{

  width:42px;
  height:42px;

  border-radius:12px;

  object-fit:cover;

  flex-shrink:0;

  display:block;
}

.controls{

  display:flex;

  align-items:center;

  gap:12px;
}

.controls span{

  width:42px;

  text-align:center;
}

button{

  border:none;

  background:#29272789;

  color:white;

  transition:0.15s;
}

button:active{
  transform:scale(0.93);
}

.controls button{

  width:42px;
  height:42px;

  border-radius:12px;

  font-size:22px;
}

canvas{
  touch-action:none;
}

.tabbar{

  position:fixed;

  left:50%;
  bottom:18px;

  transform:translateX(-50%);

  width:92%;

  max-width:430px;

  height:78px;

  background:
    rgba(255,255,255,0.12);

  backdrop-filter:blur(20px);

  border-radius:28px;

  display:flex;

  justify-content:space-around;
  align-items:center;
}

.tab{

  width:58px;
  height:58px;

  border-radius:18px;

  background:transparent;
}

/* =========================
   TABBAR ICONS
========================= */

.tab{

  width:58px;
  height:58px;

  border-radius:18px;

  overflow:hidden;

  padding:0;

  background:transparent;
}

.tab img{

  width:100%;
  height:100%;

  object-fit:cover;

  border-radius:18px;

  display:block;
}

.tab.active{

  background:
    rgba(255,255,255,0.14);

  box-shadow:
    0 0 24px
    rgba(255,255,255,0.22);

  pointer-events:none;
}

.actions{

  display:flex;

  gap:12px;

  margin-top:24px;
}

.actions button{

  flex:1;

  height:52px;

  border-radius:16px;

  font-size:16px;
}

.save{

  background:#ff453a;
}

h2{

  margin-bottom:18px;
}
/* =========================
   FULL PAGE
========================= */

.page{

  min-height:100vh;

  display:none;

  flex-direction:column;
}

.page.active{
  display:flex;
}

/* =========================
   TITLES
========================= */

.page-title{

  font-size:36px;
  font-weight:800;

  margin-bottom:22px;

  text-align: center;
  width: 100%;
}

/* =========================
   FOLLOW MOBILE PERFECT
========================= */

.follow-row{

  display:grid;

  grid-template-columns:

    minmax(68px,1fr)

    30px
    34px
    30px

    38px

    30px
    34px
    30px;

  align-items:center;

  gap:4px;

  margin:14px 0;

  width:100%;
}

.follow-row > span:first-child{

  font-size:13px;
  font-weight:600;

  white-space:nowrap;

  overflow:hidden;

  text-overflow:ellipsis;

  text-align: left;

  padding-left:2px;
}

/* boutons */

.follow-row button{

  width:30px;
  height:30px;

  border-radius:9px;

  font-size:16px;

  padding:0;
}

/* valeurs */

.follow-row span{

  text-align:center;

  font-size:13px;
}

/* lest / vit */

.follow-label{

  font-size:11px !important;

  opacity:.7;

  font-weight:500;

  text-align:center;
}

/* =========================
   RED BOOST
========================= */

.red-text{

  color:#ff453a;

  animation:redPulse 1.5s infinite;
}

@keyframes redPulse{

  0%{
    opacity:0.55;
  }

  50%{
    opacity:1;
  }

  100%{
    opacity:0.55;
  }
}

/* =========================
   SCORE DETAILS FIX
========================= */

.mini-score{

  min-width:0;

  overflow:hidden;
}

.mini-score strong{

  display:block;

  margin-top:8px;

  font-size:14px;

  line-height:1.1;

  overflow:hidden;

  text-overflow:ellipsis;

  white-space:nowrap;
}

/* =========================
   HISTORY POPUP
========================= */

.history-popup{

  position:fixed;

  inset:0;

  background:
    rgba(0,0,0,0.72);

  backdrop-filter:blur(14px);

  display:none;

  justify-content:center;
  align-items:center;

  z-index:999;
}

.history-popup.active{

  display:flex;
}

.history-card{

  width:90%;
  max-width:420px;

  max-height:80vh;

  overflow-y:auto;

  background:#1c1c1e;

  border-radius:28px;

  padding:24px;

  position:relative;
}

.close-history{

  position:absolute;

  top:16px;
  right:16px;

  width:42px;
  height:42px;

  border-radius:50%;

  background:
    rgba(255,255,255,0.14);

  backdrop-filter:blur(8px);

  font-size:18px;
}

.history-item{

  padding:14px;

  border-radius:16px;

  background:
    rgba(255,255,255,0.05);

  margin-top:14px;

  display:flex;

  justify-content:space-between;

  gap:12px;
}

.history-delete{

  width:38px;
  height:38px;

  border-radius:12px;

  background:#ff453a;
}

/* =========================
   FOLLOW TITLES
========================= */

.follow-title{

  font-size:24px;
  font-weight:700;

  margin-bottom:18px;
}

.lower-card{

  margin-top:22px;
}

.graph-wrapper{

  touch-action:pan-y;

  -webkit-overflow-scrolling:touch;
}

.graph-slider{

  will-change:transform;
}