/* =========================================================
   🏆 TOURNAMENT CARD
========================================================= */

.tournament-card{
    border-radius:16px;
    padding:20px;
    background:#f5f3ff;
    box-shadow:0 8px 24px rgba(0,0,0,.08);

    display:flex;
    flex-direction:column;
    gap:16px;
}

/* =========================================================
   HEADER
========================================================= */

.tournament-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}

.tournament-title{
    font-size:18px;
    font-weight:700;
    color:#4c1d95;
}

.tournament-header-aside{
    text-align:right;
    max-width:min(52%, 280px);
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:4px;
}

.tournament-mode-label{
    font-size:13px;
    font-weight:700;
    color:#ea580c;
    line-height:1.25;
}

.tournament-schedule-hint{
    font-size:10px;
    line-height:1.35;
    color:#64748b;
    font-weight:600;
}

.tournament-schedule-hint .tsh-line{
    display:block;
    color:#475569;
}

.tournament-schedule-hint .tsh-rest{
    display:block;
    margin-top:2px;
    font-weight:600;
    color:#94a3b8;
}

/* Último campeão (torneio anterior) */
.tournament-last-winner{
    margin-top:4px;
    border-radius:12px;
    padding:10px 12px;
    background:linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
    border:1px solid rgba(99,102,241,.25);
}

.tournament-last-winner__inner{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px 12px;
    font-size:13px;
    color:#4338ca;
}

.tournament-last-winner__badge{
    font-size:10px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:#7c3aed;
    background:rgba(124,58,237,.12);
    padding:3px 8px;
    border-radius:999px;
}

.tournament-last-winner__who{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:700;
}

.tournament-last-winner__avatar{
    font-size:18px;
    line-height:1;
}

.tournament-last-winner__name{
    color:#1e1b4b;
}

.tournament-last-winner__event{
    flex:1 1 100%;
    font-size:12px;
    color:#64748b;
    font-weight:600;
}

.tournament-last-winner__when{
    font-size:11px;
    color:#94a3b8;
    margin-left:auto;
}

/* =========================================================
   BODY
========================================================= */

.tournament-body{
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* =========================================================
   TOP INFO
========================================================= */

.tournament-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
}

.players-info{
    font-size:14px;
    color:#312e81;
}

.tournament-state{
    font-size:13px;
    font-weight:600;
    color:#ea580c;
}

.min-players{
    font-size:11px;
    opacity:.6;
}

/* =========================================================
   TIMER
========================================================= */

.tournament-timer{
    font-weight:600;
    font-size:16px;
    color:#f59e0b;
}

/* =========================================================
   ACTION BUTTON
========================================================= */

.tournament-actions{
    display:flex;
    justify-content:center;
}

.btn-primary{
    background:linear-gradient(90deg,#6366f1,#8b5cf6);
    border:none;
    padding:10px 18px;
    border-radius:10px;

    color:white;
    font-weight:600;
    cursor:pointer;

    transition:.2s;
}

.btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(0,0,0,.12);
}

/* =========================================================
   BRACKET
========================================================= */

.tournament-bracket{
    display:flex;
    flex-direction:column;
    gap:10px;

    background:white;
    border-radius:10px;
    padding:14px;

    border:1px solid #e5e7eb;
}

/* rounds */

