/* ===== Leagues Page CSS ===== */

/* Hero Section */
.leagues-hero {
    background:
        radial-gradient(circle at 20% 80%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.08) 0%, transparent 40%),
        linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e3a5f 100%);
    padding: 40px 0 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.leagues-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, rgba(249, 115, 22, 0.25) 2px, transparent 2px),
        radial-gradient(circle, rgba(13, 148, 136, 0.2) 2px, transparent 2px),
        radial-gradient(circle, rgba(251, 191, 36, 0.2) 2px, transparent 2px);
    background-size: 60px 60px, 80px 80px, 100px 100px;
    background-position: 0 0, 30px 30px, 60px 15px;
    pointer-events: none;
    animation: dotsFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes dotsFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.leagues-hero>* {
    position: relative;
    z-index: 1;
}


.league-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.league-title-text {
    color: #fbbf24;
}

.title-row {
    gap: 20px;
}

/* Meta Chips */
.league-meta-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.chip-soft {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.chip-status {
    background: #10b981;
    color: #fff;
}

/* Filter Form */
.leagues-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.leagues-filter .form-select {
    min-width: 150px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.leagues-filter .form-select option {
    color: #1e3a5f;
    background: #fff;
}

.leagues-filter .btn-primary {
    border-radius: 8px;
    padding: 8px 20px;
}

/* Trophy Hero */
.trophy-hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%);
    padding: 40px 0;
}

.trophy-wrap {
    text-align: center;
}

.trophy-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: #fbbf24;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.trophy-title i {
    font-size: 2rem;
}

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.tier {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trophy {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
}

.trophy-gold {
    color: #fbbf24;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.5));
}

.trophy-silver {
    color: #cbd5e1;
    filter: drop-shadow(0 0 10px rgba(203, 213, 225, 0.5));
}

.trophy-bronze {
    color: #f59e0b;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.step {
    width: 80px;
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    border-radius: 8px 8px 0 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
}

.step-1 {
    height: 100px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e3a5f;
}

.step-2 {
    height: 70px;
}

.step-3 {
    height: 50px;
}

.tier-1 .trophy {
    font-size: 3rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Leagues List */
.leagues-list {
    padding: 50px 0;
    background: #f8fafc;
}

/* League Card */
.league-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.league-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.league-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pill-category {
    background: #e0f2fe;
    color: #0369a1;
}

.pill-status {
    color: #fff;
}

.status-success {
    background: #10b981;
}

.status-secondary {
    background: #64748b;
}

.status-info {
    background: #06b6d4;
}

.status-dark {
    background: #1e293b;
}

.status-neutral {
    background: #94a3b8;
}

/* League Card Content */
.league-card .league-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #1e3a5f;
}

.league-card .league-title a {
    color: inherit;
    transition: color 0.3s ease;
}

.league-card .league-title a:hover {
    color: #3b82f6;
}

.league-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.league-meta i {
    color: #3b82f6;
    width: 18px;
}

.league-desc {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.league-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.league-actions .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 10px 15px;
    border-radius: 8px;
}

/* Coming Soon */
.coming-soon-hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: #fff;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .leagues-hero {
        padding: 30px 0;
    }

    .league-title {
        font-size: 1.5rem;
    }

    .leagues-filter {
        width: 100%;
        margin-top: 15px;
    }

    .leagues-filter .form-select {
        flex: 1;
        min-width: 100px;
    }

    .podium {
        max-width: 300px;
    }

    .step {
        width: 60px;
    }

    .trophy {
        font-size: 2rem;
    }

    .tier-1 .trophy {
        font-size: 2.5rem;
    }

    .league-actions {
        flex-direction: column;
    }

    .league-actions .btn {
        width: 100%;
    }
}

/* ===== League Detail Page ===== */

/* League Header */
.league-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    padding: 40px 0 20px;
    color: #fff;
}

.league-header h1,
.league-header h2,
.league-header h3,
.league-header h4,
.league-header h5,
.league-header .fw-bold {
    color: #fff !important;
}

.league-title-season {
    font-weight: 400;
    font-size: 0.9em;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

.btn-back {
    border-radius: 8px;
}


/* View Tabs */
.view-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.view-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.view-tab.active {
    background: #fbbf24;
    color: #1e3a5f;
}

/* League Content */
.league-content {
    background: #f8fafc;
    min-height: 400px;
}

/* Standings Table */
.standings-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.standings-table thead {
    background: linear-gradient(135deg, #1e3a5f 0%, #334155 100%);
    color: #fff;
}

.standings-table thead th {
    font-weight: 600;
    padding: 15px 12px;
    border: none;
}

.standings-table tbody td {
    padding: 12px;
    vertical-align: middle;
}

.standings-table tbody tr:hover {
    background: #f1f5f9;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
}

.team-name {
    font-weight: 500;
    color: #1e293b;
}

.team-link {
    text-decoration: none;
    color: inherit;
}

.team-link:hover .team-name {
    color: #3b82f6;
}

/* Match List (vbmatch) */
.vbmatch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.vbmatch-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.vbmatch-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.vbmatch-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
}

.vbmatch-disabled a {
    cursor: default;
}

.vbmatch-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vbmatch-team {
    flex: 1;
    text-align: center;
}

.vbmatch-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
}

.vbmatch-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.vbmatch-team-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.2;
}

.vbmatch-vs {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    padding: 0 10px;
}

.vbmatch-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.vbmatch-score-home,
.vbmatch-score-away {
    color: #1e3a5f;
}

.vbmatch-score-divider {
    color: #94a3b8;
}

.vbmatch-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
}

.vbmatch-time,
.vbmatch-league {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Team Card */
.team-card {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.team-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .league-header {
        padding: 30px 0 15px;
    }

    .view-tabs {
        width: 100%;
    }

    .view-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .vbmatch-list {
        grid-template-columns: 1fr;
    }

    .vbmatch-logo {
        width: 40px;
        height: 40px;
    }

    .vbmatch-team-name {
        font-size: 0.8rem;
    }

    .standings-table {
        font-size: 0.85rem;
    }

    .team-logo {
        width: 24px;
        height: 24px;
    }
}