.win-screen { width:100vw; height:100vh; display:flex; align-items:center; justify-content:center; background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), var(--bg-image-menu) no-repeat center/cover, var(--bg); overflow:hidden; position:relative; }

/* ── Full-screen layout ── */
.win-layout {
  position:relative; width:100vw; height:100vh;
}

/* ── LEFT: Banner flag — centered between left wall and avatar ── */
.win-left {
  position:absolute; left:0; top:0; bottom:0; width:30%;
  display:flex; align-items:flex-start; justify-content:center;
}
.win-banner {
  height:96vh; width:auto; max-width:520px;
  object-fit:contain;
  opacity:0;
  filter: drop-shadow(0 10px 40px rgba(0,0,0,0.8)) drop-shadow(0 0 20px rgba(212,165,69,0.25));
  animation: winBannerDrop 1s ease-out forwards;
  transform-origin: top center;
}
@keyframes winBannerDrop {
  from { transform: translateY(-100%); opacity:0; }
  70%  { transform: translateY(3%); opacity:1; }
  85%  { transform: translateY(-1%); }
  to   { transform: translateY(0); opacity:1; }
}

/* ── CENTER: Fullbody avatar — dominant, heroic ── */
.win-center {
  position:absolute; left:48%; bottom:0;
  transform:translateX(-50%);
  display:flex; align-items:flex-end; justify-content:center;
}
.win-fullbody {
  height:85vh; width:auto; max-width:46vw;
  object-fit:contain;
  filter: drop-shadow(0 0 50px rgba(212,165,69,0.45)) drop-shadow(0 0 100px rgba(212,165,69,0.15));
  animation: winFullbodyIn 0.7s ease-out 0.5s both;
}
@keyframes winFullbodyIn {
  from { transform: translateY(50px) scale(0.85); opacity:0; }
  to   { transform: translateY(0) scale(1); opacity:1; }
}

/* ── RIGHT TOP: Name + Emblem + Scores — centered column ── */
.win-right {
  position:absolute; right:3vw; top:3vh;
  display:flex; flex-direction:column; align-items:center;
  width:420px; z-index:10;
}

/* Name row: emblem LEFT of name */
.win-name-row {
  display:flex; align-items:center; gap:18px;
  margin-bottom:6px;
  animation: winNameIn 0.5s ease-out 1s both;
}
.win-emblem {
  width:130px; height:130px; object-fit:contain; flex-shrink:0;
  filter: drop-shadow(0 0 20px rgba(212,165,69,0.7)) drop-shadow(0 0 40px rgba(212,165,69,0.35));
  animation: winEmblemGlow 2s ease-in-out infinite 1.2s;
}
@keyframes winEmblemGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(212,165,69,0.7)) drop-shadow(0 0 40px rgba(212,165,69,0.35)); }
  50%      { filter: drop-shadow(0 0 32px rgba(212,165,69,0.95)) drop-shadow(0 0 56px rgba(255,215,0,0.5)); }
}