.round{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.round-title{
    font-size:12px;
    font-weight:700;
    color:#6d28d9;
}

/* matches */

.match-card{
    background:#fafafa;
    border:1px solid #e5e7eb;

    border-radius:8px;
    padding:8px;

    display:flex;
    flex-direction:column;
    gap:4px;

    position:relative;
}

.match-player{
    font-size:13px;
}

.match-card.live{
    border-color:#f97316;
    background:#fff7ed;
}

.match-card.finished{
    opacity:.6;
}

.live-label{
    position:absolute;
    top:6px;
    right:6px;

    font-size:10px;
    background:#f97316;
    color:white;
    padding:2px 6px;
    border-radius:6px;
}

/* =========================================================
   LIVE BATTLES
========================================================= */

.tournament-live{
    display:flex;
    flex-direction:column;
    gap:14px;

    background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
    border-radius:14px;
    padding:16px;

    border:1px solid #e2e8f0;
    box-shadow:0 4px 20px rgba(15,23,42,.06);
}

.tournament-live__head{
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.tournament-live__pulse{
    flex-shrink:0;
    width:10px;
    height:10px;
    margin-top:5px;
    border-radius:50%;
    background:#ef4444;
    box-shadow:0 0 0 0 rgba(239,68,68,.5);
    animation:tournament-live-pulse 1.6s ease-out infinite;
}

@keyframes tournament-live-pulse{
    0%{ box-shadow:0 0 0 0 rgba(239,68,68,.45); }
    70%{ box-shadow:0 0 0 10px rgba(239,68,68,0); }
    100%{ box-shadow:0 0 0 0 rgba(239,68,68,0); }
}

.tournament-live__head-text{
    min-width:0;
}

.tournament-live__title{
    font-size:15px;
    font-weight:800;
    color:#0f172a;
    letter-spacing:-.02em;
}

.tournament-live__subtitle{
    font-size:12px;
    color:#64748b;
    margin-top:2px;
    font-weight:500;
}

.live-battles-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:14px;
}

/* card ao vivo — layout profissional */

.live-battle-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:12px 14px;
    display:flex;
    flex-direction:column;
    gap:10px;
    box-shadow:0 2px 12px rgba(15,23,42,.05);
    transition:border-color .2s ease, box-shadow .2s ease;
}

.live-battle-card:hover{
    border-color:#c7d2fe;
    box-shadow:0 6px 20px rgba(79,70,229,.08);
}

.live-battle-card--done{
    opacity:.92;
    border-color:#bbf7d0;
}

.live-battle-card__top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.live-battle-card__live{
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
    color:#fff;
    background:linear-gradient(90deg,#ef4444,#f97316);
    padding:3px 8px;
    border-radius:6px;
}

.live-battle-card__bid{
    font-size:11px;
    font-weight:600;
    color:#94a3b8;
    font-variant-numeric:tabular-nums;
}

.live-battle-card__duel{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:8px;
    text-align:center;
}

.live-battle-card__fighter{
    min-width:0;
}

.live-battle-card__nick{
    display:block;
    font-size:13px;
    font-weight:700;
    color:#1e293b;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.live-battle-card__vs{
    font-size:11px;
    font-weight:800;
    color:#cbd5e1;
}

.live-battle-card__hp{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.live-battle-card__hp-row{
    display:grid;
    grid-template-columns:28px 1fr;
    align-items:center;
    gap:8px;
}

.live-battle-card__hp-label{
    font-size:10px;
    font-weight:700;
    color:#94a3b8;
    text-align:right;
}

.live-battle-card__track{
    height:8px;
    background:#f1f5f9;
    border-radius:999px;
    overflow:hidden;
}

.hp-fill{
    height:100%;
    width:100%;
    border-radius:999px;
    transition:width .28s ease;
}

.hp-fill--a{
    background:linear-gradient(90deg,#6366f1,#818cf8);
}

.hp-fill--b{
    background:linear-gradient(90deg,#ec4899,#f472b6);
}

.live-battle-card__turn{
    font-size:12px;
    font-weight:600;
    color:#4f46e5;
    text-align:center;
    min-height:1.2em;
}

.live-battle-card__result,
.live-winner{
    font-size:12px;
    font-weight:600;
    color:#0d9488;
    text-align:center;
}

.live-battle-card__crown{
    margin-right:4px;
}

/* =========================================================
   CHAMPION
========================================================= */

.tournament-champion{
    text-align:center;
    font-size:15px;
    font-weight:700;
    color:#7c3aed;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:700px){

.tournament-top{
    flex-direction:column;
    align-items:flex-start;
}

}