/* Container unico e centrato */
.container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Blocca overflow su TUTTO */
html,
body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Desktop = resta uguale */
.card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--g-card);
  backdrop-filter: blur(var(--blur));
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}

/* 📱 Mobile = compatto e no overflow */
@media (max-width: 520px) {
  .card {
    grid-template-columns: 28px 1fr 18px; /* 🔽 colonne più piccole */
    gap: 8px;                            /* 🔽 meno spazio */
    padding: 10px;                       /* 🔽 meno padding */
    border-radius: 12px;
  }

  .card .icon {
    width: 28px;
    height: 28px;
  }

  .card .title-t {
    font-size: 13px;
  }

  .card .desc {
    font-size: 11px;
  }

  .card .go svg {
    width: 14px;
    height: 14px;
  }
}

/* Bottom bar su mobile */
@media (max-width: 600px) {
    .bottom-bar {
        flex-direction: column;
        align-items: center;
        /* 🔥 centrato */
        gap: 16px;
    }

    .music-player {
        width: 100%;
        justify-content: center;
    }

    .footer {
        justify-content: center;
        text-align: center;
    }
}


/* ===== TOKENS ===== */
:root {
    /* Background */
    --bg: #0A0A0A;
    --bg-2: #0E0E0E;

    /* Testo */
    --text: #EDE7FF;        /* viola chiaro */
    --muted: #A88DD9;       /* viola desaturato */

    /* Card & struttura */
    --card: rgba(255, 255, 255, 0.04);
    --stroke: rgba(255, 255, 255, 0.12);
    --shadow: 0 18px 40px rgba(0, 0, 0, .55);

    --radius: 22px;
    --blur: 16px;

    /* Accent viola */
    --accent: #9146FF;      /* viola principale */
    --accent-2: #6B2FFF;    /* viola più brillante */
    --accent-3: #2B0A59;    /* viola scuro profondo */

    /* Gradienti */
    --g-card: linear-gradient(180deg, rgba(145, 70, 255, .06), rgba(145, 70, 255, .02));
    --g-icon: linear-gradient(145deg, rgba(145, 70, 255, .28), rgba(43, 10, 89, .35));
    --g-page: linear-gradient(180deg, var(--bg), var(--bg-2));
    --g-emerald: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent) 70%);
}


* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

/* ===== BACKGROUND FX ===== */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;

    background: url("../img/nature.gif") center center / cover no-repeat;
    background-color: var(--bg);

    filter: blur(12px);
    /* 🔥 blur regolabile */
}

.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.816);
    /* 🔥 patina nera semitrasparente */
}


.bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(80% 80% at 50% 50%, rgba(0, 0, 0, .28), transparent 65%),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 2px);
    mix-blend-mode: multiply;
    opacity: .35;
    animation: grain 14s steps(2, end) infinite;
}

@keyframes bgFloat {
    to {
        transform: translateY(-2.5%)
    }
}

@keyframes grain {
    to {
        transform: translate3d(2%, 0, 0)
    }
}

/* Sistema centraggio su mobile */
.page {
    min-height: 100vh;
    /* 🔥 usa altezza viewport intera */
    display: flex;
    justify-content: center;
    /* centro orizzontale */
    align-items: center;
    /* centro verticale */
    padding: 20px 12px;
}


.profile {
    margin: 0 auto;
    /* forza centratura */
    max-width: 100%;
    /* non esce dai bordi */
    box-sizing: border-box;
}

