/* =========================================================
   WOW STORE ESPORTS — GIOCATORI
   ========================================================= */

:root {
    --background: #050607;
    --background-soft: #0b0e10;
    --panel: rgba(14, 17, 19, 0.95);
    --panel-light: rgba(23, 27, 30, 0.92);

    --red: #d12626;
    --red-dark: #690909;
    --red-glow: rgba(209, 38, 38, 0.35);

    --gold: #efc44e;
    --gold-glow: rgba(239, 196, 78, 0.32);

    --white: #f2f2f2;
    --grey: #b8bbbe;
    --grey-dark: #777d81;

    --border: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.22);

    --heading-font: "Anton", Impact, sans-serif;
    --body-font: "Oswald", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    color: var(--white);
    font-family: var(--body-font);

    background: var(--background);

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   SFONDO
   ========================================================= */

.page-background {
    position: fixed;
    inset: 0;
    z-index: -3;

    background:
        radial-gradient(
            circle at 80% 18%,
            rgba(163, 22, 14, 0.30),
            transparent 35%
        ),
        radial-gradient(
            circle at 16% 72%,
            rgba(112, 11, 11, 0.20),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #050607 0%,
            #121416 45%,
            #070809 100%
        );
}

.page-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.10),
            rgba(0, 0, 0, 0.68)
        );

    pointer-events: none;
}

/* =========================================================
   HERO
   ========================================================= */

.players-hero {
    position: relative;

    min-height: 490px;
    padding: 92px 0 78px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border-bottom: 1px solid var(--border);
}

.players-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(3, 4, 5, 0.98) 0%,
            rgba(3, 4, 5, 0.88) 50%,
            rgba(3, 4, 5, 0.35) 78%,
            rgba(3, 4, 5, 0.75) 100%
        ),
        radial-gradient(
            circle at 78% 42%,
            rgba(183, 35, 20, 0.35),
            transparent 35%
        );

    pointer-events: none;
}

.players-hero::after {
    content: "";

    position: absolute;
    right: -180px;
    bottom: -360px;

    width: 740px;
    height: 740px;

    border: 2px solid rgba(209, 38, 38, 0.12);
    border-radius: 50%;

    box-shadow:
        0 0 100px rgba(209, 38, 38, 0.08);

    pointer-events: none;
}

.players-hero-content {
    position: relative;
    z-index: 2;

    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-block;

    color: var(--red);

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2.6px;
    text-transform: uppercase;
}

.players-hero h1,
.players-directory-heading h2 {
    margin: 12px 0 18px;

    font-family: var(--heading-font);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 1px;
}

.players-hero h1 {
    font-size: clamp(70px, 8vw, 122px);
}

.players-hero p {
    max-width: 760px;
    margin: 0;

    color: var(--grey);

    font-size: 22px;
    font-weight: 300;
    line-height: 1.55;
}

.players-hero-stats {
    margin-top: 36px;

    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.players-hero-stats > div {
    min-width: 165px;
    padding: 16px 18px;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--border);

    background:
        rgba(8, 10, 11, 0.72);
}

.players-hero-stats strong {
    color: var(--gold);

    font-family: var(--heading-font);
    font-size: 35px;
    font-weight: 400;
}

.players-hero-stats span {
    color: var(--grey);

    font-size: 14px;
}

/* =========================================================
   RICERCA E FILTRI
   ========================================================= */

.players-tools {
    position: relative;
    z-index: 5;

    margin-top: -34px;
}

.players-tools-inner {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px;

    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: 15px;
    align-items: center;

    border: 1px solid var(--border-strong);

    background:
        linear-gradient(
            145deg,
            rgba(20, 24, 27, 0.98),
            rgba(7, 9, 10, 0.99)
        );

    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.52);
}

.players-search {
    min-height: 54px;
    padding: 0 16px;

    display: flex;
    align-items: center;
    gap: 12px;

    border: 1px solid var(--border);

    background:
        rgba(0, 0, 0, 0.30);
}

.players-search ion-icon {
    flex: 0 0 auto;

    color: var(--red);

    font-size: 24px;
}

.players-search input {
    width: 100%;
    padding: 14px 0;

    color: #ffffff;

    font-size: 17px;

    border: 0;
    outline: 0;

    background: transparent;
}

.players-search input::placeholder {
    color: var(--grey-dark);
}

.players-filters {
    display: flex;
    gap: 10px;
}

.players-filters select {
    min-width: 180px;
    min-height: 54px;
    padding: 0 13px;

    color: #ffffff;

    border: 1px solid var(--border);

    outline: 0;

    background:
        rgba(0, 0, 0, 0.34);

    cursor: pointer;
}

.players-filters select:focus {
    border-color: var(--red);

    box-shadow:
        0 0 12px rgba(209, 38, 38, 0.18);
}

.players-filters option {
    color: #ffffff;
    background: #090c0d;
}

/* =========================================================
   ELENCO
   ========================================================= */

.players-directory {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 95px 0 115px;
}

.players-directory-heading {
    margin-bottom: 35px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
}

.players-directory-heading h2 {
    font-size: clamp(48px, 5vw, 76px);
}

.players-visible-count {
    padding: 8px 13px;

    color: var(--gold);

    font-size: 14px;
    font-weight: 700;

    border: 1px solid rgba(239, 196, 78, 0.35);

    background:
        rgba(239, 196, 78, 0.06);
}

.players-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* =========================================================
   CARD GIOCATORE
   ========================================================= */

.player-directory-card {
    position: relative;

    min-width: 0;
    min-height: 305px;
    padding: 22px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(22, 26, 29, 0.96),
            rgba(6, 8, 9, 0.99)
        );

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.34);

    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.player-directory-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(209, 38, 38, 0.58);

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.48),
        0 0 25px rgba(209, 38, 38, 0.10);
}

