/* ==========================================================================
   1. VARIABLES & CORE STYLES
========================================================================== */
:root {
    /* Contrast Enhancements */
    --bg: #071018;
    --panel: #101c27;
    --panel-raised: #142532;
    --muted: #aeb9c9;       /* Brighter muted text for readability */
    --text-main: #f8fbff;   /* Crisp primary text */
    
    --accent-1: #58d0c0;
    --accent-2: #f5b85b;
    --danger: #f47c7c;
    --glass: rgba(255, 255, 255, 0.05); /* Slightly higher opacity for visibility */
    --radius: 12px;
}

.faq-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.faq-category {
    margin: 1.25rem 0 0.15rem;
    color: var(--accent-1);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
}

.faq-category:first-child {
    margin-top: 0;
}

.faq-item {
    padding: 1rem 1.25rem;
    border: 1px solid rgba(88, 208, 192, 0.16);
    border-radius: var(--radius);
    background: var(--panel);
}

.faq-item summary {
    cursor: pointer;
    color: var(--text-main);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    list-style-position: inside;
}

.faq-item summary::marker {
    color: var(--accent-1);
}

.faq-item p {
    margin: 0.85rem 0 0 1.35rem;
    color: var(--muted);
    line-height: 1.65;
}

.faq-item a,
.faq-contact-card a {
    color: var(--accent-1);
}

.faq-contact-card {
    margin-bottom: 0;
}


* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Removes default tap flash on mobile */
}


html, body {
    height: 100%;
}


body {
    margin: 0;
    font-family: "DM Sans", ui-sans-serif, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}


main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.25rem; /* Slightly larger padding for mobile breathing room */
    width: 100%;
}


footer {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
    font-size: 0.9rem;
}

footer p {
    margin: 0 0 0.5rem;
}

.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
}

.footer-links a + a::before {
    content: '|';
    color: var(--muted);
    margin-right: 0.5rem;
}

.policy-card {
    max-width: 900px;
    margin: 1.5rem auto 0;
    gap: 1.5rem;
}

.policy-card section + section {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.policy-card h2 {
    margin: 0 0 0.5rem;
    color: var(--accent-1);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
}

.policy-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}


/* ==========================================================================
   2. NAVIGATION BAR
========================================================================== */
header {
    background: rgba(16, 28, 39, 0.94);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(88, 208, 192, 0.16);
    backdrop-filter: blur(16px);
    position: sticky; /* Keeps nav visible on mobile scroll */
    top: 0;
    z-index: 1000;
}


nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-right {
    margin-left: auto;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: 0 30px 42px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-menu.open {
    display: flex;
}

.nav-menu a {
    width: 100%;
    text-align: left;
    min-height: 48px;
    padding: 0.85rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.03);
}

.nav-menu a.active {
    color: #071018;
    background: rgba(88, 208, 192, 0.9);
}

.nav-overlay-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}


.registered-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
}

.results-shell .table-scroll {
    width: calc(100% + 3.5rem);
    margin-left: -1.75rem;
    margin-right: -1.75rem;
    padding: 0;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden; /* prevent vertical bounce */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x; /* prioritize horizontal panning */
    -ms-overflow-style: -ms-autohiding-scrollbar;
    padding-bottom: 0.25rem;
}


.registered-table th,
.registered-table td {
    padding: 0.85rem 0.95rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.registered-table.result-table th:nth-child(1),
.registered-table.result-table th:nth-child(3),
.registered-table.result-table th:nth-child(4),
.registered-table.result-table th:nth-child(5),
.registered-table.result-table th:nth-child(6),
.registered-table.result-table td:nth-child(1),
.registered-table.result-table td:nth-child(3),
.registered-table.result-table td:nth-child(4),
.registered-table.result-table td:nth-child(5),
.registered-table.result-table td:nth-child(6) {
    width: 1%;
    white-space: nowrap;
}

.registered-table td {
    white-space: normal;
    word-break: break-word;
}


.results-shell .registered-table th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
}


.registered-table tr:last-child td {
    border-bottom: none;
}


.registered-table tbody tr:hover {
    background: rgba(79, 172, 254, 0.08);
}

.detail-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.25rem;
}

.detail-stat {
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border-left: 2px solid var(--accent-1);
    border-radius: 0 6px 6px 0;
}

