@keyframes pulseGlow {
    0%,
    to {
        box-shadow: 0 0 10px #ffffff4d
    }

    50% {
        box-shadow: 0 0 22px #fff9
    }
}

@keyframes kickoffZoom {
    0% {
        opacity: 0;
        transform: scale(.92)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes drive {
    0% {
        left: -40px
    }

    to {
        left: 100%
    }
}

@keyframes headerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

:root {
    --bg-color: #0b0f19;
    --primary-color: #cfae70;
    --secondary-color: #1f2937;
    --accent-color: #8b0000;
    --text-color: #fff;
    
    --shadow-soft: 0 0 40px #000c;

    --radius-lg: 18px;    
    --transition-fast: .2s ease
}

*,
body {
    margin: 0
}

* {
    padding: 0;
    box-sizing: border-box
}

body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #111827, var(--bg-color));
    color: var(--text-color);
    font-family: "Montserrat Alternates", sans-serif;
    overflow-x: hidden
}

.league-title,
h1,
h2,
h3 {
    font-family: "Montserrat Alternates", cursive
}

h1,
h2,
h3 {
    letter-spacing: 2px
}

.league-subtitle,
.league-title {
    text-transform: uppercase;
    color: var(--primary-color)
}

.league-title {
    font-size: 1.9rem;
    letter-spacing: 4px;
    text-shadow: 0 0 10px #ffffff26 0 0 22px #000000d9
}

.league-subtitle {
    margin-top: .4rem;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: 2px;
    opacity: .7
}

.stadium-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 10%, #ffffff14, transparent 60%), radial-gradient(circle at 80% 20%, #ffffff0d, transparent 55%), radial-gradient(circle at 20% 20%, #ffffff0d, transparent 55%)
}

.stadium-cursor {
    transform: translate(-50%, -50%)
}

.stadium-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, #ffffff40, transparent 60%);
    mix-blend-mode: screen;
    transition: left .15s ease, top .15s ease;
    z-index: 0
}

.site-header {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    left: 0;
    transform: none;
    text-align: center;
    z-index: 2;
    animation: headerFadeIn 1.2s ease-out both
}

.site-container {
    flex-direction: column;
    align-items: center
}

.site-container {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem 0
}

.btn-home {
    display: block;
    width: fit-content;
    text-align: center;
    position: relative;
    margin: auto auto 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
    z-index: 5
}

.btn-home:hover {
    transform: translateY(-2px)
}

.btn-home,
.btn-home:visited {
    color: var(--primary-color)
}

.btn-home:focus {
    outline: 0
}

.btn-footer {
    position: relative;
    margin: 0 auto 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
    z-index: 5
}

.btn-footer,
.btn-footer:hover,
.btn-footer:visited {
    color: var(--primary-color)
}

.btn-footer:focus {
    outline: 0
}

.site-footer h3 {
    color: var(--primary-color);
    font-family: "Montserrat Alternates", sans-serif
}

.site-footer {
    width: 100%;
    padding: 2rem 0;
    text-align: center;
    font-size: .75rem;
    letter-spacing: 1px;
    opacity: .55;
    margin-top: 0
}

.back-fixed-link,
.home-fixed-link,
.sleeper-fixed-link {
    position: fixed;
    color: var(--primary-color);
    padding: 10px;
    text-decoration: none;
    top: 25px;
    z-index: 9999;
    background: rgba(11, 15, 25, .6);
    border-radius: 50%;
    border: 1px solid rgba(207, 174, 112, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    backdrop-filter: blur(5px)
}

.back-fixed-link svg,
.home-fixed-link svg,
.sleeper-fixed-link svg {
    width: 28px;
    height: 28px
}

.back-fixed-link:hover,
.home-fixed-link:hover,
.sleeper-fixed-link:hover {
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(207, 174, 112, .4)
}

.home-fixed-link {
    left: 25px
}

.back-fixed-link {
    left: 85px
}

.sleeper-fixed-link {
    left: 85px;
}

#pl-back .back-fixed-link {
    left: 25px;
}

#pbp-back .back-fixed-link {
    left: 25px;
}

.mobile-only {
    display: none
}

.spinner {
    border: 4px solid rgba(255, 255, 255, .1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-bottom: 15px
}

.tab-btn {
    background: #1f2937cc;
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 600;
    font-size: .85rem;
    transition: all var(--transition-fast)
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color)
}