.win-name {
  font-family:'Cinzel',serif; font-size:clamp(1.4rem, 2.8vw, 2.8rem); font-weight:900;
  letter-spacing:4px; margin:0;
  text-shadow:0 0 24px rgba(212,165,69,0.4), 0 2px 4px rgba(0,0,0,0.8);
  max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
@keyframes winNameIn {
  from { transform: translateX(20px); opacity:0; }
  to   { transform: translateX(0); opacity:1; }
}

.win-subtitle {
  font-family:'Crimson Text',serif; font-size:1.15rem; font-style:italic;
  color:var(--parchment); margin:0 0 18px; text-align:center;
  text-shadow:0 1px 3px rgba(0,0,0,0.5);
}

/* Stats bar — centered */
.win-stats-bar {
  display:flex; gap:22px; margin-bottom:18px; padding:10px 22px;
  background:rgba(0,0,0,0.35); border:1px solid rgba(212,165,69,0.25); border-radius:6px;
  justify-content:center;
}
.win-stat {
  font-family:'Cinzel',serif; font-size:0.95rem; color:#d4a545;
  letter-spacing:0.5px; display:flex; align-items:center; gap:6px;
}

/* ── Scoreboard — full width of panel ── */
.win-scores { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; width:100%; }
.win-row {
  display:flex; align-items:center; gap:12px; padding:12px 18px;
  border-radius:4px; background:rgba(0,0,0,0.4);
  border:1px solid rgba(120,90,40,0.3);
  font-family:'Crimson Text',serif; font-size:1.15rem;
  color:var(--parchment-light); text-shadow:0 1px 2px rgba(0,0,0,0.4);
}
.win-row--winner { background:rgba(212,165,69,0.14) !important; border-color:rgba(212,165,69,0.45) !important; }
.win-rank { font-family:'Cinzel',serif; font-size:1.4rem; font-weight:700; min-width:34px; text-align:center; flex-shrink:0; color:var(--gold-bright); }

/* Row avatar + frame */
.win-row-avatar-wrap { position:relative; width:46px; height:46px; flex-shrink:0; }
.win-row-avatar { position:absolute; inset:10%; width:80%; height:80%; object-fit:cover; border-radius:50%; z-index:1; }
.win-row-frame { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; z-index:2; }

.win-row-name { font-weight:700; min-width:70px; text-align:left; }
.win-row-terr { color:var(--parchment-dark); font-size:1rem; }
.win-row-score { color:var(--parchment-dark); font-size:1rem; }
.win-row-coins { margin-left:auto; color:var(--gold-bright); font-family:'Cinzel',serif; font-size:1rem; display:flex; align-items:center; gap:4px; }

/* Back button — bottom right */
.win-back-btn {
  position:absolute; bottom:3vh; right:3vw; z-index:10;
}

/* ===================== TABLET ===================== */
@media (max-width: 1100px) {
  .win-banner { max-width:380px; height:88vh; }
  .win-fullbody { height:78vh; }
  .win-emblem { width:80px; height:80px; }
  .win-name { max-width:240px; }
  .win-right { width:340px; }
}

@media (max-width: 900px) {
  .win-banner { max-width:280px; height:80vh; }
  .win-fullbody { height:70vh; }
  .win-emblem { width:65px; height:65px; }
  .win-name { max-width:180px; }
  .win-right { width:280px; right:2vw; }
  .win-stats-bar { gap:12px; padding:8px 14px; }
  .win-stat { font-size:0.8rem; }
  .win-row { padding:8px 12px; font-size:1rem; gap:8px; }
  .win-row-avatar-wrap { width:38px; height:38px; }
}

/* ===================== MOBILE — stack vertical ===================== */
@media (max-width: 700px) {
  .win-layout { display:flex; flex-direction:column; align-items:center; height:auto; padding:10px 0; overflow-y:auto; }
  .win-left { position:static; width:100%; height:140px; justify-content:center; }
  .win-banner { height:130px; max-width:160px; }
  .win-center { position:static; transform:none; width:100%; height:240px; justify-content:center; }
  .win-fullbody { height:230px; max-width:200px; }
  .win-right { position:static; width:92vw; max-width:400px; padding:10px 0; }
  .win-name-row { justify-content:center; }
  .win-emblem { width:56px; height:56px; }
  .win-name { font-size:1.5rem; letter-spacing:2px; }
  .win-subtitle { text-align:center; }
  .win-scores { width:100%; }
  .win-row-avatar-wrap { width:34px; height:34px; }
  .win-back-btn { position:static; text-align:center; margin-top:10px; }
}

/* ===================== LANDSCAPE SHORT ===================== */
@media (max-height: 500px) {
  .win-banner { height:78vh; max-width:180px; }
  .win-fullbody { height:82vh; }
  .win-emblem { width:60px; height:60px; }
  .win-name { font-size:1.5rem; letter-spacing:3px; }
  .win-subtitle { margin:2px 0 8px; font-size:0.9rem; }
  .win-stats-bar { padding:5px 10px; gap:10px; margin-bottom:8px; }
  .win-stat { font-size:0.7rem; }
  .win-scores { gap:4px; margin-bottom:8px; }
  .win-row { padding:5px 8px; font-size:0.85rem; gap:6px; }
  .win-row-avatar-wrap { width:26px; height:26px; }
  .win-rank { font-size:0.95rem; min-width:24px; }
}
