/* ═══════════════════════════════════════════════════════════════
   VOLTLINGO v4 — SCREENS.CSS
   Done screen · Profile screen · Badges · Stats
═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   1. DONE SCREEN
────────────────────────────────────────────────────────────── */
.done-scr {
  align-items: center; justify-content: flex-start;
  padding-top: 32px; padding-left: 20px; padding-right: 20px;
  gap: 16px; text-align: center; background: var(--bg);
}
.done-ring-wrap {
  position: relative; width: 96px; height: 96px; flex-shrink: 0;
  animation: doneRing .55s cubic-bezier(.34,1.6,.64,1) both;
}
.done-ring-wrap svg { width: 96px; height: 96px; }
@keyframes doneRing { from { opacity:0; transform:scale(.35) rotate(-90deg); } }
.done-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--ok);
  animation: fadeIn .4s .5s both;
}
.done-title {
  font-size: 30px; font-weight: 800; letter-spacing: -1.5px;
  animation: fadeUpIn .4s .2s both;
}
.done-title em { font-style: normal; color: var(--ok); }
.done-unit {
  font-family: var(--mono); font-size: 10px; color: var(--t2);
  letter-spacing: .3px; margin-top: -8px;
  animation: fadeIn .4s .3s both;
}
.done-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; width: 100%; max-width: 340px;
}
.dstat {
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r2); padding: 14px 8px;
  animation: statPop .4s cubic-bezier(.34,1.6,.64,1) both;
}
.dstat:nth-child(2) { animation-delay: .07s; }
.dstat:nth-child(3) { animation-delay: .14s; }
@keyframes statPop { from { opacity:0; transform:scale(.65) translateY(10px); } }
.dstat-v { display: block; font-size: 24px; font-weight: 800; letter-spacing: -1px; color: var(--ok); }
.dstat-l { display: block; font-family: var(--mono); font-size: 7.5px; color: var(--t2); letter-spacing: .5px; text-transform: uppercase; margin-top: 3px; }
.done-streak-badge {
  display: flex; align-items: center; gap: 8px;
  animation: popIn .5s cubic-bezier(.34,1.8,.64,1) .4s both;
}
.done-streak-badge span { font-size: 13px; font-weight: 800; color: #FF9500; letter-spacing: -.2px; }
.done-btns {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; max-width: 340px;
  animation: fadeUpIn .4s .5s both;
}

/* ──────────────────────────────────────────────────────────────
   2. PROFILE SCREEN
────────────────────────────────────────────────────────────── */
#scr-profile { background: var(--bg); }
.profile-cover {
  height: 120px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,214,10,.08) 0%, rgba(255,149,0,.04) 50%, rgba(59,130,246,.03) 100%);
  border-bottom: 1px solid var(--line); position: relative;
}
.profile-cover::before {
  content: ''; position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,214,10,.2), transparent);
}
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--yg); border: 3px solid var(--y);
  position: absolute; bottom: -38px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  box-shadow: 0 0 0 4px var(--bg), 0 8px 24px rgba(255,214,10,.2);
  z-index: 10; animation: avatarIn .5s cubic-bezier(.34,1.6,.64,1) .1s both;
}
@keyframes avatarIn { from { transform:translateX(-50%) scale(.4); opacity:0; } }
.profile-info {
  text-align: center; padding: 52px 16px 18px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.profile-info h2 { font-size: 20px; font-weight: 800; letter-spacing: -.5px; animation: fadeUpIn .4s .2s both; }
.profile-info p  { font-family: var(--mono); font-size: 9px; color: var(--t2); margin-top: 5px; text-transform: uppercase; letter-spacing: .5px; animation: fadeIn .4s .3s both; }
.profile-stats-row {
  display: grid; grid-template-columns: repeat(3,1fr);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.pstat { padding: 16px 8px; text-align: center; border-right: 1px solid var(--line); transition: background .15s; }
.pstat:last-child { border: none; }
.pstat:hover { background: var(--bg1); }
.pstat strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -1px; color: var(--y); }
.pstat small  { display: block; font-family: var(--mono); font-size: 8px; color: var(--t2); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

/* Profile section wrapper */
.profile-section { padding: 16px 16px 4px; flex-shrink: 0; }

/* Account card */
.account-card {
  margin: 12px 16px 4px; padding: 13px 15px; border-radius: var(--r2);
  background: var(--bg1); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.account-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--yg);
  border: 1px solid rgba(255,214,10,.25); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.account-info strong { display: block; font-size: 13px; font-weight: 700; }
.account-info small  { font-family: var(--mono); font-size: 9px; color: var(--t2); }
.account-btn {
  margin-left: auto; padding: 7px 13px; border-radius: 9px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; transition: all .15s; border: 1.5px solid;
}
.account-btn.connect { background: var(--yg); color: var(--y); border-color: rgba(255,214,10,.3); }
.account-btn.connect:hover { background: rgba(255,214,10,.15); }
.account-btn.signout { background: var(--bg2); color: var(--t2); border-color: var(--ln2); }
.account-btn.signout:hover { border-color: var(--err); color: var(--err); }

/* ──────────────────────────────────────────────────────────────
   3. BADGES GRID
────────────────────────────────────────────────────────────── */
.badges-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.badge {
  aspect-ratio: 1; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; padding: 8px 6px;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.badge:hover { background: var(--bg3); border-color: var(--ln2); }
.badge.earned {
  background: rgba(255,214,10,.07); border-color: rgba(255,214,10,.22);
  box-shadow: 0 0 14px rgba(255,214,10,.06);
}
.badge.earned:hover { border-color: rgba(255,214,10,.4); }
.badge.earned::before {
  content: ''; position: absolute; top: -40%; left: -40%; width: 50%; height: 180%;
  background: linear-gradient(105deg, transparent, rgba(255,214,10,.12), transparent);
  transform: skewX(-15deg);
  animation: badgeShine 4s ease-in-out infinite;
}
@keyframes badgeShine { 0%,70%,100%{left:-40%;opacity:0} 30%{left:140%;opacity:1} }
.badge svg    { width: 24px; height: 24px; opacity: .22; color: var(--t2); transition: all .2s; }
.badge.earned svg { opacity: 1; color: var(--y); filter: drop-shadow(0 0 4px rgba(255,214,10,.4)); }
.badge span   { font-family: var(--mono); font-size: 7px; font-weight: 700; color: var(--t3); text-align: center; line-height: 1.3; }
.badge.earned span { color: var(--y); }
/* Tooltip */
.badge[title]:hover::after {
  content: attr(title); position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%); background: var(--bg4); border: 1px solid var(--ln2);
  border-radius: var(--r1); padding: 5px 9px; font-family: var(--mono); font-size: 9px;
  color: var(--t1); white-space: nowrap; z-index: 10; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* ──────────────────────────────────────────────────────────────
   4. STATS LIST
────────────────────────────────────────────────────────────── */
.stats-list { display: flex; flex-direction: column; gap: 8px; }
.stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r2); transition: border-color .15s;
}
.stat-row:hover { border-color: var(--ln2); }
.stat-row-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.stat-row-ico {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-row-ico svg  { width: 16px; height: 16px; }
.stat-row-value    { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--y); letter-spacing: -.3px; }

/* ──────────────────────────────────────────────────────────────
   5. LEAGUE CARD
────────────────────────────────────────────────────────────── */
.league-card {
  margin: 12px 16px 4px; padding: 13px 15px; border-radius: var(--r2);
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(245,158,11,.03));
  border: 1px solid rgba(245,158,11,.2);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  transition: all .2s;
}
.league-card:hover { border-color: rgba(245,158,11,.35); box-shadow: 0 4px 16px rgba(245,158,11,.1); }
.league-card svg  { width: 32px; height: 32px; flex-shrink: 0; }
.league-card h4   { font-size: 14px; font-weight: 800; color: var(--gold); letter-spacing: -.3px; }
.league-card p    { font-family: var(--mono); font-size: 9px; color: var(--t2); margin-top: 3px; }
.league-btn {
  margin-left: auto; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25);
  color: var(--gold); border-radius: 9px; padding: 6px 14px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.league-btn:hover { background: rgba(245,158,11,.18); border-color: var(--gold); }

/* ──────────────────────────────────────────────────────────────
   6. RESPONSIVE
────────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .done-title     { font-size: 26px; }
  .dstat-v        { font-size: 20px; }
  .badges-grid    { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 480px) {
  .done-scr       { padding-top: 48px; }
  .done-stats     { max-width: 380px; }
  .done-btns      { max-width: 380px; }
  .badges-grid    { grid-template-columns: repeat(5,1fr); }
}
