:root {
    --bg: #0f0d0b; /* deep dark */
    --panel: #1a1715; /* card */
    --panel-2: #2a2522; /* inner */
    --accent: #c7a15b; /* gold */
    --muted: #b7a999;
    --glow: 0 6px 24px rgba(199, 161, 91, 0.06);
    --radius: 12px;
    --card-padding: 18px;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 880px;           /* keeps the list readable and centered */
    margin: 0.75rem auto 0;     /* center horizontally */
}

.tournament-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.06));
    padding: var(--card-padding);
    border: 1px solid rgba(199, 161, 91, 0.07);
    box-shadow: var(--glow);
    display: grid;
    gap: 0.65rem;
    margin: 20px 0;
    overflow: hidden;                     /* keep accent flush */
    transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.tournament-card:focus-within {
    box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.65),
            0 0 0 3px rgba(96, 165, 250, 0.34); /* stronger for keyboard nav */
}

/* ADD: left accent bar based on status (dark palette) */
.tournament-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent, #64748b); /* neutral fallback */
}


/* Status -> accent color (dark-friendly) this is the left "border" of each card */
.tournament-card::before { background: var(--accent, #64748b); }
.tournament-card[data-status="created"],
.tournament-card[data-status="registration-open"],
.tournament-card[data-status="upcoming"] { --accent: #22c55e; }
.tournament-card[data-status="in-progress"] { --accent: #60a5fa; }
.tournament-card[data-status="completed"] { --accent: #9ca3af; }
.tournament-card[data-status="registration-closed"] { --accent: #f59e0b; }
.tournament-card[data-status="cancelled"] { --accent: #f87171; }



.empty-state {
    padding: 0.75rem 0;
    opacity: 0.8;
}

.tournament-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tournament-card__title {
    margin: 0;
    font-size: 1.45rem;
}

.tournament-card__title a {
    color: #e5e7eb;
}

.tournament-card__subtitle {
    margin: 0;
    opacity: 0.85;
    font-size: 1.2rem;
    color: #e5e7eb;

}

.tournament-card__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.tournament-card__details dt {
    color: #e5e7eb;
    font-weight: 700;
    font-size: 1.2rem;
    opacity: 0.85;
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

/* dates */
.tournament-card__details dd {
    font-weight: 100;
    font-size: 1.2rem;
    margin: 0;
    color: #e5e7eb;
}

/* Actions (View, Signup, Cancel)*/
.tournament-card__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

/* Disabled state */
.tournament-card__actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #444;
    color: #666;
}

#format-label {
    font-weight: 300;
    font-size: 1.2rem;
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

/* Status chips */
.chip {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 1.2rem;
    line-height: 1;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e5e7eb;
}

.chip--created,
.chip--registration-open {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.38);
    color: #86efac;
}
.chip--in-progress {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.40);
    color: #93c5fd;
}
.chip--completed {
    background: rgba(156, 163, 175, 0.16);
    border-color: rgba(156, 163, 175, 0.40);
    color: #d1d5db;
}
.chip--registration-closed {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.40);
    color: #fdba74;
}
.chip--cancelled {
    background: rgba(248, 113, 113, 0.16);
    border-color: rgba(248, 113, 113, 0.40);
    color: #fca5a5;
}
.chip--hidden {
    background: rgba(100, 116, 139, 0.16);
    border-color: rgba(100, 116, 139, 0.40);
    color: #cbd5e1;
}
