/* Gap Drafter - draft challenge */

/* scoreboard */
.scoreboard { display: flex; gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.scoreboard div { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; background: var(--surface); min-width: 70px; }
.scoreboard .k { font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); }
.scoreboard .v { font-size: 20px; font-weight: 700; color: var(--text); }

/* teams */
.teams-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.line-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.team-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.ally .team-name, .ally .line-win { color: var(--ally); }
.enemy .team-name, .enemy .line-win { color: var(--enemy); }
.line-win { font-size: 22px; font-weight: 700; }
.line-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.vs { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--faint); padding-top: 22px; }
.tslot {
  position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
}
.tslot img { width: 100%; height: 100%; object-fit: cover; }
.tslot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 35%, transparent 55%, rgba(0,0,0,.8) 100%); pointer-events: none; }
.pos-tag { position: absolute; z-index: 1; top: 4px; left: 6px; font-size: 10.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.3px; }
.tname { position: absolute; z-index: 1; left: 6px; right: 6px; bottom: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tslot.ally { box-shadow: inset 0 -3px 0 var(--ally); }
.tslot.enemy { box-shadow: inset 0 -3px 0 var(--enemy); }
.tslot.mine { border: 2px solid var(--gold); }
.tslot.mine.empty { display: grid; place-items: center; background: var(--gold-soft); animation: pulse 1.8s ease-in-out infinite; }
.tslot.mine.empty::after { display: none; }
.tslot .q { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold); }
.tslot .you {
  position: absolute; z-index: 2; top: 4px; right: 5px; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  background: var(--gold); color: var(--bg); padding: 1px 6px; border-radius: 999px;
}
.tslot.mine.pending img { opacity: 0.7; }
.tslot.mine.whatif { border-style: dashed; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 177, 52, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(242, 177, 52, 0); } }
.deal .tslot:not(.mine) { animation: deal .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes deal { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.draft-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

/* grid below the teams */
.game-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }

/* gaps */
.warn {
  border: 1px solid rgba(255, 107, 94, 0.35); background: var(--enemy-soft);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--text-2);
}
.warn b { color: var(--bad); } .warn .n { color: var(--dim); }
.gap-list { display: flex; flex-direction: column; gap: 9px; }
.gap-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.gname { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.gname i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.gnum { font-size: 12px; } .gnum span { color: var(--faint); }
.gap-bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin-top: 4px; overflow: hidden; }
.gap-bar div { height: 100%; border-radius: 3px; }

/* pick / result */
.pick-card { border-color: var(--border-2); }
.pick-empty { text-align: center; padding: 18px 6px; color: var(--text-2); }
.pick-empty .q { display: block; font-family: var(--font-display); font-size: 46px; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.pick-empty p { font-size: 13px; }
.pick-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pick-preview img { width: 110px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gold); }
.pick-preview b { display: block; font-size: 16px; }
.pick-preview span { font-size: 12px; color: var(--dim); }
.btn.lock { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }
.result-top { display: flex; align-items: center; gap: 14px; }
.grade {
  width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--bg);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.grade.g-perfect { font-size: 14px; background: linear-gradient(135deg, #f2b134, #ffe08a); box-shadow: 0 0 24px rgba(242, 177, 52, .45); }
.grade.g-s { background: var(--gold); } .grade.g-a { background: var(--good); } .grade.g-b { background: var(--ally); }
.grade.g-c { background: var(--dim); } .grade.g-d { background: var(--bad); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.result-main { display: flex; flex-direction: column; line-height: 1.2; }
.result-main .lbl { font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); }
.result-main .big { font-size: 32px; font-weight: 700; color: var(--ally); letter-spacing: -1px; }
.result-main .rank { font-size: 12.5px; color: var(--text-2); }
.why { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 8px; font-size: 12.5px; font-family: var(--font-mono); color: var(--text-2); }
.best-line, .whatif-line { margin-top: 12px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.best-line.good { color: var(--good); font-weight: 600; }
.whatif-line { padding: 7px 9px; border-radius: 8px; border: 1px dashed var(--border-2); }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); }
.link img { width: 36px; height: 20px; object-fit: cover; border-radius: 3px; }
.top-list { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.tl-h { font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.tl-row { display: grid; grid-template-columns: 16px 44px 1fr auto 52px; align-items: center; gap: 8px; width: 100%; padding: 4px 4px; border-radius: 6px; text-align: left; font-size: 12.5px; }
.tl-row:hover { background: var(--surface-2); }
.tl-row.me { background: var(--gold-soft); }
.tl-row img { width: 44px; height: 25px; object-fit: cover; border-radius: 4px; }
.tl-row .k { color: var(--faint); font-size: 11px; }
.tl-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row .gp { font-size: 11.5px; }
.tl-row .pv { text-align: right; }
.tl-foot { font-size: 11px; color: var(--faint); margin-top: 6px; }
.result-actions { display: flex; gap: 8px; margin-top: 14px; }
.result-actions .btn { flex: 1; justify-content: center; }
.helper-link { display: block; margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--gold); text-decoration: none; }
.helper-link:hover { text-decoration: underline; }


@media (max-width: 1180px) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .teams-card { grid-template-columns: 1fr; }
  .vs { padding: 0; text-align: center; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .pick-card { grid-column: 1 / -1; grid-row: 1; }
  .pool { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .scoreboard { width: 100%; }
  .scoreboard div { flex: 1; min-width: 0; padding: 6px 4px; }
  .scoreboard .v { font-size: 17px; }
  .roles { grid-template-columns: 1fr 1fr; }
  .role { padding: 10px; }
  .role-txt small { display: none; }
  .game-grid { grid-template-columns: 1fr; }
  .line-slots { gap: 4px; }
  .pos-tag { font-size: 9px; left: 4px; }
  .tname { font-size: 10.5px; left: 4px; }
  .tslot .you { font-size: 8.5px; padding: 0 4px; }
  .pool { grid-template-columns: 1fr; }
  .pool-bar .search { margin-left: 0; width: 100%; }
}

