/* ===== Tournaments page (tournament.html) ===== */
.tour-status {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.4rem;
    padding: 1.1rem 1.3rem;
    max-width: 760px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 27, 52, 0.85), rgba(11, 15, 30, 0.9));
    border: 1px solid var(--p-line);
}

.tbadge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(138, 147, 184, 0.14);
    color: #c9cfe3;
    font: 800 0.72rem 'Roboto', sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tbadge i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.tbadge.live {
    background: rgba(255, 92, 108, 0.16);
    color: #ff7d8a;
}

.tbadge.live i {
    animation: livePulse 1.4s infinite;
    box-shadow: 0 0 0 0 rgba(255, 92, 108, 0.6);
}

@keyframes livePulse {
    70% { box-shadow: 0 0 0 9px rgba(255, 92, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 108, 0); }
}

.tbadge.open {
    background: rgba(93, 255, 138, 0.14);
    color: #7dffa2;
}

.tbadge.soon {
    background: rgba(79, 168, 255, 0.16);
    color: #9cc8ff;
}

.tstatus-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    color: #b8bfd6;
    font-size: 1.02rem;
}

.tstatus-line b {
    color: #fff;
    text-transform: capitalize;
    font-variant-numeric: tabular-nums;
}

.kit-ico {
    width: 26px;
    height: 26px;
    image-rendering: pixelated;
    vertical-align: middle;
}

.tour-notice {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 200, 61, 0.3);
    background: rgba(255, 200, 61, 0.07);
    color: #ffe3a3;
    font-size: 0.9rem;
    max-width: 760px;
}

/* ----- Bracket board ----- */
.tboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tboard-head h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: #fff;
    text-transform: capitalize;
}

.tboard-head h2 small {
    font: 400 0.85rem 'Roboto', sans-serif;
    color: var(--p-muted);
    text-transform: none;
}

.board-back {
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--p-line);
    background: rgba(8, 11, 22, 0.6);
    color: #c9cfe3;
    font: 600 0.85rem 'Roboto', sans-serif;
    cursor: pointer;
}

.board-back:hover {
    color: #fff;
    border-color: rgba(79, 168, 255, 0.5);
}

.bracket-wrap {
    position: relative;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    border-radius: 20px;
    background:
        radial-gradient(60% 80% at 50% 50%, rgba(255, 200, 61, 0.07), transparent 70%),
        linear-gradient(180deg, rgba(14, 19, 38, 0.8), rgba(8, 11, 22, 0.85));
    border: 1px solid var(--p-line);
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 140, 255, 0.35) transparent;
}

.bracket-lines {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    overflow: visible;
}

.bracket-lines path {
    fill: none;
    stroke: rgba(138, 147, 184, 0.45);
    stroke-width: 2;
    stroke-linejoin: round;
}

.bracket-lines path.done {
    stroke: rgba(79, 168, 255, 0.85);
    filter: drop-shadow(0 0 4px rgba(79, 168, 255, 0.5));
}

.bracket {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2.2rem;
    min-width: max-content;
    padding: 0 1.2rem;
}

.bcol {
    display: flex;
    flex-direction: column;
    width: 190px;
}

.bcol.center {
    width: 220px;
}

.bcol-title {
    margin: 0.6rem 0 0.8rem;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--p-muted);
    text-align: center;
}

.bcol-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.9rem;
}

.bcol.center .bcol-body {
    justify-content: center;
    gap: 1.2rem;
}

.bmatch {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(20, 27, 52, 0.95);
    border: 1px solid rgba(122, 140, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: matchIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes matchIn {
    from { opacity: 0; transform: translateY(8px); }
}

.bmatch:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 168, 255, 0.5);
}

.bmatch.is-live {
    border-color: rgba(255, 92, 108, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 92, 108, 0.15), 0 8px 24px rgba(255, 92, 108, 0.2);
    animation: livePulseCard 2s ease-in-out infinite;
}

@keyframes livePulseCard {
    50% { box-shadow: 0 0 0 6px rgba(255, 92, 108, 0.08), 0 8px 28px rgba(255, 92, 108, 0.3); }
}

.m-live,
.m-tag {
    position: absolute;
    top: -9px;
    right: 8px;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    font: 800 0.6rem 'Roboto', sans-serif;
    letter-spacing: 0.1em;
}

.m-live {
    background: #ff3d55;
    color: #fff;
}

.m-tag {
    background: #2a3253;
    color: #c9cfe3;
}

