/* Tournaments hub — glass theme (matches /events, paid-events) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

html.tournaments-page-doc,
html.tournaments-page-doc body {
    background-color: #050505;
}

body.tournaments-page-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #050505;
    color: #f5f5f5;
    padding: 0;
    min-height: 100vh;
    overflow-x: clip;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top glow (matches /events, /paid-events) */
body.tournaments-page-body::before {
    content: '';
    position: fixed;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: min(140vw, 1600px);
    height: 320px;
    background: radial-gradient(
        ellipse 78% 92% at 50% 0%,
        rgba(99, 102, 241, 0.26) 0%,
        rgba(99, 102, 241, 0.1) 38%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 0;
}

body.tournaments-page-body .tournaments-page button {
    font: inherit;
}

body.tournaments-page-body .tournaments-page {
    position: relative;
    z-index: 1;
    max-width: min(920px, 100%);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 32px) clamp(40px, 5vw, 56px);
}

body.tournaments-page-body #headerContainer {
    position: relative;
    z-index: 2;
    width: 100%;
}

body.tournaments-page-body .tour-hero,
body.tournaments-page-body .tour-glass-section,
body.tournaments-page-body .tour-page-footer {
    position: relative;
    z-index: 1;
}

.tour-hero {
    margin: 0 0 clamp(20px, 3vw, 28px);
    padding: clamp(24px, 4vw, 40px) 0 clamp(20px, 4vw, 28px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tour-hero-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.1;
}

.tour-hero-lead {
    margin: 0;
    max-width: 40rem;
    font-size: clamp(15px, 2.2vw, 17px);
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.55;
}

.tour-hero-lead a {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
}

.tour-hero-lead a:hover {
    text-decoration: underline;
    color: #c7d2fe;
}

.tour-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tour-subnav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tour-subnav-link:hover {
    background: rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.45);
    color: #fff;
}

.tour-subnav-link.is-active {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(129, 140, 248, 0.55);
    color: #fff;
}

.tour-glass-section {
    margin-bottom: clamp(20px, 3vw, 28px);
    padding: clamp(20px, 3vw, 28px);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    min-width: 0;
    isolation: isolate;
}

.tour-list {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 18px);
}

.tour-row.is-closed {
    opacity: 0.62;
    background: rgba(0, 0, 0, 0.35);
}

.tour-row.is-closed:hover {
    opacity: 0.78;
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
}

.tour-row-cover-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-decoration: none;
    color: transparent;
}

.tour-row-cover-link:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.tour-row-inner {
    pointer-events: none;
}

.tour-row-inner a,
.tour-row-inner button,
.tour-row-inner .list-card-actions,
.tour-signups-block a {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.tour-row .tour-btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.tour-closed-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(80, 80, 80, 0.55);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.tour-section-label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.42);
}

.tour-section-label.tour-section-closed {
    margin-top: clamp(20px, 3vw, 28px);
    color: rgba(255, 255, 255, 0.32);
}

.tour-signups-block {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.55;
}

.tour-signups-block strong {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    margin-right: 6px;
}

.tour-signups-block a {
    color: #a5b4fc;
    text-decoration: none;
}

.tour-signups-block a:hover {
    text-decoration: underline;
}

.tour-row {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.tour-row:hover {
    border-color: rgba(129, 140, 248, 0.35);
    transform: translateY(-1px);
}

.tour-row-thumb {
    flex: 0 0 120px;
    width: 120px;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.tour-row-thumb img {
    width: 100%;
    height: 100%;
    min-height: 100px;
    object-fit: cover;
    display: block;
}

.tour-row-inner {
    flex: 1;
    padding: clamp(16px, 2.5vw, 20px);
    min-width: 0;
}

.tour-row h3 {
    margin: 0 0 6px;
    font-size: clamp(17px, 2.5vw, 20px);
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.tour-row .meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 6px;
}

.tour-row .submeta {
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 8px;
}

.tour-row .submeta a {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
}

.tour-row .submeta a:hover {
    text-decoration: underline;
}

.tour-row .paid-badge {
    color: #c7d2fe;
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0 8px;
}

body.tournaments-page-body .tour-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
    transition: filter 0.15s ease, transform 0.15s ease;
}

body.tournaments-page-body .tour-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff;
}

.tour-loading,
.tour-empty,
.tour-error {
    text-align: center;
    padding: clamp(32px, 5vw, 48px) 16px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
}

.tour-error {
    color: #fca5a5;
}

.tour-page-footer {
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.38);
    font-size: 13px;
}

.tour-page-footer a {
    color: #a5b4fc;
    text-decoration: none;
}

@media (max-width: 560px) {
    .tour-row {
        flex-direction: column;
    }

    .tour-row-thumb {
        flex: none;
        width: 100%;
        min-height: 140px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tour-row-thumb img {
        min-height: 140px;
    }
}
