.tournament-ladder-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.ladder-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b0f18;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.28);
}

.ladder-hero-backdrop,
.ladder-hero-backdrop img,
.ladder-hero-overlay {
    position: absolute;
    inset: 0;
}

.ladder-hero-backdrop img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.ladder-hero-overlay {
    background:
        linear-gradient(112deg, rgba(6, 9, 15, 0.94) 0%, rgba(7, 11, 18, 0.9) 42%, rgba(8, 12, 20, 0.72) 100%),
        radial-gradient(circle at top right, rgba(255, 37, 176, 0.2), transparent 32%),
        radial-gradient(circle at 72% 28%, rgba(93, 124, 255, 0.16), transparent 28%);
}

.ladder-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 20px;
    padding: 28px;
}

.ladder-hero-main,
.ladder-hero-side,
.ladder-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ladder-hero-topline,
.ladder-actions,
.ladder-board-head {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ladder-kicker,
.ladder-chip,
.ladder-panel-kicker,
.ladder-inline-chip {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ladder-kicker,
.ladder-chip,
.ladder-panel-kicker,
.ladder-inline-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d2daec;
}

.ladder-hero h1,
.ladder-board-head h2 {
    margin: 0;
    color: #f8fbff;
}

.ladder-hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 0.96;
    text-transform: uppercase;
}

.ladder-copy,
.ladder-board-head p,
.ladder-summary-card small,
.ladder-empty-state p {
    margin: 0;
    color: #a4b0c5;
    line-height: 1.7;
}

.ladder-action-btn,
.ladder-list-row {
    text-decoration: none;
}

.ladder-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d103b8, #5d7cff);
    color: #fff;
    box-shadow: 0 14px 28px rgba(93, 124, 255, 0.2);
}

.ladder-action-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #edf2ff;
    box-shadow: none;
}

.ladder-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.ladder-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ladder-filter-group label {
    color: #d7deef;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ladder-filter-select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 22, 0.88);
    color: #f3f7ff;
    font-size: 0.94rem;
    font-weight: 600;
    outline: none;
}

.ladder-filter-select:focus {
    border-color: rgba(93, 124, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(93, 124, 255, 0.16);
}

.ladder-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ladder-side-card,
.ladder-summary-card,
.ladder-board,
.ladder-list-shell,
.ladder-list-row,
.ladder-empty-state {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(16, 20, 31, 0.92), rgba(12, 15, 24, 0.96));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.ladder-side-card::before,
.ladder-summary-card::before,
.ladder-board::before,
.ladder-list-shell::before,
.ladder-list-row::before {
    display: none;
}

.ladder-side-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 16px 14px 14px;
    border-radius: 16px;
}

.ladder-side-card span,
.ladder-summary-card span,
.ladder-list-head {
    color: #93a2ba;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ladder-side-card strong,
.ladder-summary-card strong {
    color: #f7fbff;
    font-size: 0.95rem;
}

.ladder-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ladder-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 18px 16px 16px;
    border-radius: 18px;
}

.ladder-board {
    padding: 20px 18px 18px;
    border-radius: 20px;
}

.ladder-list-shell {
    border-radius: 18px;
}

.ladder-list-head,
.ladder-list-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1.8fr) 130px 108px 108px 108px 145px;
    gap: 12px;
    align-items: center;
}

.ladder-list-head {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.ladder-list-body {
    display: flex;
    flex-direction: column;
    max-height: min(70vh, 980px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 124, 255, 0.7) rgba(255, 255, 255, 0.05);
}

.ladder-list-body::-webkit-scrollbar {
    width: 10px;
}

.ladder-list-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.ladder-list-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d103b8, #5d7cff);
    border-radius: 999px;
}

.ladder-list-row {
    color: inherit;
    padding: 16px 18px;
    min-height: 88px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.ladder-list-row:first-child {
    border-top: 0;
}

.ladder-list-row:hover {
    transform: translateX(4px);
    border-color: rgba(93, 124, 255, 0.28);
    background:
        linear-gradient(135deg, rgba(209, 3, 184, 0.12), rgba(93, 124, 255, 0.12)),
        linear-gradient(180deg, rgba(16, 20, 31, 0.96), rgba(12, 15, 24, 0.98));
}

.ladder-rank-cell,
.ladder-record-cell,
.ladder-placement-cell,
.ladder-activity-cell {
    display: flex;
    align-items: center;
}

.ladder-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f8ff;
    font-size: 1rem;
    font-weight: 800;
}

.ladder-rank-badge.top-rank {
    background: linear-gradient(135deg, rgba(209, 3, 184, 0.9), rgba(93, 124, 255, 0.94));
}

.ladder-team-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ladder-team-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ladder-team-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ladder-team-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.ladder-team-primary {
    color: #f7fbff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ladder-record-cell,
.ladder-placement-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.ladder-record-cell strong,
.ladder-placement-cell strong {
    color: #f5f8ff;
    font-size: 0.98rem;
}

.ladder-record-cell small,
.ladder-placement-cell small {
    color: #97a5ba;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.ladder-activity-cell {
    gap: 10px;
    color: #dbe3f1;
    font-size: 0.84rem;
}

.ladder-activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 12px currentColor;
}

.ladder-activity-dot.high {
    background: #2bc990;
    color: #2bc990;
}

.ladder-activity-dot.mid {
    background: #ffc857;
    color: #ffc857;
}

.ladder-activity-dot.low {
    background: #ff6b6b;
    color: #ff6b6b;
}

.ladder-empty-state {
    padding: 20px;
    border-radius: 18px;
}

.ladder-empty-state strong {
    display: block;
    margin-bottom: 0.45rem;
    color: #f7fbff;
}

@media (max-width: 1180px) {
    .ladder-hero-content,
    .ladder-summary-grid {
        grid-template-columns: 1fr;
    }

    .ladder-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .ladder-list-head,
    .ladder-list-row {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .ladder-list-head div:nth-child(3),
    .ladder-list-head div:nth-child(4),
    .ladder-list-head div:nth-child(5),
    .ladder-list-head div:nth-child(6),
    .ladder-list-head div:nth-child(7),
    .ladder-list-row .ladder-record-cell,
    .ladder-list-row .ladder-placement-cell,
    .ladder-list-row .ladder-activity-cell {
        display: none;
    }
}

@media (max-width: 700px) {
    .ladder-filter-form,
    .ladder-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ladder-filter-form {
        grid-template-columns: 1fr;
    }

    .ladder-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ladder-action-btn {
        width: 100%;
    }

    .ladder-filter-actions .ladder-action-btn {
        width: 100%;
    }
}
