/* ============================================================
   GOAT'S LEAGUE — Partenope Duel Format
   ============================================================ */

.lg-page {
    position: relative;
    min-height: 100vh;
    padding: 110px 0 80px;
}

/* --- Landing Page ---------------------------------------- */
.lg-landing {
    text-align: center;
    padding: 20px 0 10px;
}
.lg-landing__badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 100px;
    background: rgba(232, 96, 90, .1);
    border: 1px solid rgba(232, 96, 90, .2);
    color: var(--coral);
    font-family: var(--font-display);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.lg-landing__icon {
    font-size: 4rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px var(--coral-glow));
}
.lg-landing__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.lg-landing__tagline {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Features */
.lg-landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0;
}
.lg-landing-feature {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), transform .2s ease;
}
.lg-landing-feature:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}
.lg-landing-feature__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: var(--radius-md);
    background: rgba(232, 96, 90, .1);
    color: var(--coral);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.lg-landing-feature h3 {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: .5px;
}
.lg-landing-feature p {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* CTA Card */
.lg-landing-cta {
    max-width: 520px;
    margin: 0 auto 40px;
}
.lg-landing-cta__card {
    text-align: center;
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.lg-landing-cta__card h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.lg-landing-cta__card > p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}
.lg-landing-cta__buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Status messages */
.lg-landing-cta__status {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    padding: 20px;
    border-radius: var(--radius-md);
}
.lg-landing-cta__status i {
    font-size: 1.3rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.lg-landing-cta__status strong {
    display: block;
    margin-bottom: 4px;
    font-size: .88rem;
    color: var(--text-primary);
}
.lg-landing-cta__status p {
    font-size: .8rem;
    color: var(--text-muted);
}
.lg-landing-cta__status--pending {
    background: rgba(255, 193, 7, .06);
    border: 1px solid rgba(255, 193, 7, .15);
}
.lg-landing-cta__status--pending i { color: #fbbf24; }
.lg-landing-cta__status--rejected {
    background: rgba(239, 68, 68, .05);
    border: 1px solid rgba(239, 68, 68, .12);
}
.lg-landing-cta__status--rejected i { color: #ef4444; }

/* --- Header ---------------------------------------------- */
.lg-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.lg-header__icon {
    font-size: 2.8rem;
    line-height: 1;
}
.lg-header__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
}
.lg-header__subtitle {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- My Position ----------------------------------------- */
.lg-my-position {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
.lg-my-pos-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.lg-my-pos-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(232, 96, 90, .1);
    color: var(--coral);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.lg-my-pos-card__icon--month {
    background: rgba(59, 130, 246, .1);
    color: #60a5fa;
}
.lg-my-pos-card__rank {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.lg-my-pos-card__rank span {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.lg-my-pos-card__label {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Month Select ---------------------------------------- */
.lg-month-select {
    appearance: none;
    padding: 8px 36px 8px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--coral);
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23E8605A' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-height: 36px;
}
.lg-month-select:hover {
    border-color: var(--coral);
    background-color: rgba(232, 96, 90, .06);
}
.lg-month-select:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-glow);
}
.lg-month-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* --- Scoring System -------------------------------------- */
.lg-scoring {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.lg-scoring__item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.lg-scoring__value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}
.lg-scoring__label {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.lg-scoring__item--win .lg-scoring__value { color: #4ade80; }
.lg-scoring__item--draw .lg-scoring__value { color: #fbbf24; }
.lg-scoring__item--loss .lg-scoring__value { color: var(--text-muted); }

/* --- Tabs ------------------------------------------------ */
.lg-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 5px;
    margin-bottom: 24px;
}
.lg-tab {
    flex: 1;
    padding: 11px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}
.lg-tab:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.lg-tab--active { background: var(--coral); color: #fff; }
.lg-tab--active:hover { background: var(--coral-light); color: #fff; }

/* --- Panels ---------------------------------------------- */
.lg-panel { display: none; }
.lg-panel--active { display: block; }

/* --- Card ------------------------------------------------ */
.lg-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.lg-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.lg-card__header h2 {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lg-card__header h2 i { color: var(--coral); }

/* --- Filter Toggle -------------------------------------- */
.lg-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.lg-filter-toggle input { display: none; }
.lg-filter-toggle__switch {
    width: 36px;
    height: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    position: relative;
    transition: all var(--transition);
}
.lg-filter-toggle__switch::after {
    content: '';
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all var(--transition);
}
.lg-filter-toggle input:checked + .lg-filter-toggle__switch {
    background: rgba(232, 96, 90, .2);
    border-color: var(--coral);
}
.lg-filter-toggle input:checked + .lg-filter-toggle__switch::after {
    background: var(--coral);
    transform: translateX(16px);
}
.lg-filter-toggle__label {
    font-size: .78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- Standings Table ------------------------------------- */
.lg-table-wrap { overflow-x: auto; }
.lg-table {
    width: 100%;
    border-collapse: collapse;
}
.lg-table th {
    padding: 10px 20px;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
}
.lg-table td {
    padding: 12px 20px;
    font-size: .85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.lg-table tbody tr:last-child td { border-bottom: none; }
.lg-table tbody tr:hover { background: var(--bg-card-hover); }

.lg-table__pos {
    width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}
.lg-table__pts {
    text-align: right;
    font-family: var(--font-display);
    font-size: .95rem;
    color: var(--coral);
    letter-spacing: .5px;
}
.lg-table__cossy {
    font-family: 'Courier New', monospace;
    font-size: .78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Top 3 rows */
.lg-table__top1 { background: rgba(255, 215, 0, .04); }
.lg-table__top2 { background: rgba(192, 192, 192, .03); }
.lg-table__top3 { background: rgba(205, 127, 50, .03); }

/* Current user row */
.lg-table__me {
    border-left: 3px solid var(--coral);
}

/* Player cell */
.lg-player {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lg-player__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coral), var(--coral-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}
.lg-player__info strong {
    display: block;
    font-size: .85rem;
    color: var(--text-primary);
}
.lg-player__info span {
    font-size: .7rem;
    color: var(--text-muted);
}

/* --- Tournament Cards ------------------------------------ */
.lg-tournaments {
    padding: 8px 0;
}
.lg-tournament {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.lg-tournament:last-child { border-bottom: none; }
.lg-tournament__info {
    flex: 1;
    min-width: 0;
}
.lg-tournament__info strong {
    display: block;
    font-size: .9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.lg-tournament__info span {
    font-size: .75rem;
    color: var(--text-muted);
}
.lg-tournament__info span i { margin-right: 4px; }
.lg-tournament__notes {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}
.lg-tournament__results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.lg-tournament__place {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: var(--text-secondary);
}
.lg-tournament__medal { font-size: .9rem; width: 20px; text-align: center; }
.lg-tournament__pts {
    margin-left: auto;
    color: var(--coral);
    font-weight: 600;
    font-size: .72rem;
}
.lg-tournament__more {
    font-size: .68rem;
    color: var(--text-muted);
    text-align: right;
}

/* --- Back link ------------------------------------------- */
.lg-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    transition: color var(--transition);
}
.lg-back:hover { color: var(--coral); }

/* --- Tournament Detail Header ---------------------------- */
.lg-tournament-detail {
    margin-bottom: 24px;
}
.lg-tournament-detail__header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.lg-tournament-detail__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(232, 96, 90, .1);
    color: var(--coral);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.lg-tournament-detail__header h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}
.lg-tournament-detail__header p {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.lg-tournament-detail__header p i { margin-right: 3px; color: var(--coral); }
.lg-tournament-detail__notes {
    font-style: italic;
    margin-top: 4px;
}

/* --- Podium ---------------------------------------------- */
.lg-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px 0;
}
.lg-podium__place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 140px;
}
.lg-podium__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coral), var(--coral-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.lg-podium__avatar--gold {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    box-shadow: 0 0 24px var(--coral-glow);
}
.lg-podium__medal { font-size: 1.5rem; line-height: 1; }
.lg-podium__name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}
.lg-podium__points {
    font-family: var(--font-display);
    font-size: .75rem;
    color: var(--coral);
    font-weight: 700;
}
.lg-podium__bar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
}
.lg-podium__bar--1 { height: 80px; background: rgba(255, 215, 0, .06); border-color: rgba(255, 215, 0, .15); }
.lg-podium__bar--2 { height: 56px; background: rgba(192, 192, 192, .05); border-color: rgba(192, 192, 192, .1); }
.lg-podium__bar--3 { height: 40px; background: rgba(205, 127, 50, .05); border-color: rgba(205, 127, 50, .1); }

/* --- Tournament list clickable --------------------------- */
a.lg-tournament {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    cursor: pointer;
}
a.lg-tournament:hover {
    background: var(--bg-card-hover);
}
.lg-tournament__arrow {
    color: var(--text-muted);
    font-size: .7rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform var(--transition);
}
a.lg-tournament:hover .lg-tournament__arrow {
    color: var(--coral);
    transform: translateX(3px);
}
.lg-tournament__podium {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* --- W/D/L columns --------------------------------------- */
.lg-table__wdl {
    text-align: center;
    width: 36px;
}
.lg-table__win { text-align: center; color: #4ade80; font-weight: 600; }
.lg-table__draw { text-align: center; color: #fbbf24; font-weight: 600; }
.lg-table__loss { text-align: center; color: var(--text-muted); font-weight: 600; }

/* --- Unlinked players ------------------------------------ */
.lg-table__unlinked { opacity: .7; }
.lg-player__avatar--ghost {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: .7rem;
}
.lg-player__pending {
    font-size: .65rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Empty ------------------------------------------------ */
.lg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 20px;
    color: var(--text-muted);
    text-align: center;
}
.lg-empty i { font-size: 2rem; opacity: .3; }
.lg-empty p { font-size: .88rem; }

/* --- Admin: Results Grid --------------------------------- */
.adm-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
.adm-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.adm-result-row__player {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.adm-result-row__player strong {
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adm-result-row__input {
    width: 70px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: .88rem;
    text-align: center;
    outline: none;
    flex-shrink: 0;
}
.adm-result-row__input:focus { border-color: var(--coral); }

/* --- File Upload ----------------------------------------- */
.adm-file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.adm-file-upload__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: .82rem;
    cursor: pointer;
    transition: all var(--transition);
}
.adm-file-upload__label:hover {
    border-color: var(--coral);
    color: var(--coral);
}
.adm-file-upload__label i { color: var(--coral); }
.adm-file-upload__name {
    font-size: .78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 768px) {
    .lg-page { padding: 90px 0 60px; }

    .lg-landing-features { grid-template-columns: 1fr; gap: 12px; }
    .lg-landing-feature { padding: 20px 16px; }
    .lg-landing-cta__card { padding: 28px 20px; }
    .lg-landing-cta__buttons { flex-direction: column; }
    .lg-landing-cta__buttons .btn { width: 100%; justify-content: center; }

    .lg-header { gap: 14px; }
    .lg-header__icon { font-size: 2rem; }
    .lg-header__title { font-size: 1.2rem; letter-spacing: 2px; }

    .lg-my-position { grid-template-columns: 1fr; gap: 10px; }
    .lg-my-pos-card { padding: 14px 16px; }
    .lg-my-pos-card__rank { font-size: 1.2rem; }

    .lg-month-selector { margin-top: 10px; }

    .lg-scoring { gap: 8px; }
    .lg-scoring__value { font-size: 1.1rem; }
    .lg-scoring__label { font-size: .68rem; }

    .lg-tournament-detail__header { padding: 18px 16px; gap: 12px; }
    .lg-tournament-detail__header h1 { font-size: 1rem; }
    .lg-tournament-detail__icon { width: 42px; height: 42px; font-size: 1rem; }

    .lg-podium { gap: 8px; }
    .lg-podium__place { width: 110px; }
    .lg-podium__avatar { width: 40px; height: 40px; font-size: 1rem; }
    .lg-podium__avatar--gold { width: 48px; height: 48px; font-size: 1.2rem; }
    .lg-podium__medal { font-size: 1.2rem; }
    .lg-podium__name { font-size: .7rem; }
    .lg-podium__bar--1 { height: 60px; }
    .lg-podium__bar--2 { height: 42px; }
    .lg-podium__bar--3 { height: 30px; }

    .lg-tabs { padding: 4px; }
    .lg-tab { padding: 10px 8px; font-size: .75rem; gap: 5px; }

    .lg-card__header { padding: 14px 16px; }
    .lg-card__header h2 { font-size: .82rem; }

    .lg-table th { padding: 8px 12px; font-size: .62rem; }
    .lg-table td { padding: 10px 12px; font-size: .8rem; }
    .lg-table__pos { width: 36px; font-size: .88rem; }
    .lg-table__pts { font-size: .85rem; }
    .lg-player__avatar { width: 28px; height: 28px; font-size: .75rem; }
    .lg-player__info strong { font-size: .78rem; }
    .lg-player__info span { font-size: .65rem; }
    .lg-table__cossy { font-size: .7rem; }

    .lg-tournament { flex-direction: column; padding: 14px 16px; gap: 10px; }
    .lg-tournament__results { width: 100%; }

    .adm-results-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .lg-page { padding: 80px 0 40px; }
    .lg-landing__title { letter-spacing: 3px; }
    .lg-landing__tagline { font-size: .85rem; }
    .lg-landing-feature__icon { width: 40px; height: 40px; font-size: .95rem; }

    .lg-header__title { font-size: 1rem; }
    .lg-header__icon { font-size: 1.6rem; }

    .lg-tab { font-size: .7rem; }
    .lg-tab i { font-size: .75rem; }

    /* Hide COSSY column on very small screens */
    .lg-table__cossy,
    .lg-table th:nth-child(3) { display: none; }

    .lg-table td { padding: 8px 10px; font-size: .75rem; }
    .lg-table__pos { width: 30px; font-size: .8rem; }

    .lg-player { gap: 6px; }
    .lg-player__avatar { width: 24px; height: 24px; font-size: .65rem; }
    .lg-player__info strong { font-size: .72rem; }
}
