* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --red:    #e63946;
    --orange: #f4a261;
    --dark:   #0d0d1a;
    --card:   #141428;
    --card2:  #1a1a35;
    --text:   #eaeaea;
    --muted:  #666;
    --gold:   #ffd700;
    --blue:   #4fc3f7;
    --green:  #2ed573;
}

body {
    background: var(--dark);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background rings */
.bg-rings {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    animation: spinRing linear infinite;
}
.ring:nth-child(1) { width: 700px; height: 700px; border-color: rgba(230,57,70,0.06);  animation-duration: 25s; }
.ring:nth-child(2) { width: 550px; height: 550px; border-color: rgba(244,162,97,0.06); animation-duration: 18s; animation-direction: reverse; }
.ring:nth-child(3) { width: 400px; height: 400px; border-color: rgba(79,195,247,0.06); animation-duration: 12s; }
.ring:nth-child(4) { width: 250px; height: 250px; border-color: rgba(255,215,0,0.05);  animation-duration: 8s;  animation-direction: reverse; }

@keyframes spinRing { to { transform: rotate(360deg); } }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.04); }
}

/* ---- Layout ---- */
.container {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 16px 100px;
}

/* ---- Header ---- */
header {
    text-align: center;
    padding: 44px 0 28px;
    animation: fadeUp .6s ease both;
}

h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--muted);
    font-size: .9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Navigation ---- */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
nav a {
    display: inline-block;
    padding: 8px 16px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    transition: all .25s;
    white-space: nowrap;
}
nav a:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
}
nav a.active {
    color: var(--text);
    border-color: var(--red);
    background: rgba(230,57,70,0.12);
    box-shadow: 0 0 12px rgba(230,57,70,0.15);
}

/* ---- Counter banner ---- */
.banner {
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 16px;
    padding: 18px 24px;
    text-align: center;
    margin-bottom: 20px;
    animation: fadeUp .7s .1s ease both;
}

.banner-label {
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.banner-count {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    animation: pulse 2s ease-in-out infinite;
    line-height: 1;
}

.banner-sub {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ---- Cards ---- */
.card {
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.card:nth-child(3) { animation: fadeUp .7s .15s ease both; }
.card:nth-child(4) { animation: fadeUp .7s .25s ease both; }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deck-count {
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .5px;
}

/* ---- Form ---- */
.form-group { margin-bottom: 14px; }

label {
    display: block;
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 9px;
    padding: 11px 15px;
    color: var(--text);
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}

textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 9px;
    padding: 11px 15px;
    color: var(--text);
    font-size: .88rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.14);
}

input[list] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}

/* ---- Buttons ---- */
button { cursor: pointer; border: none; border-radius: 9px; font-weight: 600; transition: all .2s; }

.btn-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--red), #c1121f);
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
    border-radius: 14px;
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230,57,70,.4);
}
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }

.btn-ghost {
    background: rgba(255,255,255,.07);
    color: var(--text);
    padding: 8px 16px;
    font-size: .85rem;
}
.btn-ghost:hover { background: rgba(255,255,255,.13); }

.btn-delete {
    background: rgba(230,57,70,.12);
    color: var(--red);
    padding: 5px 10px;
    font-size: .75rem;
    border: 1px solid rgba(230,57,70,.25);
    flex-shrink: 0;
}
.btn-delete:hover { background: var(--red); color: #fff; }

.btn-delete-tournament {
    background: rgba(230,57,70,.08);
    color: var(--red);
    padding: 10px 18px;
    font-size: .82rem;
    border: 1px solid rgba(230,57,70,.3);
    border-radius: 9px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: all .2s;
}
.btn-delete-tournament:hover { background: var(--red); color: #fff; }

/* ---- Alert messages ---- */
.alert {
    border-radius: 9px;
    padding: 11px 15px;
    font-size: .88rem;
    margin-bottom: 14px;
    display: none;
}
.alert.show   { display: block; animation: fadeUp .3s ease; }
.alert.success { background: rgba(46,213,115,.12); border: 1px solid rgba(46,213,115,.3);  color: var(--green); }
.alert.error   { background: rgba(230,57,70,.12);  border: 1px solid rgba(230,57,70,.3);   color: var(--red); }

/* ---- Participants list ---- */
.participants-list { list-style: none; }

.p-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.045);
    margin-bottom: 7px;
    transition: background .2s;
    animation: fadeUp .35s ease both;
}
.p-item:hover { background: rgba(255,255,255,.05); }