.slot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 34px;
    padding: 0.25rem 0.45rem;
    border-radius: 8px;
    background: rgba(8, 11, 22, 0.6);
    color: #e6e9f5;
    font-size: 0.86rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

a.slot:hover {
    background: rgba(79, 168, 255, 0.14);
}

.slot-head {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    image-rendering: pixelated;
    background: rgba(255, 255, 255, 0.06);
}

.slot-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot.empty {
    color: #6e7699;
    font-style: italic;
}

.slot.won {
    background: linear-gradient(90deg, rgba(93, 255, 138, 0.16), rgba(8, 11, 22, 0.6));
    color: #fff;
    font-weight: 700;
}

.slot.lost {
    opacity: 0.5;
}

.slot.lost .slot-name {
    text-decoration: line-through;
}

.slot-win {
    color: #5dff8a;
    font-weight: 900;
}

.champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.9rem 0.6rem 0.8rem;
    border-radius: 16px;
    background: radial-gradient(70% 60% at 50% 30%, rgba(255, 200, 61, 0.25), transparent 70%), rgba(20, 27, 52, 0.95);
    border: 1px solid rgba(255, 200, 61, 0.55);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 0 34px rgba(255, 200, 61, 0.18);
}

.champion img {
    height: 120px;
    width: auto;
    animation: champFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}

@keyframes champFloat {
    50% { transform: translateY(-6px); }
}

.champion-crown {
    font-size: 1.6rem;
    color: #ffc83d;
    filter: drop-shadow(0 0 8px rgba(255, 200, 61, 0.7));
    animation: crownBob 2.4s ease-in-out infinite;
}

@keyframes crownBob {
    50% { transform: translateY(-4px) rotate(-6deg); }
}

.champion b {
    font-family: 'Orbitron', sans-serif;
}

.champion small {
    color: #ffe3a3;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ----- Waiting list ----- */
.waiting-note {
    color: var(--p-muted);
}

.waiting-note b {
    color: #9cc8ff;
}

.joined {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.joined-p {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    border-radius: 10px;
    background: rgba(20, 27, 52, 0.9);
    border: 1px solid var(--p-line);
    color: #e6e9f5;
    text-decoration: none;
    font-size: 0.9rem;
    animation: matchIn 0.35s ease both;
}

.joined-p img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    image-rendering: pixelated;
}

/* ----- How it works + requirements ----- */
.tour-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.2rem;
}

.tour-card {
    padding: 1.4rem;
    border-radius: 18px;
    background: var(--p-card);
    border: 1px solid var(--p-line);
}

.tour-card h2 {
    margin: 0 0 0.9rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    color: #fff;
}

.tour-card ol,
.req-list {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tour-card ol {
    counter-reset: s;
}

.tour-card ol li {
    counter-increment: s;
    position: relative;
    padding-left: 2.4rem;
    color: #b8bfd6;
    line-height: 1.55;
}

.tour-card ol li::before {
    content: counter(s);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #4fa8ff, #6a4bff);
    color: #fff;
    font: 700 0.8rem 'Orbitron', sans-serif;
}

.tour-card b {
    color: #fff;
}

.req-list li {
    display: flex;
    flex-direction: column;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(6, 9, 20, 0.55);
    border-left: 3px solid #ffc83d;
}

.req-list li span {
    color: var(--p-muted);
    font-size: 0.88rem;
}

/* ----- History ----- */
.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
}

.hcard {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: var(--p-card);
    border: 1px solid var(--p-line);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hcard:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 200, 61, 0.5);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hhead {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

.hinfo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.hinfo b {
    color: #fff;
}

.hinfo small {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--p-muted);
    font-size: 0.8rem;
    text-transform: capitalize;
}

.hinfo .kit-ico {
    width: 16px;
    height: 16px;
}

.hcrown {
    position: absolute;
    right: 0.8rem;
    top: 0.5rem;
    color: #ffc83d;
    opacity: 0.6;
}

.history-empty {
    color: var(--p-muted);
}

@media (max-width: 860px) {
    .tour-info-grid {
        grid-template-columns: 1fr;
    }

    .bcol {
        width: 160px;
    }

    .bcol.center {
        width: 190px;
    }

    .bracket {
        gap: 1.6rem;
    }
}

/* the bracket gets more room than normal page content */
#tourBoard .container {
    max-width: 1640px;
}

@media (min-width: 1300px) {
    .bcol {
        width: 162px;
    }

    .bcol.center {
        width: 190px;
    }

    .bracket {
        gap: 1.4rem;
        justify-content: center;
    }
}
