/**
 * EPL English Premier League Frontend Styles
 * 2024-25 Premier League Theme Pages
 * Prefix: .epl-* (isolated from other sports modules)
 */

/* ─────────────────────────────────────────
   Variables
   ───────────────────────────────────────── */
:root {
    --epl-purple: #37003c;
    --epl-pink: #e90052;
    --epl-cyan: #04f5ff;
    --epl-green: #00ff85;
    --epl-red: #e74c3c;
    --epl-bg: #f8f9fa;
    --epl-white: #ffffff;
    --epl-text: #333333;
    --epl-text-light: #666666;
    --epl-border: #e0e0e0;
    --epl-radius: 12px;
    --epl-radius-sm: 8px;
    --epl-shadow: 0 2px 8px rgba(55, 0, 60, 0.08);
    --epl-shadow-hover: 0 4px 16px rgba(55, 0, 60, 0.15);
}

/* ─────────────────────────────────────────
   Page Container
   ───────────────────────────────────────── */
.epl-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--epl-text);
    line-height: 1.6;
}

.epl-page__title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: var(--epl-purple);
}

/* ─────────────────────────────────────────
   Hero Banner
   ───────────────────────────────────────── */
.epl-hero {
    background: linear-gradient(135deg, #37003c 0%, #e90052 60%, #04f5ff 100%);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    color: var(--epl-white);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.epl-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,255,133,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.epl-hero::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(4,245,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.epl-hero__title {
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
    position: relative;
    letter-spacing: 0.5px;
}

.epl-hero__subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin: 0 0 24px 0;
    position: relative;
}

/* ─────────────────────────────────────────
   Sub Navigation
   ───────────────────────────────────────── */
.epl-subnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--epl-white);
    border-bottom: 1px solid var(--epl-border);
    margin-bottom: 24px;
    padding: 8px 0;
}

body.admin-bar .epl-subnav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .epl-subnav {
        top: 46px;
    }
}

.epl-subnav__inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.epl-subnav__inner::-webkit-scrollbar {
    display: none;
}

.epl-subnav__link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    color: var(--epl-text);
    background: var(--epl-bg);
    transition: all 0.2s ease;
}

.epl-subnav__link:hover {
    background: var(--epl-purple);
    color: var(--epl-white);
    text-decoration: none;
}

.epl-subnav__link--active {
    background: var(--epl-pink);
    color: var(--epl-white);
}

/* ─────────────────────────────────────────
   Sections
   ───────────────────────────────────────── */
.epl-section {
    margin-bottom: 24px;
}

.epl-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--epl-purple);
    margin: 0 0 16px 0;
    padding-left: 12px;
    border-left: 4px solid var(--epl-pink);
}

/* ─────────────────────────────────────────
   Cards
   ───────────────────────────────────────── */
.epl-card {
    background: var(--epl-white);
    border-radius: var(--epl-radius);
    box-shadow: var(--epl-shadow);
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.epl-card:hover {
    box-shadow: var(--epl-shadow-hover);
}

/* ─────────────────────────────────────────
   Live Badge
   ───────────────────────────────────────── */
.epl-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--epl-red);
    text-transform: uppercase;
}

.epl-live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--epl-red);
    animation: epl-pulse 1.5s ease-in-out infinite;
}

.epl-live-badge::after {
    content: 'LIVE';
}

@keyframes epl-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ─────────────────────────────────────────
   Match Cards
   ───────────────────────────────────────── */
.epl-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.epl-match {
    background: var(--epl-white);
    border-radius: var(--epl-radius);
    box-shadow: var(--epl-shadow);
    padding: 16px 20px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.epl-match:hover {
    box-shadow: var(--epl-shadow-hover);
}

.epl-match--live {
    border-left: 4px solid var(--epl-red);
}

.epl-match--upcoming {
    border-left: 4px solid var(--epl-pink);
}

.epl-match--default {
    border-left: 4px solid var(--epl-border);
}

.epl-match__group {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--epl-purple);
    background: rgba(55, 0, 60, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.epl-match__teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.epl-match__team {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.epl-match__home {
    justify-content: flex-end;
    text-align: right;
}

.epl-match__away {
    justify-content: flex-start;
    text-align: left;
}

.epl-match__score {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 900;
    color: var(--epl-purple);
    min-width: 60px;
    text-align: center;
    padding: 4px 8px;
    background: var(--epl-bg);
    border-radius: var(--epl-radius-sm);
}

.epl-match--live .epl-match__score {
    color: var(--epl-red);
    background: rgba(231, 76, 60, 0.08);
}

.epl-match__date,
.epl-match__venue {
    font-size: 12px;
    color: var(--epl-text-light);
}

.epl-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.epl-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left !important;
    white-space: nowrap;
}

.epl-team-cell .epl-team-logo {
    width: 20px;
    height: 20px;
}

/* ─────────────────────────────────────────
   Standings Tables
   ───────────────────────────────────────── */
.epl-standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 24px;
}

.epl-standings-group {
    margin-bottom: 24px;
}

.epl-standings-group__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--epl-purple);
    margin: 0 0 12px 0;
    padding: 8px 16px;
    background: var(--epl-bg);
    border-radius: var(--epl-radius-sm);
}

.epl-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.epl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--epl-white);
    border-radius: var(--epl-radius-sm);
    overflow: hidden;
    box-shadow: var(--epl-shadow);
}

.epl-table thead th {
    background: var(--epl-purple);
    color: var(--epl-white);
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.epl-table thead th:nth-child(2) {
    text-align: left;
}

.epl-table tbody td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid var(--epl-border);
}

.epl-table tbody td:nth-child(2) {
    text-align: left;
    font-weight: 600;
}