.p-item.paid-onsite {
    border-left: 3px solid var(--green);
    background: rgba(46,213,115,.04);
}

/* ---- Onsite-Payment Checkbox ---- */
.cb-onsite-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.cb-onsite {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}
.cb-onsite-label {
    font-size: .7rem;
    color: var(--muted);
    white-space: nowrap;
}
.cb-onsite:checked + .cb-onsite-label {
    color: var(--green);
}

.p-num {
    font-size: .78rem;
    color: var(--muted);
    width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.p-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .95rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.p-info { flex: 1; min-width: 0; }
.p-blader  { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-discord { font-size: .78rem; color: var(--blue); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-date {
    font-size: .72rem;
    color: var(--muted);
    text-align: right;
    flex-shrink: 0;
}

.empty {
    text-align: center;
    padding: 36px;
    color: var(--muted);
}
.empty .e-icon { font-size: 44px; margin-bottom: 12px; opacity: .45; }

.loading-state {
    text-align: center;
    padding: 28px;
    color: var(--muted);
    font-size: .9rem;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.1);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spinRing .7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ---- Admin section ---- */
.admin-panel {
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(230,57,70,.25);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    display: none;
}
.admin-panel.open { display: block; animation: fadeUp .3s ease; }

.admin-panel .card-title { color: var(--red); }

.admin-logged-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-status { color: var(--green); font-size: .9rem; font-weight: 600; }

/* ---- Player Panels ---- */
.players-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}
.player-panel {
    flex: 1 1 200px;
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.player-panel h2 {
    margin-bottom: 0.5rem;
    color: var(--orange);
    font-size: 1.2rem;
}
.score {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    margin: 0.5rem 0;
}
.btn-score {
    margin: 0.2rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--red), #c1121f);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.btn-score:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230,57,70,.4);
}
.btn-group {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0.2rem;
}
.btn-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* Responsive for mobile */
@media (max-width:600px) {
    .players-container {
        flex-direction: column;
        gap: 1.2rem;
    }
    .player-panel {
        flex: 1 1 100%;
        padding: 1.5rem 1rem;
    }
    .player-panel h2 {
        font-size: 1.5rem;
    }
    .score {
        font-size: 4rem;
        margin: 0.6rem 0;
    }
    .btn-score {
        padding: 0.8rem 1.4rem;
        font-size: 1.2rem;
        border-radius: 10px;
        margin: 0.3rem;
    }
    .btn-group {
        margin: 0.4rem;
    }
    .btn-label {
        font-size: 0.85rem;
        margin-top: 5px;
    }
}

/* Extra boost for high-DPI phones */
@media (max-width:600px) and (-webkit-min-device-pixel-ratio: 2) {
    .score {
        font-size: 4.5rem;
    }
    .btn-score {
        padding: 0.9rem 1.6rem;
        font-size: 1.3rem;
    }
}

/* ---- Collapsible participant list ---- */
.card-title-toggle {
    cursor: pointer;
    user-select: none;
}
.card-title-toggle:hover {
    color: var(--gold);
}
#listCollapse.collapsed {
    display: none;
}
#listPreview {
    /* shown when collapsed */
}
#listPreview.collapsed {
    display: none;
}
#listPreview .participants-list .p-item {
    animation: none;
}
.list-more {
    text-align: center;
    padding: 10px;
    color: var(--orange);
    font-size: .82rem;
    cursor: pointer;
    font-weight: 600;
}
.list-more:hover {
    color: var(--gold);
}

/* ---- Footer ---- */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: 1px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 16px;
    margin-top: 12px;
}
.footer-links a,
.footer-links a:visited {
    color: var(--muted);
    font-size: .78rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.15);
    padding-bottom: 1px;
    white-space: nowrap;
}
.footer-links a:hover { color: var(--text); }

.admin-toggle {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 50;
    background: rgba(13,13,26,.92);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: .73rem;
    backdrop-filter: blur(10px);
}
.admin-toggle:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* ---- Config warning ---- */
.config-warning {
    background: rgba(255,215,0,.08);
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    font-size: .88rem;
    line-height: 1.6;
    color: #e0c060;
}
.config-warning strong { color: var(--gold); }
.config-warning code {
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: .85em;
}

/* ---- Beyblade X logo ---- */
.bx-logo {
    display: block;
    margin: 0 auto 18px;
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .92;
}

/* ---- Venue card ---- */
.venue-card {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.07);
    animation: fadeUp .7s .05s ease both;
    position: relative;
}