.player-card-top {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 15px;
    align-items: center;
}

.player-avatar {
    position: relative;

    width: 76px;
    height: 76px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    color: var(--gold);

    font-family: var(--heading-font);
    font-size: 28px;

    border:
        1px solid rgba(239, 196, 78, 0.48);

    background:
        radial-gradient(
            circle,
            rgba(239, 196, 78, 0.15),
            transparent 65%
        );
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-online-dot {
    position: absolute;
    right: 8px;
    bottom: 8px;

    width: 11px;
    height: 11px;

    border: 2px solid #0b0e10;
    border-radius: 50%;

    background: #46d86b;

    box-shadow:
        0 0 9px rgba(70, 216, 107, 0.86);
}

.player-online-dot.offline {
    background: #5c6368;
    box-shadow: none;
}

.player-primary-data {
    min-width: 0;
}

.player-primary-data h3 {
    margin: 0;

    overflow: hidden;

    color: #ffffff;

    font-family: var(--heading-font);
    font-size: 31px;
    font-weight: 400;
    line-height: 1;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-gamertag {
    display: block;
    margin-top: 5px;

    overflow: hidden;

    color: var(--grey);

    font-size: 15px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-platform {
    padding: 5px 9px;

    color: var(--gold);

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;

    border:
        1px solid rgba(239, 196, 78, 0.32);

    background:
        rgba(239, 196, 78, 0.06);
}

.player-meta-grid {
    margin-top: 20px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.player-meta-box {
    min-width: 0;
    padding: 11px 12px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    background:
        rgba(255, 255, 255, 0.025);
}

.player-meta-box span {
    display: block;

    color: var(--grey-dark);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.player-meta-box strong {
    display: block;
    margin-top: 4px;

    overflow: hidden;

    color: #ffffff;

    font-size: 15px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card-actions {
    margin-top: auto;
    padding-top: 20px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.player-action-link {
    min-height: 45px;
    padding: 10px 12px;

    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    border: 1px solid var(--border-strong);

    background:
        rgba(255, 255, 255, 0.035);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.player-action-link:hover {
    transform: translateY(-2px);

    border-color: var(--red);

    background:
        rgba(209, 38, 38, 0.10);
}

.player-action-link.primary {
    border-color: #ed4545;

    background:
        linear-gradient(
            145deg,
            #d62b2b,
            #720909
        );
}

/* =========================================================
   STATI
   ========================================================= */

.players-state-panel {
    min-height: 300px;
    padding: 45px 22px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;

    text-align: center;

    border: 1px solid var(--border);

    background:
        rgba(12, 15, 17, 0.82);
}

.players-state-panel ion-icon {
    color: var(--red);
    font-size: 58px;
}

.players-state-panel strong {
    font-family: var(--heading-font);
    font-size: 31px;
    font-weight: 400;
}

.players-state-panel p {
    margin: 0;

    color: var(--grey);

    font-size: 16px;
}

.players-error-state {
    border-color:
        rgba(209, 38, 38, 0.42);
}

.players-spinner {
    width: 46px;
    height: 46px;

    border: 4px solid rgba(255, 255, 255, 0.10);
    border-top-color: var(--red);
    border-radius: 50%;

    animation:
        playersSpin 0.85s linear infinite;
}

.retry-button {
    min-height: 43px;
    margin-top: 6px;
    padding: 9px 18px;

    color: #ffffff;

    border: 1px solid #ed4545;

    background:
        linear-gradient(
            145deg,
            #d62b2b,
            #720909
        );

    cursor: pointer;
}

@keyframes playersSpin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--border);

    background:
        rgba(5, 7, 8, 0.92);
}

.footer-inner {
    width: min(1500px, calc(100% - 40px));
    min-height: 145px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-inner strong {
    font-family: var(--heading-font);
    font-size: 25px;
    font-weight: 400;
}

.footer-inner p {
    margin: 6px 0 0;

    color: var(--grey-dark);
}

.footer-inner > a {
    color: var(--red);
    font-weight: 700;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

    .players-tools-inner {
        grid-template-columns: 1fr;
    }

    .players-filters {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .players-filters select {
        min-width: 0;
    }

    .players-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {

    .players-hero {
        min-height: auto;
        padding: 90px 22px 72px;

        text-align: center;
    }

    .players-hero-content {
        width: 100%;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .players-hero h1 {
        font-size: 72px;
    }

    .players-hero p {
        font-size: 20px;
    }

    .players-hero-stats {
        width: 100%;

        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .players-hero-stats > div {
        min-width: 0;
        padding: 12px 8px;
    }

    .players-hero-stats strong {
        font-size: 28px;
    }

    .players-hero-stats span {
        font-size: 11px;
    }

    .players-tools {
        margin-top: 0;
        padding-top: 28px;
    }

    .players-tools-inner,
    .players-directory,
    .footer-inner {
        width: min(100% - 22px, 1500px);
    }

    .players-filters {
        grid-template-columns: 1fr;
    }

    .players-directory {
        padding-top: 70px;
    }

    .players-directory-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .players-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        padding: 30px 0;

        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 390px) {

    .players-hero {
        padding-right: 16px;
        padding-left: 16px;
    }

    .players-hero h1 {
        font-size: 62px;
    }

    .players-hero p {
        font-size: 18px;
    }

    .players-hero-stats {
        grid-template-columns: 1fr;
    }

    .player-card-top {
        grid-template-columns: 66px minmax(0, 1fr);
    }

    .player-platform {
        grid-column: 1 / -1;
        width: fit-content;
    }

    .player-avatar {
        width: 66px;
        height: 66px;
    }
}