/* ===== PROFILE CARD ===== */
.profile {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: calc(var(--radius) + 6px);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: var(--shadow);
    padding: 32px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.profile::after {
    content: "";
    position: absolute;
    inset: 0;
    /* bordo preciso */
    border-radius: inherit;
    padding: 2px;
    /* spessore del bordo */
    background: conic-gradient(from 0deg,
            var(--accent) 0deg,
            var(--accent-2) 120deg,
            var(--accent) 240deg,
            var(--accent-2) 360deg);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spinGlow 10s linear infinite, pulseGlow 4s ease-in-out infinite alternate;
    border-radius: inherit;
    opacity: 0.6;
    filter: blur(1.5px) brightness(1.3);
    pointer-events: none;
    /* non blocca hover */
    z-index: -1;
    /* 🔥 sta dietro, non sopra */
}

@keyframes spinGlow {
    to {
        transform: rotate(1turn);
    }
}

@keyframes pulseGlow {
    0% {
        opacity: 0.3;
        filter: blur(1px) brightness(1);
    }

    50% {
        opacity: 0.7;
        filter: blur(3px) brightness(1.5);
    }

    100% {
        opacity: 0.4;
        filter: blur(1.5px) brightness(1.2);
    }
}


@keyframes spinGlow {
    to {
        transform: rotate(1turn);
    }
}

@keyframes pulseGlow {
    0% {
        opacity: 0.2;
        filter: blur(1px) brightness(1);
    }

    50% {
        opacity: 0.5;
        filter: blur(3px) brightness(1.4);
    }

    100% {
        opacity: 0.3;
        filter: blur(1.5px) brightness(1.1);
    }
}


.profile::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(40% 35% at 20% 10%, rgba(0, 227, 132, .12), transparent 60%),
        radial-gradient(35% 30% at 90% 20%, rgba(0, 184, 111, .14), transparent 60%);
    filter: blur(70px);
    z-index: -1;
    animation: pulse 11s ease-in-out infinite alternate;
}

@keyframes spin {
    to {
        transform: rotate(1turn)
    }
}

@keyframes pulse {
    to {
        transform: translateY(-2%) scale(1.04)
    }
}

.head {
    display: flex;
    gap: 20px;
    align-items: center
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    flex: 0 0 auto;
    background: var(--g-icon);
    border: 1px solid var(--stroke);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(0, 227, 132, .45);
    transition: box-shadow .35s ease;
}

.avatar:hover::after {
    box-shadow: 0 0 0 6px rgba(145, 70, 255, .08); /* viola (Twitch style) */
}


.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.title {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.title h1 {
    font: 800 28px/1.1 Poppins, Inter, sans-serif;
    margin: 0;
    letter-spacing: .2px
}

.title p {
    margin: 0;
    color: var(--muted)
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.badge {
    font: 600 12px/1 Inter;
    padding: 8px 10px;
    border: 1px dashed var(--stroke);
    border-radius: 999px;
    background: rgba(125, 0, 227, 0.07);
}

/* 🔥 ultra compatti per mobile */
@media (max-width: 520px) {
    .badge {
        font-size: 8px;
        /* 🔽 più piccolo */
        padding: 4px 6px;
        /* 🔽 meno spazio */
        border-radius: 999px;
    }

    .badges {
        gap: 4px;
        /* 🔽 meno spazio tra i badge */
    }
}


.badge {
    font: 600 12px/1 Inter;
    padding: 8px 10px;
    border: 1px dashed var(--stroke);
    border-radius: 999px;
    background: rgba(0, 227, 132, .07);
}

/* 📱 Mobile più piccolo */
@media (max-width: 520px) {
    .badge {
        font-size: 9px;
        /* 🔽 ridotto da 12px */
        padding: 4px 6px;
        /* 🔽 meno spazio interno */
    }
}


/* ===== ACTIONS ===== */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 6px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--g-card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    will-change: transform;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 0, 227, 0.35)
}

.btn:active {
    transform: translateY(0)
}

.btn svg {
    width: 18px;
    height: 18px;
    opacity: .9
}

.btn::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .15) 45%, transparent 60%);
    transform: translateX(-120%);
    transition: transform .6s ease;
}

.btn:hover::after {
    transform: translateX(120%)
}

/* ===== LINKS GRID ===== */
.links {
    margin-top: 18px;
    display: grid;
    gap: 12px
}



.card:hover {
    transform: translateY(-3px);
    border-color: rgba(121, 0, 227, 0.825);
    box-shadow: 0 8px 28px rgba(121, 0, 227, 0.1);
}

.card .icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--g-icon);
    border: 1px solid var(--stroke);
    position: relative;
    overflow: hidden;
}

.card .icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0, rgba(255, 255, 255, .18) 45%, transparent 60%);
    transform: translateX(-120%);
    transition: transform .7s ease;
}

.card:hover .icon::after {
    transform: translateX(120%)
}

