:root {
    color-scheme: light;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f5f7;
    color: #0f172a;
}

html {
    scrollbar-gutter: stable;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f5f7;
    color: #0f172a;
    line-height: 1.5;
}

a {
    color: inherit;
}

/* Alert Banners */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem auto;
    max-width: 1200px;
    border-radius: 0.65rem;
    border-left: 4px solid;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

.alert p {
    margin: 0;
    font-size: 0.95rem;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background-color: #ffffff;
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
    visibility: visible !important;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.navbar-brand img {
    width: 42px;
    height: auto;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.navbar-links a {
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.navbar-links a:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.navbar-links a.active {
    background-color: rgba(29, 78, 216, 0.15);
    color: #1d4ed8;
}

.sub-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 50px;
    margin-bottom: 1rem;
    position: sticky;
    top: 72px;
    z-index: 19;
}

.sub-navbar-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    height: 100%;
}

.sub-navbar-links li {
    height: 100%;
    display: flex;
    align-items: center;
}

.sub-navbar-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    padding: 0 0.25rem;
}

.sub-navbar-links a:hover {
    color: #0f172a;
}

.sub-navbar-links a.active {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

.player-badge a {
    background-color: rgba(29, 78, 216, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.player-badge a:hover {
    background-color: rgba(29, 78, 216, 0.2);
}

.player-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-login {
    background-color: #1d4ed8;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
}

.hero {
    padding: 2.75rem 1.5rem 3rem;
    text-align: center;
    background: linear-gradient(140deg, #1d4ed8, #7c3aed);
    color: #ffffff;
}

.hero h1 {
    font-size: 1.95rem;
    margin-bottom: 0.75rem;
}

.hero p {
    max-width: 30rem;
    margin: 0 auto 1.5rem;
}

.cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.cta:hover {
    background-color: rgba(255, 255, 255, 0.32);
}

main {
    width: min(48rem, 92vw);
    margin: 1.5rem auto 0;
    flex: 1;
}

.home-hero {
    display: grid;
    gap: 1rem;
    padding: 2.5rem 1.75rem 2.75rem;
    margin-bottom: 2.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(140deg, #0f172a, #1d4ed8 55%, #7c3aed);
    color: #ffffff;
    text-align: center;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
}

.home-hero h1 {
    font-size: clamp(1.8rem, 2.7vw + 1.6rem, 2.6rem);
    letter-spacing: -0.02em;
}

.home-hero p {
    max-width: 32rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.92);
}

.home-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    background-color: rgba(15, 23, 42, 0.18);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
    background-color: rgba(15, 23, 42, 0.3);
    border-color: rgba(255, 255, 255, 0.75);
}

.matches {
    padding: 2rem 0;
}

.matches h2 {
    font-size: 1.65rem;
    margin-bottom: 1rem;
}

.fixture-list {
    list-style: none;
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fixture-card {
    padding: 1.2rem;
    border-radius: 1rem;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.fixture-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.fixture-meta,
.fixture-venue,
.fixture-status {
    margin-bottom: 0.3rem;
    color: #475569;
    font-size: 0.94rem;
}

.fixture-status {
    font-weight: 600;
}

.league-note {
    font-size: 0.85rem;
    color: #64748b;
}

.card-grid {
    display: grid;
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.card {
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.65rem;
}

.card p {
    color: #475569;
}

.info-section {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 1.1rem;
    background-color: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.info-section h2 {
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
}

.info-section p {
    color: #475569;
}

.info-section a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}

.notice {
    padding: 1rem;
    border-radius: 0.85rem;
    background-color: rgba(37, 99, 235, 0.12);
    color: #0f172a;
}

.notice-error {
    background-color: rgba(220, 38, 38, 0.15);
    color: #7f1d1d;
}

.notice-success {
    background-color: rgba(34, 197, 94, 0.14);
    color: #166534;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    color: #475569;
}

.admin-body {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.admin-main {
    width: min(60rem, 92vw);
    margin: 2rem auto 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.admin-subtitle {
    color: #475569;
    max-width: 34rem;
}

.admin-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    border-radius: 1.1rem;
    background-color: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-heading.section-heading-with-action {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.section-heading.section-heading-with-action > :first-child {
    flex: 1 1 auto;
}

.btn-primary .icon,
.btn-secondary .icon,
.btn-inline .icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .section-heading.section-heading-with-action {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading.section-heading-with-action > :last-child {
        width: 100%;
    }
}

.flash-container {
    display: grid;
    gap: 0.85rem;
}

.btn-primary,
.btn-secondary,
.btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    border-radius: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.btn-primary {
    background-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(29, 78, 216, 0.28);
}

.btn-primary:disabled,
.btn-primary[disabled] {
    background-color: rgba(29, 78, 216, 0.35);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.16);
}

.btn-inline {
    margin-top: 1rem;
    padding-left: 0;
    padding-right: 0;
    color: #1d4ed8;
    background-color: transparent;
    box-shadow: none;
}

.btn-inline::after {
    content: " →";
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-soft {
    background-color: rgba(15, 23, 42, 0.06);
    color: #475569;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.tournament-grid {
    display: grid;
    gap: 1.25rem;
}

.tournament-card {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.tournament-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tournament-card-header h3 {
    font-size: 1.15rem;
}

.tournament-meta {
    color: #64748b;
    font-size: 0.9rem;
}

.tournament-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tournament-stats div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tournament-stats dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.tournament-stats dd {
    font-size: 1.1rem;
    font-weight: 700;
}

.competition-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.competition-list li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background-color: rgba(37, 99, 235, 0.08);
}

.competition-name {
    font-weight: 600;
}

.competition-id {
    font-size: 0.85rem;
    color: #475569;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background-color: #ffffff;
    font-size: 1rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group select option {
    color: #0f172a;
}

.admin-toolbar {
    align-items: stretch;
}

.admin-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-nav {
    background-color: #ffffff;
    border-radius: 0.85rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    margin-bottom: 1rem;
}

.admin-nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.admin-nav-links a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 0.65rem;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    text-align: center;
    min-width: 95px;
}

.admin-nav-links a:hover {
    background-color: rgba(29, 78, 216, 0.08);
    color: #1d4ed8;
}

.admin-nav-links a.active {
    background-color: #1d4ed8;
    color: #ffffff;
}

.admin-crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
}

.admin-crumb:hover {
    text-decoration: underline;
}

.form-hint {
    font-size: 0.85rem;
    color: #64748b;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-actions-inline {
    justify-content: flex-start;
}

.round-filter {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.round-filter-label {
    font-weight: 600;
    color: #475569;
}

.round-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.round-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.2);
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.round-pill:hover {
    background-color: rgba(37, 99, 235, 0.25);
}

.round-pill.is-active {
    background-color: #1d4ed8;
    color: #ffffff;
}

.event-selector {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.event-selector li {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 1rem;
    background-color: rgba(148, 163, 184, 0.12);
}

.event-selector label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
}

.event-selector input[type="checkbox"] {
    margin-top: 0.15rem;
}

.event-title {
    font-weight: 600;
}

.event-selector-meta {
    padding-left: 1.85rem;
    color: #475569;
    font-size: 0.9rem;
}

.fixture-board {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.fixture-board li {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 1rem;
    background-color: rgba(37, 99, 235, 0.08);
}

.fixture-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.player-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.player-list li {
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background-color: rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 0.35rem;
}

.player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.player-name {
    font-weight: 600;
}

.player-meta {
    font-size: 0.88rem;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.player-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background-color: rgba(37, 99, 235, 0.08);
}

.form-grid {
    display: grid;
    gap: 1rem;
}

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

.form-grid input {
    font-weight: 400;
}

.admin-form textarea,
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="date"],
.admin-form select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background-color: #ffffff;
    font-size: 1rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form textarea:focus,
.admin-form input[type="text"]:focus,
.admin-form input[type="email"]:focus,
.admin-form input[type="date"]:focus,
.admin-form select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2);
}

.admin-form textarea {
    min-height: 6rem;
    resize: vertical;
}

.roster-actions {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.roster-card {
    padding: 1.35rem;
    border-radius: 1rem;
    background-color: rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 0.85rem;
}

.stacked-form {
    display: grid;
    gap: 0.85rem;
}

.player-list-inline {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.roster-card button {
    justify-self: flex-start;
}

@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .tournament-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fixture-header {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .roster-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .tournament-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Rules Page Styles */
.rules-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.lang-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.rules-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

.rules-content h1 {
    font-size: 2.25rem;
    color: #0f172a;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.rules-content h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.rules-content h3 {
    font-size: 1.25rem;
    color: #334155;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.rules-content section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
}

.scoring-list {
    list-style: none;
    padding: 0;
}

.scoring-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.1rem;
}

.scoring-list li:last-child {
    border-bottom: none;
}

.points {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 1rem;
    min-width: 70px;
    text-align: center;
    font-size: 0.9rem;
}

.points.zero {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.example {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.match-result {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
}

.example-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.example-bets {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-bets li {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.example-bets li strong {
    font-size: 1rem;
    min-width: 3rem;
    text-align: center;
}

.example-bets li:last-child {
    border-bottom: none;
}

.rules-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 1rem;
}

.rules-text p:last-child {
    margin-bottom: 0;
}

.rules-text strong {
    color: #1e293b;
    font-weight: 600;
}

.prize-section,
.tiebreaker-section,
.payment-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0284c7;
}

.payment-section {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #eab308;
}

/* Navbar & Dropdown Styles moved from base.html */
.btn-view-toggle {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
    margin: 0;
}
.btn-view-toggle:hover {
    color: #0f172a;
}

.navbar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.tournament-selector {
    position: relative;
}

.tournament-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    margin-left: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.tournament-toggle:hover {
    background-color: rgba(243, 156, 18, 0.1);
}

.tournament-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tournament-dropdown.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.tournament-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
}

.tournament-dropdown-item:hover {
    background-color: rgba(243, 156, 18, 0.1);
}

.tournament-dropdown-item.active {
    background-color: rgba(243, 156, 18, 0.15);
    border-left-color: #f39c12;
    color: #f39c12;
}

.player-dropdown {
    position: relative;
}

.player-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(29, 78, 216, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.player-toggle:hover {
    background-color: rgba(29, 78, 216, 0.2);
}

.player-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    min-width: 240px;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.player-dropdown-menu.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dropdown-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.3;
}

.dropdown-email {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

.player-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.player-dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.player-dropdown-item svg {
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.player-dropdown-item:hover svg {
    color: #667eea;
}

.player-dropdown-item.logout-item:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.player-dropdown-item.logout-item:hover svg {
    color: #dc2626;
}

/* Stats Row & Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.35rem;
    border-radius: 0.65rem;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.stat-card.stat-success {
    background-color: #d1fae5;
    border-color: #10b981;
}

.stat-card.stat-success .stat-value {
    color: #065f46;
}

.stat-card.stat-warning {
    background-color: #fef3c7;
    border-color: #f59e0b;
}

.stat-card.stat-warning .stat-value {
    color: #92400e;
}

.stat-card.stat-secondary {
    background-color: #e0e7ff;
    border-color: #818cf8;
}

.stat-card.stat-secondary .stat-value {
    color: #3730a3;
}

.stat-card.stat-info {
    background-color: #dbeafe;
    border-color: #60a5fa;
}

.stat-card.stat-info .stat-value {
    color: #1e40af;
}

/* Stats Navigation */
.stats-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    padding: 0.5rem;
    border-radius: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.stats-nav-item {
    padding: 0.5rem 1.25rem;
    border-radius: 0.65rem;
    text-decoration: none;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.stats-nav-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.stats-nav-item.active {
    background-color: #1d4ed8;
    color: #ffffff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    font-weight: 600;
    color: #64748b;
    background-color: #f8fafc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.admin-table tr:hover td {
    background-color: #f8fafc;
}

/* Tooltips */
.user-tooltip-container {
    position: relative;
    display: inline-block;
    cursor: help;
}

.user-tooltip {
    visibility: hidden;
    width: max-content;
    max-width: 250px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    pointer-events: none;
}

.user-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.user-tooltip-container:hover .user-tooltip {
    visibility: visible;
    opacity: 1;
}

.user-id-badge {
    font-family: monospace;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #475569;
    font-size: 0.85rem;
}

.tournament-ids {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
