﻿/* ============================================================
   PLAYER VIEW — TOKENISED
============================================================ */

/* ===========================
   Player & Fixture Containers
=========================== */
#players,
#fixtures {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    list-style: none;
}


    /* ===========================
   Players List
=========================== */
    #players li {
        background: var(--color-bg-surface);
        padding: var(--space-4);
        border-radius: var(--radius-md);
        display: flex;
        justify-content: space-between;
        align-items: center;
        animation: fadeIn var(--transition-slow);
        color: var(--color-text-primary);
        border: 1px solid var(--color-border-dark);
        box-shadow: var(--shadow-soft);
    }

.morePlayers.hidden,
.hidden {
    display: none;
}

.showMoreBtn {
    display: block;
    margin: var(--space-3) auto 0;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

    .showMoreBtn:hover {
        background: var(--color-bg-main);
        color: var(--color-text-primary);
    }

.eliminatedPlayers {
    margin-top: var(--space-4);
}
.pre-rollover {
    opacity: 0.6;
    font-style: italic;
}
.rollover-divider {
    text-align: center;
    margin: 12px 0;
    opacity: 0.7;
    font-style: italic;
}

.rollover-divider-line {
    height: 1px;
    background: #ccc;
    margin: 4px 0;
}

.rollover-divider-text {
    font-size: 0.9rem;
    color: #666;
}


/* ===========================
   Rollover Badge
=========================== */
.rollover-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    padding: var(--space-1) var(--space-2);
    margin-left: var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
}


/* ===========================
   Fixtures
=========================== */
#fixtures li {
    display: flex;
    justify-content: space-between;
    background: var(--color-bg-surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-dark);
    box-shadow: var(--shadow-soft);
    font-size: var(--font-size-md);
    color: var(--color-text-primary);
}


/* ===========================
   Animations
=========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===========================
   Icons
=========================== */
.fa-trophy {
    color: var(--color-warning);
}

.fa-futbol,
.fa-user {
    margin-right: var(--space-2);
    color: var(--color-accent);
}


/* ===========================
   Pick History
=========================== */
#pickHistoryList {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

    #pickHistoryList li {
        padding: var(--space-1) 0;
        font-size: var(--font-size-md);
        color: var(--color-text-primary);
    }

.lifelineIcon.available {
    font-size: 1.1em;
    color: var(--color-danger);
}

.lifelineIcon.used {
    font-size: 1.1em;
    color: var(--color-text-muted);
}


/* ===========================
   Player Cards Summary
=========================== */
.playerCards {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    margin-top: var(--space-4);
}

.playerCard {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    width: 240px;
    box-shadow: var(--shadow-soft);
    color: var(--color-text-primary);
}

.cardHeader {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.statusDot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.finalStatus {
    margin-left: auto;
    font-weight: 700;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-2);
}

.weekBlock {
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    padding: var(--space-1);
    text-align: center;
    font-size: var(--font-size-sm);
    background: var(--color-bg-main);
    color: var(--color-text-primary);
}

    .weekBlock.eliminated {
        background: rgba(239, 68, 68, 0.15);
        border-color: var(--color-danger);
    }


/* ===========================
   Invite Buttons
=========================== */
.inviteButtons {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

.shareIcon {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    margin-right: var(--space-1);
}

.inviteBtn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    background: var(--color-accent);
    transition: var(--transition-fast);
}

    .inviteBtn:hover {
        background: var(--color-accent-hover);
    }


/* ===========================
   Fixture Buttons (Pick UI)
=========================== */
.fixture-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
}

.fixture-btn {
    position: relative;
    flex: 1 1 120px;
    min-width: 120px;
    max-width: 160px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-dark);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

.pick-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1; /* prevents text from adding extra vertical height */
    
}