.card .meta {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.card .title-t {
  font-weight: 800;
  letter-spacing: .2px;
}

/* 📱 Solo su mobile */
@media (max-width: 520px) {
  .card .title-t {
    padding-left: 17px;
  }
}

.card .desc {
    color: var(--muted);
    font-size: 14px;
}

/* 📱 Solo su mobile */
@media (max-width: 520px) {
  .card .desc {
    padding-left: 17px;
  }
}

.card .go {
    opacity: .6
}

.card .go svg {
    width: 20px;
    height: 20px
}

.footer {
    display: none;
    justify-content: flex-end;
    /* 🔥 spinge tutto a destra */
    align-items: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.socials a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .05);
    transition: transform .18s ease, border-color .18s ease;
}

.socials a:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 227, 132, .35)
}

.socials svg {
    width: 18px;
    height: 18px
}

@media (max-width:520px) {
    .profile {
        padding: 22px
    }

    .head {
        gap: 14px
    }

    .avatar {
        width: 76px;
        height: 76px;
        border-radius: 22px
    }

    .title h1 {
        font-size: 24px
    }
}

.links.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0px;
    /* spazio tra le due card */
}

@media (max-width:600px) {
    .links.two-cols {
        grid-template-columns: 1fr;
        /* su mobile tornano in colonna */
    }
}

.music-player {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 8px 12px;
    border-radius: 12px;
}


.controls span {
    font-size: 13px;
    color: var(--muted);
    width: 40px;
    text-align: center;
}

.controls input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--stroke);
    accent-color: var(--accent);
    cursor: pointer;
}

.controls button {
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.controls button:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.bottom-bar {
  margin-top: 10px;
  display: flex;
  justify-content: space-between; /* desktop: social a sx, player a dx */
  align-items: center;
  gap: 20px;
}

/* 📱 mobile fix */
@media (max-width: 600px) {
  .bottom-bar {
    flex-direction: column;   /* 🔽 metto in colonna */
    justify-content: center;  /* centrati */
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .music-player {
    width: 100%;
    justify-content: center;  /* 🔽 centrato */
  }

  .socials-left {
    justify-content: center;
  }
}


.socials-left {
    display: flex;
    gap: 12px;
}

.socials-left a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.socials-left a:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.music-player {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 8px 12px;
    border-radius: 12px;
}

.controls span {
    font-size: 13px;
    color: var(--muted);
    width: 40px;
    text-align: center;
}

.controls input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--stroke);
  accent-color: var(--accent);
  cursor: pointer;
}

/* 📱 versione più compatta */
@media (max-width: 520px) {
  .controls input[type="range"] {
    height: 3px;       /* 🔽 più sottile */
    max-width: 100px;  /* 🔽 più corto */
  }
}


.controls button {
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.controls button:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(22, 0, 55, 0.987), rgb(0, 0, 0));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    text-align: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}


.overlay button {
    padding: 16px 34px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    border: 2px solid var(--accent); /* viola */
    background: linear-gradient(145deg, rgba(100, 0, 249, 0.948), rgba(0, 0, 0, 0.65));
    color: var(--text);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.35);
    transition: all 0.3s ease;
    animation: pulseBtn 2s infinite;
}


.overlay button i {
    margin-right: 10px;
    color: var(--accent);
}

.overlay button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}

.overlay button:hover::before {
    transform: translateX(100%);
}

.overlay button:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 25px rgba(59, 0, 114, 0.5);
}

@keyframes pulseBtn {
    0% {
        box-shadow: 0 0 15px rgba(60, 0, 133, 0.25);
    }

    50% {
        box-shadow: 0 0 25px rgba(117, 0, 227, 0.55);
    }

    100% {
        box-shadow: 0 0 15px rgba(92, 2, 133, 0.25);
    }
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 📱 Fix bottom-bar mobile */
@media (max-width: 600px) {
  .bottom-bar {
    flex-direction: column;   /* elementi in colonna */
    justify-content: center;
    align-items: center;
    gap: 0px;
    text-align: center;
  }

  .socials-left {
    justify-content: center;  /* centrati */
    width: 100%;
  }

  .music-player {
    flex: unset;              /* 🔥 annulla flex:1 che spinge a dx */
    width: 100%;
    justify-content: center;  /* centrato */
  }

  .controls {
    width: 100%;              /* 🔽 slider occupa tutta la riga */
    max-width: 310px;         /* ma non troppo largo */
    margin: 0 auto;
  }
}