.detail-stat span, .room-credentials span, .eyebrow {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-stat strong { display: block; margin-top: 0.3rem; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.section-heading h3 { margin: 0.25rem 0 0; font-size: 1.45rem; }
.room-icon { color: var(--accent-2); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; }
.room-details-card { margin-bottom: 1.5rem; }
.room-message { color: #ffab00; font-weight: 700; margin-bottom: 0.35rem; }
.room-countdown { font-size: 1.15rem; font-weight: 800; margin-top: 0; }
.room-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.room-credentials div { padding: 0.9rem; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.08); }
.room-credentials strong { display: block; margin-top: 0.3rem; color: var(--accent-2); word-break: break-word; }
.match-register-card { border-color: rgba(88, 208, 192, 0.18); background: linear-gradient(135deg, rgba(88, 208, 192, 0.08), rgba(16, 28, 39, 0.96) 45%); }
.match-register-card .card-header { padding-bottom: 0.25rem; }
.match-register-card .card-header h3 { margin-bottom: 0.45rem; }
.match-register-card .card-header p { max-width: 50rem; margin: 0; line-height: 1.5; }
.match-team-nav { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.match-team-nav a { padding: 0.45rem 0.7rem; border: 1px solid rgba(88, 208, 192, 0.28); border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.match-registration-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.registration-field { min-width: 0; padding: 1rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; background: rgba(0, 0, 0, 0.18); }
.registration-field-solo, .match-registration-form > .btn { grid-column: 1 / -1; }
.registration-field-label { display: block; margin-bottom: 0.85rem; color: var(--accent-1); font-family: "Space Grotesk", sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.registration-field label { display: block; color: var(--text-main); font-size: 0.92rem; font-weight: 700; }
.match-registration-form input, .match-registration-form select { margin: 0.45rem 0 0; }
.match-registration-form select { min-height: 48px; padding: 0 0.85rem; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; background: rgba(0, 0, 0, 0.4); color: var(--text-main); font: inherit; }
.match-registration-form select[multiple] { min-height: 142px; padding: 0.45rem; }
.match-registration-form select option { padding: 0.55rem 0.6rem; border-radius: 5px; }
.match-registration-form select option:checked { background: var(--accent-1); color: #071018; }
.match-registration-form input:focus, .match-registration-form select:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(88, 208, 192, 0.14); }
.registration-hint { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.match-registration-form > .btn { width: 100%; margin-top: 0.25rem; }
.search-action-row { display: flex; align-items: center; gap: 0.65rem; }
.search-action-row input { flex: 1; min-width: 0; }
.player-search-form label, .team-directory-search label { display: block; margin-bottom: 0.45rem; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.search-results { display: grid; gap: 0.6rem; margin-top: 1rem; }
.search-result-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.16); }
.search-result-row div { min-width: 0; }
.search-result-row strong, .search-result-row span { display: block; overflow-wrap: anywhere; }
.search-result-row span { margin-top: 0.2rem; color: var(--muted); font-size: 0.82rem; }
.team-directory-search { max-width: 620px; margin: 1.5rem 0; }
.match-details + .match-register-card { margin-top: 0.25rem; }
.match-page > .results-shell,
.match-page > .tournament-card,
.match-page > .match-rules { margin-top: 1.5rem; }
.tab-list { display: flex; gap: 0.35rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin: -0.25rem -0.25rem 1.25rem; overflow-x: auto; }
.tab-button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 0.8rem 1rem; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tab-button span { margin-left: 0.35rem; color: var(--accent-2); }
.tab-button.is-active { color: var(--text-main); border-bottom-color: var(--accent-1); }
.tab-panel[hidden] { display: none; }
.result-upload-card { margin-bottom: 2rem; }
.result-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.result-form-grid label { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.result-form-grid input, .result-form-grid select { width: 100%; min-height: 44px; margin: 0.45rem 0 1rem; padding: 0 0.75rem; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; background: rgba(0, 0, 0, 0.4); color: var(--text-main); font: inherit; }
.refresh-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin: 0.35rem 0 1rem;
}
.refresh-row .refresh-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.logo { display: inline-flex; align-items: center; gap: 0.55rem; font-family: "Space Grotesk", sans-serif; }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--accent-1); color: #071018; font-weight: 700; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 0.5rem 0 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.page-header h1, .tournament-header h1 { margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -0.03em; }
.tournament-header > .btn { margin-top: 1rem; margin-bottom: 1rem;}
.page-header p { margin: 0.35rem 0 0; }
.match-title-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.match-title-row .badge { flex: 0 0 auto; }
.search-label { display: block; margin-bottom: 0.45rem; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tournament-filters { max-width: 520px; margin: 1.5rem 0 0; }
.search-bar { margin: 0; }
.events-browser { min-width: 0; }
.event-card { min-height: 310px; position: relative; overflow: hidden; }
.event-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); opacity: 0.8; }
.event-card .card-header { align-items: flex-start; }
.event-card .card-header h3 { max-width: 72%; font-family: "Space Grotesk", sans-serif; line-height: 1.15; }
.event-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.event-meta span { padding: 0.35rem 0.55rem; border: 1px solid rgba(88, 208, 192, 0.22); border-radius: 999px; color: var(--accent-1); font-size: 0.78rem; font-weight: 700; }
.event-capacity { display: flex; align-items: baseline; gap: 0.4rem; padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.event-capacity strong { font-family: "Space Grotesk", sans-serif; font-size: 2rem; color: var(--accent-2); }
.event-capacity span, .event-date { color: var(--muted); }
.event-date { margin: 1rem 0 0; font-size: 0.9rem; }
.event-card[hidden] { display: none; }
.profile-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 1.5rem 0; padding: 1.5rem; background: linear-gradient(120deg, rgba(88, 208, 192, 0.14), rgba(245, 184, 91, 0.08)); border: 1px solid rgba(88, 208, 192, 0.2); border-radius: var(--radius); }
.profile-identity { display: flex; align-items: center; gap: 1rem; }
.profile-avatar { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 16px; background: var(--accent-1); color: #071018; font-family: "Space Grotesk", sans-serif; font-size: 1.8rem; font-weight: 700; }
.profile-identity h2 { margin: 0.2rem 0 0; font-family: "Space Grotesk", sans-serif; }
.profile-identity p { margin: 0.25rem 0 0; }
.profile-joined { padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, 0.15); text-align: right; }
.profile-joined strong { display: block; margin-top: 0.35rem; color: var(--accent-2); }
.profile-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.profile-panel, .profile-history { min-width: 0; }
.profile-panel .card-header h3, .profile-history .card-header h3 { margin-bottom: 0.35rem; }
.profile-panel .card-header p { margin: 0; }
.profile-ign-form label { display: block; margin-top: 0.75rem; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.profile-ign-form label:first-child { margin-top: 0; }
.profile-ign-form input { width: 100%; min-height: 46px; margin: 0.4rem 0 0.65rem; padding: 0 0.85rem; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; background: rgba(0, 0, 0, 0.35); color: var(--text-main); font: inherit; }
.profile-ign-form input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(88, 208, 192, 0.14); }
.profile-list { display: grid; gap: 0.6rem; }
.profile-list-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.profile-list-item span { color: var(--accent-1); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.count-mark { color: var(--accent-2); font-size: 0.9rem; }
.profile-secondary-action { width: 100%; margin-top: 1rem; }
.profile-history { margin-bottom: 1.25rem; }
.profile-table { min-width: 560px; margin-top: 0; }
.search-empty { margin: 1rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tournament-roadmap { margin: 1.5rem 0; padding: 1.25rem; background: rgba(16, 28, 39, 0.76); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: var(--radius); }
.roadmap-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.roadmap-heading h2 { margin: 0.25rem 0 0; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.roadmap-note { padding: 0.35rem 0.6rem; border: 1px solid rgba(245, 184, 91, 0.3); border-radius: 999px; color: var(--accent-2); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.roadmap-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.roadmap-stage { position: relative; min-height: 132px; padding: 0.85rem; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 8px; background: rgba(0, 0, 0, 0.14); }
.roadmap-stage:not(:last-child)::after { content: ""; position: absolute; top: 1.35rem; right: -0.75rem; width: 0.75rem; height: 1px; background: rgba(255, 255, 255, 0.18); }
.roadmap-marker { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.roadmap-copy strong, .roadmap-copy span, .roadmap-copy small { display: block; }
.roadmap-copy strong { margin-bottom: 0.3rem; }
.roadmap-copy span { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.roadmap-copy small { margin-top: 0.55rem; color: var(--accent-2); font-size: 0.72rem; }
.roadmap-complete { border-color: rgba(88, 208, 192, 0.3); }
.roadmap-complete .roadmap-marker { background: var(--accent-1); border-color: var(--accent-1); color: #071018; }
.roadmap-active { border-color: rgba(245, 184, 91, 0.45); background: rgba(245, 184, 91, 0.07); }
.roadmap-active .roadmap-marker { border-color: var(--accent-2); color: var(--accent-2); box-shadow: 0 0 0 4px rgba(245, 184, 91, 0.1); }

.bracket-card { margin: 1.5rem 0 0; padding: 1.25rem; border-radius: var(--radius); border: 1px solid rgba(88, 208, 192, 0.16); background: linear-gradient(135deg, rgba(88, 208, 192, 0.08), rgba(16, 28, 39, 0.92)); }
.bracket-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.bracket-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.18); }
.bracket-item strong { flex: 1; }
.bracket-item small { color: var(--muted); text-transform: capitalize; }
.bracket-badge { padding: 0.3rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--accent-1); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.bracket-qualifier .bracket-badge { color: var(--accent-2); }
.bracket-semifinal .bracket-badge { color: var(--accent-1); }
.bracket-final .bracket-badge { color: #ffd27c; }
.bracket-builder small { display: block; margin-top: 0.35rem; }

@media (max-width: 640px) {
    .registered-table {
        min-width: 0;
    }

    .registered-table th,
    .registered-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }

    .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .room-credentials, .result-form-grid { grid-template-columns: 1fr; }
    .match-registration-form { grid-template-columns: 1fr; }
    .registration-field-solo, .match-registration-form > .btn { grid-column: auto; }
    .search-action-row { align-items: stretch; flex-direction: column; }
    .search-result-row { align-items: stretch; flex-direction: column; }

    /* Keep table layout on small screens while allowing identity values to remain readable. */
    .registered-table th,
    .registered-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.95rem;
    }

    .registered-table th,
    .registered-table td {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Keep horizontal scroll when necessary but avoid visual clipping */
    .results-shell .table-scroll {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide the inner scrollbar on small touch devices for cleaner UI while retaining touch scroll */
    .results-shell .table-scroll {
        -ms-overflow-style: none; /* IE/Edge */
        scrollbar-width: none; /* Firefox */
    }
    .results-shell .table-scroll::-webkit-scrollbar { display: none; }

    /* Column adjustments requested by user */
    /* Slot no. column (registered entries) should be ~8ch (excluding rewards table) */
    .registered-table:not(.rewards-table) th:nth-child(2), .registered-table:not(.rewards-table) td:nth-child(2) {
        width: 8ch;
        max-width: 8ch;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    /* Participant column in results should match username (15ch) */
    .registered-table.result-table th:nth-child(2), .registered-table.result-table td:nth-child(2) {
        width: 15ch;
        max-width: 15ch;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Rewards table: prevent scrolling, coins column fixed to 10ch, rank gets leftover space */
    .rewards-scroll {
        overflow-x: visible; /* allow table to layout within card */
        margin-left: 0;
        margin-right: 0;
    }

    .rewards-table {
        width: 100%;
        table-layout: fixed; /* ensure fixed column sizes so coins column is always visible */
    }

    .rewards-table th:last-child, .rewards-table td:last-child {
        width: 10ch;
        max-width: 10ch;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
    }

    .rewards-table th:first-child, .rewards-table td:first-child {
        /* allow rank column to use remaining space */
        white-space: normal;
    }

    /* Ensure match screenshots are visible on all viewports */
    .match-screenshot {
        margin-top: 1rem;
    }

    .match-screenshot img {
        display: block;
        max-width: 100%;
        height: auto;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 8px;
    }

    /* Style the Match Rules block for improved readability on mobile */
    .match-rules {
        margin-top: 1.25rem;
        padding: 0.9rem 1rem;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.04);
        border-radius: 10px;
    }

    .match-rules h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
    }

    .match-rules ul {
        margin: 0;
        padding-left: 1.15rem;
        color: var(--muted);
    }

    .match-rules ul li {
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }

    @media (max-width: 640px) {
        .match-rules {
            padding: 0.75rem 0.85rem;
        }
    }
}

/* Global Link Reset */
a {
    color: var(--accent-1);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    font-weight: 500;
}


a:hover {
    color: var(--accent-2);
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4); /* Adds a subtle neon glow on hover */
    text-decoration: none;
}


/* Optional: Ensure links inside plain text paragraphs stand out slightly more */
p a {
    border-bottom: 1px solid rgba(79, 172, 254, 0.3); /* Softer alternative to standard underline */
}

p a:hover {
    border-bottom-color: var(--accent-2);
}


.logo { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 800; color: var(--text-main); letter-spacing: 0.2px; font-size: 1.25rem; text-decoration: none; }

.logo-img { display: block; width: 32px; height: 32px; object-fit: contain; }

.content-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.guide-container { max-width: 1040px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.guide-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 100%; }
.guide-card h2 { margin: 0.5rem 0; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; }
.guide-card p { flex: 1; line-height: 1.65; }
.guide-card .btn-ghost { margin-top: 1rem; }
.guide-article { max-width: 900px; margin: 0 auto; }
.guide-article section + section { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.guide-article h2 { margin: 0 0 0.65rem; color: var(--accent-1); font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.guide-article p { max-width: 75ch; margin: 0.65rem 0 0; color: var(--muted); line-height: 1.75; }
.guide-related { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; max-width: 900px; margin: 0 auto; }

/* Scrollbar styling for better appearance */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) rgba(0,0,0,0);
}

/* Webkit browsers */
*::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.14);
}

.section-card p,
.section-card ul {
    color: var(--muted);
    line-height: 1.75;
}


.nav-menu {
    display: none;
    gap: 0.5rem;
    align-items: center;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}


.nav-menu.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.95);
    padding: 1.25rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}


.nav-menu a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}


.nav-menu a.active {
    color: #071018;
    background: var(--accent-1);
    font-weight: 700;
}


.nav-menu a:hover:not(.active) {
    color: var(--text-main);
    background: var(--glass);
}


.nav-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    width: 100%;
}


.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(88, 208, 192, 0.12);
    position: relative;
    cursor: pointer;
}


.nav-icon:hover {
    background: rgba(88, 208, 192, 0.12);
    border-color: rgba(88, 208, 192, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 208, 192, 0.15);
}


.nav-icon:active {
    transform: translateY(0);
}


.nav-icon.active {
    background: rgba(88, 208, 192, 0.15);
    border-color: var(--accent-1);
    color: var(--accent-1);
}


.nav-icon svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}