.dynamic-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color .3s ease;
    margin-bottom: .5rem
}

.dynamic-icon.little {
    width: 40px;
    height: 40px
}

.dynamic-icon.big {
    width: 100px;
    height: 100px
}

.dynamic-icon.tiny {
    width: 18px;
    height: 18px
}

/* Opzionale: stile per il pulsante attivo */
#toggleBenchBtn.active-ctrl {
    background-color: var(--primary-color);
    color: #000;
}

@media (max-width:768px) {

    .league-logo {
        width: 38%;
        height: 38%
    }

    .league-subtitle {
        font-size: .75rem
    }

    .desktop-only {
        display: none !important
    }

    .mobile-only {
        display: inline-block
    }
}

@media (max-width:720px) {
    
    .home-fixed-link {
        top: 15px;
        left: 15px;
        padding: 8px
    }

    .home-fixed-link svg {
        width: 22px;
        height: 22px
    }

    .back-fixed-link {
        top: 15px;
        padding: 8px
    }

    .back-fixed-link svg {
        width: 22px;
        height: 22px
    }

    #pl-back .back-fixed-link {
        left: 15px;
    }

    #pbp-back .back-fixed-link {
        left: 15px;
    }

    .sleeper-fixed-link {
        top: 15px;
        left: 15px;
        padding: 8px
    }

    .sleeper-fixed-link svg {
        width: 22px;
        height: 22px
    }
}

@media (max-width:480px) {

    .site-header {
        top: 1.2rem;
        margin-bottom: 1rem
    }

    .league-title {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    /* Ridimensiona il sottotitolo */
    .league-subtitle {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .league-logo {
        width: 120px;
        height: 120px
    }

    .stadium-cursor {
        width: 180px;
        height: 180px
    }

    .btn-home {
        font-size: .8rem
    }
}



/* Attribution dei valori di mercato (pagine Fantexpert), appena sopra il piede di pagina */
.trades-attribution {
    width: 100%;
    margin-top: 1.5rem;
    text-align: center;
    font-size: .75rem;
    letter-spacing: 1px;
    opacity: .7
}

.trades-attribution a {
    color: var(--primary-color);
    text-decoration: none
}

.trades-attribution a:hover {
    text-decoration: underline
}

/* Annunci in sovraimpressione al centro della pagina (announcements.php) */
.site-announcements {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 20px;
    box-sizing: border-box;
    background: #000000a6;
    overflow-y: auto
}

.site-announcements.is-empty {
    display: none
}

.site-announcement {
    position: relative;
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    overflow: hidden;
    background: #000000f2;
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 40px #000000b3;
    box-sizing: border-box;
    color: #fff;
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 1.05rem;
    line-height: 1.5
}

.site-announcement-warning {
    border-color: #ff9f43;
    background: #2e1a00f2
}

/* titolo in negativo rispetto al riquadro */
.site-announcement-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .1rem .9rem;
    background: #fff;
    color: #000;
    font-size: .9rem;
    line-height: 1.3;
    letter-spacing: 1px
}

.site-announcement-warning .site-announcement-title {
    background: #ff9f43;
    color: #2e1a00
}

.site-announcement-text {
    display: block;
    padding: 1rem 1.2rem 1.3rem;
    white-space: pre-line;
    overflow-wrap: anywhere
}

.site-announcement-close {
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    opacity: .75
}

.site-announcement-close:hover {
    opacity: 1
}

.site-announcement-confirm {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #000000b3
}

.site-announcement-confirm[hidden] {
    display: none
}

.site-announcement-confirm-box {
    width: 100%;
    max-width: 380px;
    padding: 1.6rem;
    border-radius: 12px;
    background: #000;
    border: 1px solid var(--primary-color);
    color: #fff;
    text-align: center;
    font-family: "Montserrat Alternates", sans-serif
}

.site-announcement-confirm-box p {
    margin: 0 0 1.4rem
}

.site-announcement-confirm-box button {
    min-width: 90px;
    margin: 0 .4rem;
    padding: .6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 700;
    cursor: pointer
}

.site-announcement-confirm-box button.is-yes {
    background: var(--primary-color);
    color: #000
}

.site-announcement-confirm-box button:hover {
    filter: brightness(1.2)
}