.venue-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.venue-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(230,57,70,.12), rgba(244,162,97,.08));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.venue-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,13,26,.95) 0%, rgba(13,13,26,.3) 55%, transparent 100%);
}

.venue-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
}

.venue-date-label {
    font-size: .6rem;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.venue-date {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: .5px;
}

.venue-location {
    font-size: .82rem;
    color: rgba(234,234,234,.6);
    margin-top: 4px;
}

/* ---- Payment modal ---- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
}
.modal {
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    transform: translateY(20px) scale(.97);
    transition: transform .25s;
}
.modal-backdrop.open .modal {
    transform: translateY(0) scale(1);
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text);
}
.modal-sub {
    text-align: center;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.modal-amount {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 6px;
}
.modal-pp-label {
    text-align: center;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 22px;
}
.modal-ref {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    padding: 11px 14px;
    margin-bottom: 20px;
    font-size: .82rem;
    color: var(--muted);
}
.modal-ref strong { color: var(--text); }
.btn-copy-ref {
    background: rgba(255,255,255,.06);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .72rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all .2s;
    flex-shrink: 0;
}
.btn-copy-ref:hover {
    background: rgba(255,255,255,.12);
    color: var(--text);
    border-color: rgba(255,255,255,.25);
}
.modal-info-box {
    background: rgba(244,162,97,.08);
    border: 1px solid rgba(244,162,97,.2);
    border-radius: 9px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .82rem;
    color: var(--text);
    line-height: 1.6;
}
.modal-info-box strong { color: var(--orange); }
.modal-info-box ul {
    margin-top: 6px;
    padding-left: 18px;
}
.modal-info-box ul li { margin-bottom: 3px; }
.btn-paypal {
    display: block;
    width: 100%;
    padding: 13px;
    background: #0070ba;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 9px;
    margin-bottom: 10px;
    transition: background .2s, transform .2s;
    letter-spacing: .5px;
}
.btn-paypal:hover { background: #005ea6; transform: translateY(-2px); }
.btn-confirm {
    width: 100%;
    padding: 12px;
    background: rgba(46,213,115,.15);
    color: var(--green);
    border: 1px solid rgba(46,213,115,.3);
    font-size: .92rem;
    margin-bottom: 10px;
}
.btn-confirm:hover { background: rgba(46,213,115,.25); }
.modal-hint {
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    padding: 10px 4px;
}
.btn-cancel-modal {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--muted);
    font-size: .82rem;
}
.btn-cancel-modal:hover { color: var(--text); }

/* ---- Consent checkbox ---- */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.5;
}
.consent-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--red);
    cursor: pointer;
}
.consent-row a {
    color: var(--orange);
    text-decoration: none;
}
.consent-row a:hover { text-decoration: underline; }

/* ---- Challonge public link card ---- */
.challonge-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(79,195,247,0.08), rgba(79,195,247,0.04));
    border: 1px solid rgba(79,195,247,0.22);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: background .2s, border-color .2s, transform .2s;
    gap: 12px;
}
.challonge-link-card:hover {
    background: linear-gradient(135deg, rgba(79,195,247,0.15), rgba(79,195,247,0.08));
    border-color: rgba(79,195,247,0.4);
    transform: translateY(-2px);
}
.challonge-link-left  { display: flex; align-items: center; gap: 12px; }
.challonge-link-title { font-size: .92rem; font-weight: 700; color: var(--text); }
.challonge-link-sub   { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.challonge-link-arrow { font-size: .82rem; font-weight: 600; color: var(--blue); white-space: nowrap; flex-shrink: 0; }
.challonge-link-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 8px var(--blue);
    flex-shrink: 0;
}

/* ---- Challonge bar ---- */
.challonge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(79,195,247,0.06);
    border: 1px solid rgba(79,195,247,0.18);
    border-radius: 9px;
    padding: 9px 14px;
    gap: 10px;
    flex-wrap: wrap;
}
.challonge-info { display: flex; align-items: center; gap: 8px; }
.btn-top16 {
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(46,213,115,0.12), rgba(46,213,115,0.06));
    color: var(--green);
    border: 1px solid rgba(46,213,115,0.28);
    border-radius: 9px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.btn-top16:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(46,213,115,0.22), rgba(46,213,115,0.12));
    border-color: rgba(46,213,115,0.45);
}
.btn-top16:disabled { opacity: .5; cursor: not-allowed; }