.nav-icon:hover svg {
    filter: drop-shadow(0 0 4px rgba(88, 208, 192, 0.3));
}


.notifications-icon::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid rgba(16, 28, 39, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}


.notifications-icon.has-notifications::before {
    opacity: 1;
}


.nav-toggle {
    display: block;
    background: transparent;
    border: 0;
    color: var(--text-main);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0;
    flex-shrink: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.logo {
    margin-left: 0;
}


/* ========================================================================== 
   3. HEADERS & ACTIONS
========================================================================== */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}


/* ==========================================================================
   4. BUTTONS & UI COMPONENTS (Mobile Touch Optimized)
========================================================================== */
.btn, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 20px;
    min-height: 44px; /* Mobile touch target minimum */
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}


.btn {
    background: var(--accent-1);
    color: #000;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}


.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}


.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}


.btn-ghost:hover {
    background: var(--glass);
    border-color: rgba(255, 255, 255, 0.3);
}


.btn-full {
    width: 100%;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.admin-pagination {
    padding-top: 0.25rem;
}


.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.badge-live, .badge-ongoing { background-color: var(--accent-2); color: #071018; }
.badge-upcoming { background-color: rgba(88, 208, 192, 0.16); color: var(--accent-1); border: 1px solid rgba(88, 208, 192, 0.3); }
.badge-finished, .badge-completed { background-color: rgba(244, 124, 124, 0.16); color: var(--danger); border: 1px solid rgba(244, 124, 124, 0.3); }


/* ==========================================================================
   5. CARDS & GRIDS (Support Content Focus)
========================================================================== */
.tournament-grid, .teams-list, .dashboard-sections {
    display: grid;
    /* Drops to 1 column gracefully on small phones */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.redeem-card {
    border: 1px solid rgba(79, 172, 254, 0.2);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(3, 11, 19, 0.95));
}

.redeem-balance {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 1.25rem;
}

.redeem-balance strong {
    font-size: 1.5rem;
    color: var(--accent-1);
}

.redeem-options {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.redeem-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.redeem-option input {
    accent-color: var(--accent-1);
    width: 1rem;
    height: 1rem;
}

.redeem-option div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.redeem-option small {
    color: var(--accent-2);
}

.redeem-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.redeem-result {
    margin-top: 1rem;
    border-color: rgba(88, 208, 192, 0.2);
    background: rgba(88, 208, 192, 0.08);
}

.redeem-note {
    margin-top: 1.1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.redeem-note ul {
    margin: 0.55rem 0 0;
    padding-left: 1.1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
}

.form-grid input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.18), rgba(0, 242, 254, 0.08));
    border: 1px solid rgba(79, 172, 254, 0.25);
}

.hero-content {
    flex: 1.4;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hero-content h2 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.hero-panel {
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-panel-card {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(8, 12, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel-card strong {
    display: block;
    font-size: 1rem;
    margin-top: 0.25rem;
}

.muted-label {
    color: var(--accent-2);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    min-height: 120px;
    justify-content: center;
}

.stat-card strong {
    font-size: 1.8rem;
}

.stat-label {
    color: var(--accent-2);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
}

.quick-start-list {
    display: grid;
    gap: 0.8rem;
}

.quick-action {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: var(--accent-1);
}

.quick-action span {
    font-size: 1.3rem;
    line-height: 1;
}

.quick-action strong {
    display: block;
    margin-bottom: 0.2rem;
}

.text-link {
    font-size: 0.9rem;
    color: var(--accent-2);
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-list-item > div {
    min-width: 0;
}

.dashboard-list-item strong {
    overflow-wrap: anywhere;
}

.dashboard-list-item:hover {
    background: rgba(79, 172, 254, 0.12);
}

.card, .tournament-card, .section-card {
    background: var(--panel);
    padding: 1.75rem; /* Increased padding for better card spacing */
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    overflow: visible;
    transition: transform 0.2s, border-color 0.2s;
}


.tournament-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-1);
}


.card-header h3 {
    margin: 0 0 1rem 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
    color: var(--text-main);
    /* Added subtle separation for FAQ titles */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

:is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(245, 184, 91, 0.8);
    outline-offset: 3px;
}


/* ==========================================================================
   6. FORMS & INPUTS (Mobile Optimized)
========================================================================== */
.form-container {
    max-width: 620px;
    width: 100%;
    margin: 2rem auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Input Styling Refinement */
form input:not([type="hidden"]),
form select,
form textarea,
.search-bar,
.match-registration-form input,
.match-registration-form select,
.result-form-grid input,
.result-form-grid select {
    width: 100%;
    padding: 0 0.95rem;
    min-height: 48px;
    margin: 0.5rem 0 1rem;
    border-radius: 10px;
    background: rgba(7, 16, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent-1) 50%), linear-gradient(135deg, var(--accent-1) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

form select option {
    background: var(--panel);
    color: var(--text-main);
}

form select option:checked,
form select option:hover {
    background: rgba(88, 208, 192, 0.16);
    color: var(--text-main);
}

form input:not([type="hidden"]):focus,
form select:focus,
form textarea:focus,
.search-bar:focus,
.match-registration-form input:focus,
.match-registration-form select:focus,
.result-form-grid input:focus,
.result-form-grid select:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

form textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    min-height: 150px;
    margin: 0.5rem 0 1rem;
    border-radius: 10px;
    background: rgba(7, 16, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(244, 124, 124, 0.3);
    background: rgba(244, 124, 124, 0.12);
    color: var(--danger);
}

.form-alert strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--danger);
}

.form-group {
    margin-bottom: 1.25rem; /* Slightly more space for visual separation */
}

.page-container,
.dashboard-container,
.tournament-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.support-section,
.room-details-card {
    width: 100%;
    overflow-wrap: anywhere;
}

/* Specific adjustment for support cards (already good, maintained) */
.support-content .card {
    margin-bottom: 1.5rem; 
}


/* ==========================================================================
   7. MEDIA QUERIES (Mobile App View)
========================================================================== */
@media (max-width: 768px) {
    .table-scroll {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    nav {
        justify-content: space-between;
        position: relative;
    }


    .logo {
        margin-left: 0;
    }

    .nav-left {
        gap: 0.25rem;
    }

    .nav-icons {
        display: flex;
        gap: 0.5rem;
        order: -1;
    }

    .nav-icon {
        width: 40px;
        height: 40px;
    }

    .nav-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile Menu Logic */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(8, 12, 20, 0.95);
        padding: 1.25rem 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 14px 34px rgba(0,0,0,0.4);
        z-index: 1000;
    }
    
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }


    .nav-menu a {
        width: 100%;
        text-align: center;
        min-height: 44px; /* Touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-toggle {
        display: block;
        margin-right: 0.75rem;
    }


    /* Stack hero buttons on mobile */
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn,
    .hero-actions .btn-ghost {
        width: 100%;
    }

    .dashboard-hero {
        flex-direction: column;
    }

    .hero-panel {
        min-width: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .guide-grid { grid-template-columns: 1fr; }

    main { margin-top: 1.25rem; padding: 0 1rem; }
    .page-header { display: block; }
    .page-header h1 { font-size: 1.8rem; }
    .event-card { min-height: 0; }
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .profile-joined { width: 100%; padding: 0.85rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.15); border-left: 0; text-align: left; }
    .profile-grid { grid-template-columns: 1fr; }
    .roadmap-track { grid-template-columns: 1fr; }
    .roadmap-stage { min-height: 0; display: flex; gap: 0.75rem; align-items: flex-start; }
    .roadmap-stage:not(:last-child)::after { top: auto; right: auto; bottom: -0.75rem; left: 1.35rem; width: 1px; height: 0.75rem; }
    .roadmap-marker { flex: 0 0 28px; margin-bottom: 0; }

    .dashboard-list-item {
        align-items: flex-start;
    }
}

/* ==========================================================================
   Admin-specific responsive tweaks
   Improve admin action nav and table readability on small screens
  ========================================================================== */
.admin-action-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0.6rem 0 1rem;
}

.admin-action-nav .muted {
    flex-basis: 100%;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Ensure action buttons are comfortable touch targets */
.admin-action-nav .btn,
.admin-action-nav .btn-ghost,
.admin-action-nav .btn-full {
    min-width: 110px;
}

@media (max-width: 640px) {
    /* Stack admin action buttons for easier tapping */
    .admin-action-nav .btn,
    .admin-action-nav .btn-ghost,
    .admin-action-nav .btn-full {
        width: 100%;
    }

    /* Make table scroll nicer and hide less-important columns to reduce horizontal cramping */
    #match-management .registered-table thead th:nth-child(1), /* ID */
    #match-management .registered-table td:nth-child(1),
    #match-management .registered-table thead th:nth-child(6), /* Start Date */
    #match-management .registered-table td:nth-child(6),
    #match-management .registered-table thead th:nth-child(5), /* Status (optional) */
    #match-management .registered-table td:nth-child(5) {
        display: none;
    }

    #match-management .registered-table th,
    #match-management .registered-table td {
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
    }

    /* Make each row easier to distinguish on small screens */
    #match-management .registered-table tbody tr {
        border-radius: 8px;
        margin-bottom: 0.55rem;
        display: table; /* keep table semantics while improving spacing */
        background: rgba(255,255,255,0.02);
    }

    .dashboard-container .card {
        padding: 0.75rem;
    }

    .dashboard-container .card-body {
        padding: 0.6rem;
    }

    /* Hide the table version of matches and show stacked cards for that section */
    #match-management .table-scroll {
        display: none;
    }

    #match-management .matches-list {
        display: block;
        margin-top: 0.6rem;
    }

    .matches-list .match-card {
        margin-bottom: 0.6rem;
        border-radius: 10px;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.04);
    }

    .matches-list .match-card .card-body {
        padding: 0.65rem;
    }

    /* Specifically hide the first section-card's table (tournaments) and show stacked cards */
    .dashboard-sections > .section-card:nth-of-type(1) .table-scroll {
        display: none;
    }

    .tournaments-list {
        display: block;
        margin-top: 0.6rem;
    }

    .tournaments-list .tournament-card {
        margin-bottom: 0.6rem;
        border-radius: 10px;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.04);
    }

    .tournaments-list .tournament-card .card-body {
        padding: 0.65rem;
    }
}
