/* Duel Result Overlay — lightweight, responsive, theme-aware */
      .nova-duel-result{ 
        width: min(980px, 92vw); 
        margin: 14px auto; 
        display: grid; 
        gap: 14px; 
        place-items: center; 
        position: relative;
      }
      .nova-result-card{
        width: 100%;
        border-radius: 20px;
        padding: clamp(14px, 3.5vw, 28px);
        background: linear-gradient(180deg, rgba(15,23,42,.75), rgba(2,6,23,.65));
        border: 1px solid rgba(148,163,184,.25);
        box-shadow: 0 20px 60px rgba(0,0,0,.35);
        position: relative;
        overflow: hidden;
        transform: translateZ(0);
      }
      .nova-result-card::before{
        content:"";
        position:absolute; inset:-2px;
        background: radial-gradient(800px 220px at 50% 0%, rgba(255,215,0,.10), transparent 40%);
        pointer-events:none;
      }
      .nova-hero{
        display:grid; place-items:center; gap:10px; text-align:center;
      }
      .nova-hero .crown{
        font-size: clamp(28px, 5vw, 56px);
        line-height: 1;
        animation: novaFloat 2.4s ease-in-out infinite;
        filter: drop-shadow(0 4px 12px rgba(250,204,21,.45));
      }
      .nova-hero .winner-name{
        font-weight: 800;
        font-size: clamp(22px, 4.8vw, 38px);
        letter-spacing:.5px;
        background: linear-gradient(90deg,#facc15,#fde68a,#facc15);
        -webkit-background-clip:text; background-clip:text; color:transparent;
        text-shadow: 0 0 22px rgba(250,204,21,.35);
      }
      .nova-hero .subtitle{
        font-size: clamp(13px, 3vw, 16px);
        color: #e5e7eb; opacity:.85;
      }
      .nova-scoreboard{
        display: grid; 
        grid-template-columns: 1fr auto 1fr; 
        gap: clamp(10px, 3vw, 18px);
        align-items: center; 
        margin-top: 8px;
      }
      .nova-player{
        background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
        border: 1px solid rgba(148,163,184,.25);
        border-radius: 16px;
        padding: clamp(8px, 2.4vw, 14px);
        display:grid; grid-template-columns: auto 1fr auto; gap:10px; align-items:center;
        min-width: 0;
      }
      .nova-player.loser{ 
        filter: grayscale(.15) opacity(.95); 
        box-shadow: inset 0 0 0 2px rgba(239,68,68,.35);
      }
      .nova-player.winner{ 
        box-shadow: inset 0 0 0 2px rgba(16,185,129,.45), 0 0 42px rgba(16,185,129,.18);
      }
      .nova-avatar{
        width: clamp(46px, 9vw, 72px); height: clamp(46px, 9vw, 72px);
        border-radius: 14px; object-fit: cover;
        border: 3px solid rgba(255,255,255,.35);
      }
      .nova-names{min-width:0}
      .nova-names .nm{
        color:#f8fafc; font-weight:700; font-size: clamp(14px, 3.2vw, 18px);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      }
      .nova-names .rk{ color:#cbd5e1; font-size: clamp(12px, 2.6vw, 14px); opacity:.8 }
      .nova-score{
        font-weight:900; font-size: clamp(22px, 6vw, 36px);
        min-width: 2ch; text-align:right; color:#e5e7eb;
      }
      .nova-score.tie{ color:#93c5fd }
      .nova-vs{
        font-size: clamp(18px, 5vw, 28px);
        padding: .1rem .8rem; border-radius: 999px; 
        border: 1px solid rgba(148,163,184,.35);
        color:#e2e8f0; opacity:.9;
      }
      .nova-actions{
        margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; justify-content:center;
      }
      .nova-btn{
        appearance:none; border:none; cursor:pointer;
        padding: .75rem 1.25rem; border-radius: 999px;
        font-weight: 800; letter-spacing:.3px;
        transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
        box-shadow: 0 6px 22px rgba(0,0,0,.25);
      }
      .nova-btn:active{ transform: translateY(1px) scale(.995); }
      .nova-btn.primary{ 
        background: linear-gradient(90deg, #22c55e, #16a34a);
        color: white;
      }
      .nova-btn.secondary{ 
        background: linear-gradient(90deg, #1f2937, #111827);
        color: #e5e7eb; border: 1px solid rgba(148,163,184,.35);
      }
      .duel-final-theme-tie .nova-hero .winner-name{ 
        background: linear-gradient(90deg,#60a5fa,#3b82f6,#60a5fa);
        -webkit-background-clip:text; background-clip:text; color:transparent;
        text-shadow: 0 0 22px rgba(59,130,246,.35);
      }

      @keyframes novaFloat{
        0%{ transform: translateY(0) } 
        50%{ transform: translateY(-6px) } 
        100%{ transform: translateY(0) }
      }
      @keyframes novaCount{
        from{ opacity:.6; transform: scale(.96) }
        to{ opacity:1; transform: scale(1) }
      }

      /* Ensure the final container stays above gameplay HUD */
      #duel-final-container{ z-index: 9990; }

      /* Mobile stack */
      @media (max-width: 640px){
        .nova-scoreboard{ grid-template-columns: 1fr; }
        .nova-vs{ display:none }
        .nova-result-card{ padding: 14px }
      }