.epl-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

/* Standings qualification zones */
.epl-ucl-zone {
    background: rgba(0, 51, 153, 0.12) !important;
    border-left: 3px solid #003399;
}

.epl-uel-zone {
    background: rgba(255, 140, 0, 0.12) !important;
    border-left: 3px solid #ff8c00;
}

.epl-relegation-zone {
    background: rgba(231, 76, 60, 0.12) !important;
    border-left: 3px solid var(--epl-red);
    color: var(--epl-text-light);
}

.epl-zone-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--epl-white);
    border-radius: var(--epl-radius-sm);
    box-shadow: var(--epl-shadow);
    font-size: 13px;
    font-weight: 600;
}

.epl-zone-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.epl-zone-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid var(--epl-border);
}

.epl-zone-swatch.epl-ucl-zone {
    border-left-width: 3px;
}

.epl-zone-swatch.epl-uel-zone {
    border-left-width: 3px;
}

.epl-zone-swatch.epl-relegation-zone {
    border-left-width: 3px;
}

/* Mini standings */
.epl-table--mini {
    font-size: 13px;
}

.epl-table--mini thead th {
    padding: 6px 8px;
    font-size: 11px;
}

.epl-table--mini tbody td {
    padding: 6px 8px;
}

/* ─────────────────────────────────────────
   Team Grid
   ───────────────────────────────────────── */
.epl-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.epl-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--epl-white);
    border-radius: var(--epl-radius);
    box-shadow: var(--epl-shadow);
    text-decoration: none;
    color: var(--epl-text);
    transition: all 0.2s ease;
}

.epl-team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--epl-shadow-hover);
    text-decoration: none;
    color: var(--epl-pink);
}

.epl-team-card__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.epl-team-card__logo-placeholder {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--epl-bg);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    color: var(--epl-purple);
}

.epl-team-card__name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.epl-team-card__code {
    font-size: 12px;
    color: var(--epl-text-light);
}

/* Team Detail */
.epl-team-detail .epl-page__title {
    font-size: 32px;
}

.epl-back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--epl-pink);
    text-decoration: none;
}

.epl-back-link:hover {
    text-decoration: underline;
}

/* Info list (DL) */
.epl-info-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    margin: 0;
}

.epl-info-list dt {
    font-weight: 600;
    color: var(--epl-text-light);
    font-size: 13px;
}

.epl-info-list dd {
    margin: 0;
    font-weight: 600;
    color: var(--epl-text);
}

/* ─────────────────────────────────────────
   Player Grid
   ───────────────────────────────────────── */
.epl-player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.epl-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--epl-white);
    border-radius: var(--epl-radius);
    box-shadow: var(--epl-shadow);
    text-decoration: none;
    color: var(--epl-text);
    transition: all 0.2s ease;
    text-align: center;
}

.epl-player-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--epl-shadow-hover);
    text-decoration: none;
    color: var(--epl-pink);
}

.epl-player-card__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--epl-bg);
}

.epl-player-card__photo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--epl-bg);
    font-size: 24px;
    font-weight: 700;
    color: var(--epl-purple);
}

.epl-player-card__name {
    font-size: 15px;
    font-weight: 600;
}

.epl-player-card__position,
.epl-player-card__jersey {
    font-size: 12px;
    color: var(--epl-text-light);
}

/* ─────────────────────────────────────────
   News / Injuries Lists
   ───────────────────────────────────────── */
.epl-news-list,
.epl-injuries-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.epl-news-item,
.epl-injury-item {
    background: var(--epl-white);
    border-radius: var(--epl-radius-sm);
    padding: 14px 18px;
    box-shadow: var(--epl-shadow);
    transition: box-shadow 0.2s ease;
}

.epl-news-item:hover,
.epl-injury-item:hover {
    box-shadow: var(--epl-shadow-hover);
}

.epl-news-item__title,
.epl-injury-item__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--epl-purple);
}

.epl-news-item__title a {
    color: inherit;
    text-decoration: none;
}

.epl-news-item__title a:hover {
    color: var(--epl-pink);
    text-decoration: underline;
}

.epl-news-item__meta,
.epl-injury-item__meta {
    font-size: 12px;
    color: var(--epl-text-light);
    margin-bottom: 6px;
}

.epl-news-item__desc,
.epl-injury-item__desc {
    font-size: 13px;
    color: var(--epl-text);
    margin: 0;
}

/* ─────────────────────────────────────────
   Empty State
   ───────────────────────────────────────── */
.epl-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--epl-text-light);
    font-size: 14px;
    background: var(--epl-bg);
    border-radius: var(--epl-radius-sm);
}

/* ─────────────────────────────────────────
   Footer
   ───────────────────────────────────────── */
.epl-footer {
    margin-top: 40px;
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid var(--epl-border);
    font-size: 12px;
    color: var(--epl-text-light);
}

.epl-footer a {
    color: var(--epl-pink);
    text-decoration: none;
}

.epl-footer a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   Responsive
   ───────────────────────────────────────── */
@media (max-width: 900px) {
    .epl-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .epl-standings-grid {
        grid-template-columns: 1fr;
    }

    .epl-hero {
        padding: 32px 20px;
    }

    .epl-hero__title {
        font-size: 28px;
    }

    .epl-hero__subtitle {
        font-size: 15px;
    }
}

@media (max-width: 600px) {
    .epl-team-grid {
        grid-template-columns: 1fr;
    }

    .epl-page__title {
        font-size: 22px;
    }

    .epl-match__score {
        font-size: 17px;
        min-width: 50px;
    }

    .epl-match__team {
        font-size: 13px;
    }
}