.btn-lock {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(46,213,115,.25);
    background: rgba(46,213,115,.10);
    color: var(--green);
    transition: all .2s;
}
.btn-lock:hover { background: rgba(46,213,115,.20); }
.btn-lock.locked {
    border-color: rgba(244,162,97,.25);
    background: rgba(244,162,97,.10);
    color: var(--orange);
}
.btn-lock.locked:hover { background: rgba(244,162,97,.20); }

.challonge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--blue);
}

/* ---- Full state ---- */
.banner-count.full { color: var(--red); }

.full-notice {
    background: rgba(230,57,70,.1);
    border: 1px solid rgba(230,57,70,.3);
    border-radius: 9px;
    padding: 14px 16px;
    color: var(--red);
    font-size: .92rem;
    font-weight: 600;
    text-align: center;
}

/* ---- Tournament overview cards ---- */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tournament-card {
    background: linear-gradient(135deg, var(--card), var(--card2));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    animation: fadeUp .5s ease both;
    position: relative;
}
.tournament-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(230,57,70,.15);
    border-color: rgba(230,57,70,.3);
}
.tournament-card.past {
    opacity: .7;
}
.tournament-card.past:hover {
    opacity: .9;
    border-color: rgba(255,255,255,.15);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.tc-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.tc-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(230,57,70,.15), rgba(244,162,97,.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.tc-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}
.tc-badge.upcoming {
    background: rgba(46,213,115,.18);
    color: var(--green);
    border: 1px solid rgba(46,213,115,.35);
}
.tc-badge.past {
    background: rgba(102,102,102,.2);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.1);
}

.tc-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tc-date {
    font-size: .88rem;
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 4px;
}

.tc-location {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.4;
}

.tc-spots {
    font-size: .78rem;
    font-weight: 700;
    color: var(--blue);
    margin-top: 4px;
}

.tc-body-link {
    display: block;
    padding: 18px 20px 10px;
    text-decoration: none;
    color: inherit;
}
.tc-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: gap .2s;
}
.tournament-card:hover .tc-arrow {
    gap: 10px;
}
.tournament-card.past .tc-arrow {
    color: var(--muted);
}

.tc-actions {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 10px 20px 14px;
}
.tc-action-link {
    font-size: .78rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    transition: color .2s;
}
.tc-action-link:hover {
    color: var(--text);
}
.tournament-card.past .tc-action-link {
    color: var(--muted);
}

/* ---- Section headings ---- */
.tournament-section-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.tournament-section-title.upcoming {
    color: var(--green);
    border-color: rgba(46,213,115,.15);
}
.tournament-section-title.past {
    color: var(--muted);
    border-color: rgba(255,255,255,.05);
}
.tournament-section-title.hidden-section {
    color: var(--orange);
    border-color: rgba(244,162,97,.2);
}

/* ---- Pending section (admin only) ---- */
.pending-section {
    margin-bottom: 20px;
}
.pending-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--orange);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pending-badge {
    background: var(--red);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    border-radius: 99px;
    padding: 1px 7px;
}
.p-item.pending-item {
    border-color: rgba(244,162,97,.2);
    background: rgba(244,162,97,.04);
}
.btn-confirm-pay {
    background: rgba(46,213,115,.15);
    color: var(--green);
    border: 1px solid rgba(46,213,115,.3);
    padding: 5px 10px;
    font-size: .75rem;
    flex-shrink: 0;
}
.btn-confirm-pay:hover { background: var(--green); color: #0d0d1a; }

@media (max-width: 540px) {
    .p-date { display: none; }
    h1 { letter-spacing: 1px; }
    .venue-img { height: 160px; }
    .venue-info { padding: 10px 14px; }
    .venue-date { font-size: .82rem; }
    .venue-location { font-size: .7rem; margin-top: 2px; }
    .tournament-grid { grid-template-columns: 1fr; }
    .tc-image, .tc-image-placeholder { height: 140px; }
}

/* ── Collapsible Toggle (Bannliste, etc.) ──────────────── */
.ban-toggle-header {
    cursor: pointer;
    user-select: none;
    transition: color .2s;
}
.ban-toggle-header:hover {
    color: var(--text);
}
.ban-chevron {
    display: inline-block;
    width: 16px;
    font-size: .7rem;
    transition: transform .2s;
    color: var(--muted);
}

/* ── Discord Bannliste ─────────────────────────────────── */
.ban-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ban-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 9px;
    font-size: .84rem;
    transition: background .2s;
}