.fixture-btn:hover:not(:disabled):not([data-picked="true"]) {
    background: var(--color-accent);
    color: var(--color-text-primary);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.fixture-btn.selected {
    background: var(--color-success);
    color: var(--color-text-primary);
    border-color: var(--color-success);
    font-weight: 700;
}

.fixture-btn:disabled {
    background: rgba(255,255,255,0.04);
    color: var(--color-text-muted);
    border-color: var(--color-border-dark);
    opacity: 0.7;
    cursor: not-allowed;
}

.fixture-btn[data-picked="true"] {
    border: 2px solid var(--color-success);
    background: var(--color-bg-card);
    color: var(--color-success);
    font-weight: 700;
    cursor: default;
}

    .fixture-btn[data-picked="true"]::after {
        content: "Picked";
        position: absolute;
        top: 4px;
        right: 6px;
        font-size: var(--font-size-xs);
        color: var(--color-success);
        opacity: 0.9;
        font-weight: 700;
    }
/* ============================================================
   Premium Logo Badge for Pick Buttons
============================================================ */

.pick-logo-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--color-border-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    top: 1px; /* subtle optical centring */
}


    .pick-logo-wrap img {
        width: 70%;
        height: 70%;
        object-fit: contain;
    }

/* Optional: slight “lift” for premium feel */
.fixture-btn:hover .pick-logo-wrap:not(.disabled) {
    transform: translateY(-1px);
    transition: var(--transition-fast);
}

/* Selected state glow */
.fixture-btn.selected .pick-logo-wrap {
    border-color: var(--color-success);
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
}


/* ===========================
   Eliminated Panel
=========================== */
.eliminated-panel {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-dark);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: var(--space-4);
}

    .eliminated-panel h3 {
        margin-bottom: var(--space-2);
        color: var(--color-accent);
    }

    .eliminated-panel p {
        color: var(--color-text-muted);
        font-size: var(--font-size-sm);
    }

.summary-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.pickCell {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ===========================
   Winner Cinematic Timeline
=========================== */
.winnerCard {
    border: 2px solid var(--color-success);
    box-shadow: 0 0 18px rgba(0, 255, 120, 0.25);
    transform: translateY(-2px);
}

.winnerTimeline .weekBlock {
    opacity: 0;
    transform: translateY(12px);
    animation: winnerBlockFade 0.45s ease forwards;
}

    .winnerTimeline .weekBlock:nth-child(1) {
        animation-delay: 0.05s;
    }

    .winnerTimeline .weekBlock:nth-child(2) {
        animation-delay: 0.10s;
    }

    .winnerTimeline .weekBlock:nth-child(3) {
        animation-delay: 0.15s;
    }

    .winnerTimeline .weekBlock:nth-child(4) {
        animation-delay: 0.20s;
    }

    .winnerTimeline .weekBlock:nth-child(5) {
        animation-delay: 0.25s;
    }

    .winnerTimeline .weekBlock:nth-child(6) {
        animation-delay: 0.30s;
    }

    .winnerTimeline .weekBlock:nth-child(7) {
        animation-delay: 0.35s;
    }

    .winnerTimeline .weekBlock:nth-child(8) {
        animation-delay: 0.40s;
    }

    .winnerTimeline .weekBlock:nth-child(9) {
        animation-delay: 0.45s;
    }

    .winnerTimeline .weekBlock:nth-child(10) {
        animation-delay: 0.50s;
    }

@keyframes winnerBlockFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.statusIcon {
    width: 18px;
    height: 18px;
}

.winnerIcon {
    width: 20px;
    height: 20px;
    color: var(--color-warning);
}

.eliminatedIcon {
    color: var(--color-danger);
}

.aliveIcon {
    color: var(--color-success);
}

.crownPop {
    animation: crownPopIn 3s cubic-bezier(0.22, 1.25, 0.32, 1) forwards;
    transform-origin: center;
}

@keyframes crownPopIn {
    0% {
        opacity: 0;
        transform: scale(0.4) rotate(-10deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.25) rotate(3deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.skullPulse {
    animation: skullFadePulse 3s ease-out forwards;
    transform-origin: center;
}

@keyframes skullFadePulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }

    70% {
        transform: scale(1.12);
        opacity: 0.85;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.info-banner {
    background: var(--color-info-bg, #e8f4ff);
    color: var(--color-info-text, #0a3d62);
    padding: 10px 14px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.banner-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
}


/* ===========================
   Mobile Adjustments
=========================== */
@media (max-width: 380px) {
    .fixture-row {
        gap: var(--space-2);
        flex-wrap: nowrap;
    }

    .fixture-btn {
        width: 100px;
        padding: var(--space-3);
        font-size: var(--font-size-sm);
        background: var(--color-bg-card);
    }
}