.ban-item:hover {
    background: rgba(230, 57, 70, 0.14);
}

.ban-item strong {
    color: var(--red);
    font-weight: 600;
}

.ban-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ban-date {
    font-size: .7rem;
    color: var(--muted);
}

.btn-unban {
    flex-shrink: 0;
    padding: 5px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    color: var(--text);
    font-size: .76rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.btn-unban:hover {
    background: rgba(46, 213, 115, 0.15);
    border-color: var(--green);
    color: var(--green);
}

/* ── Winning Combos ─────────────────────────────────── */
.wc-podium {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.wc-player-card {
    background: var(--card);
    border: 2px solid rgba(255,255,255,.06);
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
    flex: 1 1 280px;
    max-width: 440px;
    animation: fadeUp .5s ease both;
    position: relative;
    overflow: hidden;
    transition: transform .25s, border-color .25s;
}
.wc-player-card:hover { transform: translateY(-4px); }
.wc-player-card.gold  { border-color: rgba(255,215,0,.35); box-shadow: 0 4px 30px rgba(255,215,0,.08); }
.wc-player-card.silver { border-color: rgba(192,192,192,.25); box-shadow: 0 4px 24px rgba(192,192,192,.05); }
.wc-player-card.bronze { border-color: rgba(205,127,50,.25); box-shadow: 0 4px 24px rgba(205,127,50,.05); }

.wc-card-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.wc-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 130px;
}

.wc-placement-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
}
.wc-placement-badge.gold-bg  { background: linear-gradient(135deg,#ffd700,#c8a600); color: #1a1a00; }
.wc-placement-badge.silver-bg{ background: linear-gradient(135deg,#c0c0c0,#909090); color: #1a1a1a; }
.wc-placement-badge.bronze-bg{ background: linear-gradient(135deg,#cd7f32,#a0522d); color: #fff; }

.wc-player-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.12);
    margin: 0 0 10px;
    display: block;
    background: rgba(255,255,255,.03);
}

.wc-player-img-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.08);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    background: rgba(255,255,255,.03);
}

.wc-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
    word-break: break-word;
}

.wc-combos-list {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.wc-combo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    color: var(--muted);
    background: rgba(255,255,255,.025);
    border-radius: 8px;
    padding: 8px 10px;
}

.wc-combo-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    font-weight: 800;
    flex-shrink: 0;
}
.wc-combo-num.n1 { background: rgba(79,195,247,.18); color: var(--blue); }
.wc-combo-num.n2 { background: rgba(46,213,115,.18); color: var(--green); }
.wc-combo-num.n3 { background: rgba(244,162,97,.18); color: var(--orange); }

.wc-combo-parts { line-height: 1.45; }
.wc-combo-parts strong { color: var(--text); }

.wc-tournament-selector { margin-bottom: 20px; }
.wc-tournament-selector select {
    width: 100%;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-size: .95rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
.wc-tournament-selector select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(230,57,70,.14);
}
.wc-tournament-selector select option { background: var(--card); color: var(--text); }

.wc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}
.wc-empty-icon { font-size: 3rem; margin-bottom: 12px; }

.wc-tournament-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Image Upload ──────────────────────────────────── */
.img-upload-area {
    border: 2px dashed rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 12px;
}
.img-upload-area:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.02); }
.img-upload-area.has-image { border-style: solid; border-color: rgba(46,213,115,.3); background: rgba(46,213,115,.04); }

.img-upload-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    display: block;
    border: 3px solid rgba(255,255,255,.12);
}

.img-upload-text { font-size: .78rem; color: var(--muted); }
.img-upload-text strong { color: var(--text); }
.img-upload-note { font-size: .68rem; color: var(--muted); margin-top: 6px; }

.admin-section {
    margin-bottom: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.admin-section-title { font-size: .8rem; font-weight: 700; color: var(--blue); margin-bottom: 12px; }
.admin-section-title.danger { color: var(--red); }

.btn-submit.btn-save { background: var(--green); color: var(--dark); }
.btn-submit.btn-save:hover { background: #27ae60; }
.btn-submit.btn-delete { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-submit.btn-delete:hover { background: var(--red); color: #fff; }

@media (max-width: 600px) {
    .wc-podium { flex-direction: column; align-items: center; }
    .wc-player-card { max-width: 100%; }
    .wc-card-body { flex-direction: column; align-items: center; }
    .wc-card-left { min-width: 0; }
    .wc-combos-list { width: 100%; }
}
