

/* PSN PIN MODAL */
/* OVERLAY */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* CONTENUTO BASE */
.modal-content {
  background: #0a0a0a;
  border-radius: 14px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  border: 1px solid #222;
  animation: fadeIn .25s ease;
}

/* ================= MOBILE MODAL ================= */
@media (max-width: 600px) {
  .modal {
    align-items: flex-end;
  }
  .modal-content {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px 24px;
    animation: slideUp .3s ease;
  }
  .modal-content::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: #444;
    border-radius: 2px;
    margin: 0 auto 12px;
  }
}
/* ================= MODAL (seconda definizione, mantenuta) ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: #1e1e1e;
  color: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  margin: 15% auto;
  text-align: center;
  animation: pop 0.3s ease;
}

@media (max-width: 768px) {

  /* Modal */
  .modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
}

/* =========================================================
   MODAL IMPOSTAZIONI EVENTO
========================================================= */
.modal-overlay{

  position:fixed;
  inset:0;

  z-index:99999;

  display:flex;

  justify-content:center;

  align-items:flex-start;

  overflow-y:auto;

  padding:
    max(12px, env(safe-area-inset-top))
    12px
    max(12px, env(safe-area-inset-bottom));

  background:rgba(0,0,0,.75);

  backdrop-filter:blur(8px);

  animation:modalFade .25s ease;

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  .modal-overlay {
    padding: 6px;
    align-items: stretch;           /* il modal occupa tutta l'altezza */
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    padding: 16px 14px;             /* riduci padding laterale per più spazio */
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    overflow-x: auto;               /* scroll orizzontale se necessario */
    margin: auto;
  }

}
/* ═══════════════════════════════════════════════════════
   MODALE PARTECIPA/ISCRIVITI - PREMIUM GT7 STYLE
   ═══════════════════════════════════════════════════════ */

/* ─────────── OVERLAY ─────────── */
#confirmModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: modalOverlayIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 520px) {
  #confirmModal {
    padding: 12px;
    align-items: flex-end;
  }

  #confirmModal .modal-content {
    border-radius: 20px 20px 8px 8px;
    max-height: 85vh;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
/* ================= BASE LAYOUT ================= */
body {
  margin: 0;
  font-family: Poppins, sans-serif;
  background: #0a0a0a;
  color: white;
  isolation: isolate;
  overflow-x: hidden; 
}

/* ================= APP LAYOUT ================= */
#app {
  display: flex;
  min-height: 100vh;
}

/* ================= MAIN ================= */
/* Spazio libero sotto il contenuto = altezza barra sidebar + coppa sporgente */
:root {
  --gt7-sidebar-clearance: 200px;
}

#main {
  margin-left: 70px;
  width: calc(100% - 70px);
  min-height: 100vh;
  padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  transition:
    margin-left .6s cubic-bezier(.22,1,.36,1),
    width .6s cubic-bezier(.22,1,.36,1),
    filter .35s ease,
    transform .35s ease;
}

#content {
  padding-bottom: 8px;
  box-sizing: border-box;
}

/* =========================================================
   MOBILE — sidebar fissa in basso, contenuto non coperto
========================================================= */

@media (max-width: 768px) {
  :root {
    /* rail + expand + coppa sporgente + margine */
    --gt7-sidebar-clearance: 210px;
  }

  #main {
    margin-left: 0;
    width: 100%;
    padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px));
  }

  #content {
    padding-bottom: 12px;
  }
}

@media (max-width: 480px) {

  #main {
    padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px));
  }
}

/* Landscape mobile: barra più bassa ma clearance sufficiente */
@media (max-height: 480px) and (orientation: landscape) {
  :root {
    --gt7-sidebar-clearance: 150px;
  }
}
/* =========================================================
   ✨ WINDOWS TASKBAR SIDEBAR PREMIUM
   ORIZZONTALE + EXPAND
========================================================= */

body.sidebar-open #main{

  filter:blur(18px) brightness(1.04);
  transform:scale(.985);

  pointer-events:none;
  user-select:none;

  transition:
    filter .35s ease,
    transform .35s ease;
}

/* =========================================================
   SIDEBAR
========================================================= */

#sidebar{

  position:fixed;

  left:50%;
  bottom:14px;

  transform:translateX(-50%);

  width:fit-content;
  max-width:calc(100vw - 20px);

  min-height:96px;

  padding:12px 14px;

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

  overflow:hidden;

  z-index:1000;

  border-radius:34px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.10),
      rgba(255,255,255,.04)
    );

  backdrop-filter:blur(24px) saturate(1.4);
  -webkit-backdrop-filter:blur(24px) saturate(1.4);

  border:1px solid rgba(255,255,255,.10);

  box-shadow:
    0 12px 40px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.08);

  transition:
    width .45s cubic-bezier(.22,1,.36,1),
    height .45s cubic-bezier(.22,1,.36,1),
    transform .35s ease,
    opacity .25s ease,
    padding .35s ease;

  isolation:isolate;
}

/* glow premium */
#sidebar::before{

  content:"";

  position:absolute;
  inset:0;

  background:
    radial-gradient(
      circle at top center,
      rgba(255,204,0,.16),
      transparent 65%
    );

  pointer-events:none;

  z-index:-1;
}

/* =========================================================
   COLLAPSED
========================================================= */

#sidebar.collapsed{

  width:fit-content;

  min-height:96px;
}

/* =========================================================
   EXPANDED
========================================================= */

#sidebar.expanded{

  width:980px;

  max-width:calc(100vw - 40px);

  min-height:260px;

  padding:22px;

  align-items:stretch;
}

/* =========================================================
   SCROLL
========================================================= */

.sidebar-scroll{

  width:100%;

  display:flex;
  flex-direction:row;

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

  gap:12px;

  overflow-x:auto;
  overflow-y:hidden;

  scroll-behavior:smooth;

  scrollbar-width:none;

  -webkit-overflow-scrolling:touch;

  padding:0 4px;
}

.sidebar-scroll::-webkit-scrollbar{
  display:none;
}


/* expanded layout */
#sidebar.expanded .sidebar-scroll{
  display:flex;

  flex-direction:row;
  flex-wrap:nowrap;

  overflow-x:auto;
  overflow-y:hidden;

  gap:16px;
  padding:4px;

  scroll-behavior:smooth;
}

#sidebar.expanded .sidebar-scroll::-webkit-scrollbar{
  height:8px;
}

#sidebar.expanded .sidebar-scroll::-webkit-scrollbar-track{
  background:rgba(255,255,255,.06);
  border-radius:999px;
}

#sidebar.expanded .sidebar-scroll::-webkit-scrollbar-thumb{
  background:linear-gradient(to right,#ffcc00,#d6a900);
  border-radius:999px;
}

#sidebar.expanded .sidebar-scroll::-webkit-scrollbar-thumb:hover{
  background:#ffcc00;
}

/* =========================================================
   MENU ITEMS
========================================================= */

.menu-item{

  position:relative;

  min-width:76px;
  width:76px;

  height:76px;

  border-radius:24px;

  display:flex;
  flex-direction:column;

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

  gap:6px;

  flex-shrink:0;

  cursor:pointer;

  overflow:hidden;

  color:#fff;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );

  border:1px solid rgba(255,255,255,.06);

  transition:
    transform .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}


.menu-item{

  position:relative;

  min-width:76px;
  width:76px;

  height:76px;

  border-radius:24px;

  display:flex;
  flex-direction:column;

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

  gap:6px;

  flex-shrink:0;

  cursor:pointer;

  overflow:hidden;

  color:#fff;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );

  border:1px solid rgba(255,255,255,.06);

  transition:
    transform .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

/* hover */
.menu-item:hover{



  background:
    linear-gradient(
      180deg,
      rgba(255,204,0,.16),
      rgba(255,204,0,.06)
    );

  border-color:rgba(255,204,0,.24);

  box-shadow:
    0 10px 24px rgba(255,204,0,.18);
}



/* expanded item */
#sidebar.expanded .menu-item{

  width:140px;
  min-width:140px;

  height:118px;

  padding:14px;

  border-radius:28px;

  gap:10px;
}

/* no hover */
.menu-item.no-hover:hover{

 
  transform:
    translateY(-2px)
    scale(1.04);


  background: 
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );

  border-color:rgba(255,255,255,.06);

    box-shadow:
    0 10px 24px rgba(255,204,0,.18);
}

/* =========================================================
   ACTIVE
========================================================= */

.menu-item.active{

  background:
    linear-gradient(
      180deg,
      rgba(255,204,0,.20),
      rgba(255,204,0,.08)
    );

  border-color:rgba(255,204,0,.26);
}

.menu-item.active::after{

  content:"";

  position:absolute;

  bottom:6px;
  left:50%;

  transform:translateX(-50%);

  width:24px;
  height:4px;

  border-radius:999px;

  background:#ffcc00;

  box-shadow:
    0 0 12px rgba(255,204,0,.65);
}

/* =========================================================
   ICON
========================================================= */

.menu-icon{

  width:34px;
  height:34px;

  min-width:34px;

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

  font-size:28px;

  line-height:1;

  flex-shrink:0;

  transition:
    transform .22s ease,
    color .22s ease;
}

.menu-item:hover .menu-icon{

  transform:scale(1.08);
  border-radius:28px;
  color:#ffcc00;
}

/* logo image */
.menu-icon img,
.menu-icon img.icon-logo{

  width:76px;
  height:76px;

  max-width:76px;
  max-height:76px;

  object-fit:contain;

  display:block;
}

/* =========================================================
   MENU ITEM 2 (clone)
========================================================= */

.menu-item2{
  position:relative;
  min-width:76px;
  width:76px;
  height:76px;
  border-radius:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex-shrink:0;
  cursor:pointer;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.06);
  transition:transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.menu-item2:hover{
  background:linear-gradient(180deg,rgba(255,204,0,.16),rgba(255,204,0,.06));
  border-color:rgba(255,204,0,.24);
  box-shadow:0 10px 24px rgba(255,204,0,.18);
}

/* =========================================================
   ICON 2 (clone)
========================================================= */

.menu-icon2{
  width:34px;
  height:34px;
  min-width:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  line-height:1;
  flex-shrink:0;
  transition:transform .22s ease, color .22s ease;
}

.menu-item2:hover .menu-icon2{
  transform:scale(1.08);
  color:#ffcc00;
}

/* logo inside icon2 */
.menu-icon2 img{
  width:76px;
  height:76px;
  max-width:76px;
  max-height:76px;
  object-fit:contain;
  display:block;
}
#sidebar.collapsed .menu-item2{
  display:flex;
}
#sidebar.expanded .menu-item2{
  display:none;
}


/* =========================================================
   LABEL
========================================================= */

.menu-label{

  width:100%;

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

  margin:0;

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

  color:#fff;

  text-align:center;

  line-height:1.2;

  white-space:nowrap;

  opacity:.94;

  transition:
    opacity .22s ease,
    color .22s ease;
}

.menu-item:hover .menu-label{
  color:#ffcc00;
}

/* expanded labels */
#sidebar.expanded .menu-label{

  font-size:15px;

  white-space:normal;
}

/* =========================================================
   TITLE / LOGO
========================================================= */

.sidebar-title{

  display:flex;

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

  flex-shrink:0;

  width:auto;
}

/* =========================================================
   WRAPPER
========================================================= */

.sidebar-title .menu-item{

  overflow:hidden;

  transform:none !important;
}

/* evita hover movement */
.sidebar-title .menu-item:hover{




  background:
    linear-gradient(
      180deg,
      rgba(255,204,0,.16),
      rgba(255,204,0,.06)
    );

  border-color:rgba(255,204,0,.24);

  box-shadow:
    0 10px 24px rgba(255,204,0,.18);
}

/* =========================================================
   COLLAPSED – NASCONDI TITLE + LOGO
========================================================= */

#sidebar.collapsed .sidebar-title{
  display:none;
}

/* (le regole sotto sono inutili in collapsed,
   perché .sidebar-title è nascosto) */

/*
#sidebar.collapsed .sidebar-title .menu-item{ ... }
#sidebar.collapsed .sidebar-title .menu-label{ ... }
#sidebar.collapsed .sidebar-title .menu-icon{ ... }
#sidebar.collapsed .sidebar-title .icon-logo{ ... }
*/

/* =========================================================
   SCROLL ORIZZONTALE IN COLLAPSED
========================================================= */

#sidebar.collapsed .sidebar-scroll{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;        /* tutto in una riga */
  overflow-x:auto;         /* scroll orizzontale */
  overflow-y:hidden;

  width:100%;
  max-width:100%;

  gap:12px;
  padding:6px;

  scrollbar-width:none;    /* Firefox */
}

#sidebar.collapsed .sidebar-scroll::-webkit-scrollbar{
  display:none;            /* Chrome/Safari/Edge */
}



/* =========================================================
   EXPANDED
========================================================= */

#sidebar.expanded .sidebar-title{

  width:100%;

  padding:2px;

  overflow:hidden;

  box-sizing:border-box;
}

#sidebar.expanded .sidebar-title .menu-item{

  width:100%;
  max-width:100%;

  min-width:0;

  min-height:96px;

  padding:0 24px;

  border-radius:30px;

  box-sizing:border-box;

  overflow:hidden;

  display:flex;

  flex-direction:row !important;

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

  gap:18px;
}

/* =========================================================
   LOGO
========================================================= */

#sidebar.expanded .sidebar-title .menu-icon{

  width:56px;
  height:56px;

  min-width:56px;

  display:flex;

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

  overflow:hidden;

  flex-shrink:0;
}

/* logo */
#sidebar.expanded .sidebar-title .icon-logo{

  width:56px;
  height:56px;

  object-fit:contain;

  display:block;
}

/* =========================================================
   LABEL
========================================================= */

#sidebar.expanded .sidebar-title .menu-label{

  flex:1;

  min-width:0;

  overflow:hidden;

  display:flex;

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

  text-align:left;
}

/* testo */
#sidebar.expanded .sidebar-title h3{

  margin:0;

  width:100%;

  font-size:24px;
  font-weight:900;

  line-height:1;

  color:#ffcc00;

  white-space:nowrap;

  overflow:hidden;
  text-overflow:ellipsis;
}
/* =========================================================
   EXTRA BUTTONS
========================================================= */

.btn-sidebar{

  width:100%;

  min-height:72px;

  border:none;
  border-radius:22px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.04)
    );

  color:#fff;

  font-size:18px;
  font-weight:800;

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

  gap:12px;

  cursor:pointer;

  transition:
    transform .22s ease,
    background .22s ease;
}

/* show only expanded */
#sidebar.expanded .btn-sidebar{
  display:flex;
}

.btn-sidebar:hover{

  background:
    linear-gradient(
      180deg,
      rgba(255,204,0,.16),
      rgba(255,204,0,.08)
    );

  transform:translateY(-2px);
}

/* =========================================================
   HELP BOX
========================================================= */

.sidebar-help{

  width:100%;

  display:none;
  flex-direction:column;

  gap:10px;

  border-radius:26px;

  padding:22px;

  background:rgba(255,255,255,.05);

  border:1px solid rgba(255,255,255,.08);
}

#sidebar.expanded .sidebar-help{
  display:flex;
}

.sidebar-help-text{

  font-size:16px;
  line-height:1.7;

  color:#fff;

  opacity:.74;
}

/* =========================================================
   HANDLE
========================================================= */

#sidebarHandle{

  position:absolute;

  top:50%;
  right:-18px;

  transform:translateY(-50%);

  width:38px;
  height:126px;

  border-radius:20px;

  background:#ffcc00;

  color:#000;

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

  font-size:22px;
  font-weight:900;

  cursor:pointer;

  z-index:2000;

  box-shadow:
    0 0 24px rgba(255,204,0,.45);

  transition:
    transform .22s ease,
    box-shadow .22s ease;
}

/* =========================================================
   HANDLE ARROWS
========================================================= */

#sidebarHandle::before{

  content:"❯";

  position:relative;

  left:-9px; /* 👈 sposta leggermente a sinistra */

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

  width:100%;
  height:100%;

  line-height:1;
}

/* expanded */
#sidebar.expanded #sidebarHandle::before{

  content:"❮";

  left:-9px; /* 👈 centratura ottica */
}

#sidebarHandle:hover{

  transform:
    translateY(-50%)
    scale(1.04);

  box-shadow:
    0 0 32px rgba(255,204,0,.65);
}

/* =========================================================
   OVERLAY
========================================================= */

#sidebarOverlay{

  position:fixed;
  inset:0;

  background:rgba(0,0,0,.36);

  backdrop-filter:blur(8px);

  opacity:0;
  pointer-events:none;

  transition:.35s ease;

  z-index:999;
}

body.sidebar-open #sidebarOverlay{

  opacity:1;
  pointer-events:auto;
}

/* =========================================================
   MOBILE
========================================================= */

@media(max-width:768px){

  html,
  body{
    overflow-x:hidden;
  }

  body.sidebar-open{
    overflow:hidden;
  }

  /* =====================================================
     SIDEBAR
  ===================================================== */

  #sidebar{

    left:6px;
    right:6px;
    bottom:6px;

    transform:none;

    width:auto;
    max-width:none;

    min-height:82px;
    max-height:82px;

    padding:8px;

    border-radius:24px;

    overflow:hidden;
  }

  /* =====================================================
     COLLAPSED
  ===================================================== */

  #sidebar.collapsed{

    min-height:82px;
    max-height:82px;

    overflow:hidden;
  }

  /* =====================================================
     EXPANDED
  ===================================================== */

  #sidebar.expanded{

    top:8px;
    bottom:8px;
    left:8px;
    right:8px;

    width:auto;
    max-width:none;

    height:auto;
    max-height:none;

    min-height:auto;

    padding:14px;

    border-radius:30px;

    overflow:hidden;

    justify-content:flex-start;
  }

  /* =====================================================
     SCROLL AREA
  ===================================================== */

  .sidebar-scroll{

    width:100%;

    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;

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

    gap:8px;

    overflow-x:auto;
    overflow-y:hidden;

    padding:2px 2px 6px;

    scrollbar-width:none;

    -webkit-overflow-scrolling:touch;

    scroll-behavior:smooth;
  }

  .sidebar-scroll::-webkit-scrollbar{
    display:none;
  }

  /* expanded */
  #sidebar.expanded .sidebar-scroll{

    flex-wrap:wrap;

    overflow-y:auto;
    overflow-x:hidden;

    align-items:flex-start;
    align-content:flex-start;
    justify-content:flex-start;

    gap:12px;

    padding:4px;

    height:100%;
  }

  /* =====================================================
     MENU ITEM
  ===================================================== */

  .menu-item{

    width:62px;
    min-width:62px;

    height:62px;

    border-radius:18px;

    gap:4px;

    flex-shrink:0;

    scroll-snap-align:start;
  }

  #sidebar.expanded .menu-item{

    width:108px;
    min-width:108px;

    height:96px;

    padding:10px;

    border-radius:24px;
  }

  .menu-item:hover{

    transform:
      translateY(-1px)
      scale(1.02);
  }

  /* =====================================================
     ICON
  ===================================================== */

  .menu-icon{

    width:24px;
    height:24px;

    min-width:24px;

    font-size:20px;
  }

  .menu-icon img,
  .menu-icon img.icon-logo{

    width:38px;
    height:38px;

    max-width:38px;
    max-height:38px;
  }

  /* =====================================================
     LABEL
  ===================================================== */

  .menu-label{

    font-size:8px;

    line-height:1.1;

    white-space:nowrap;

    overflow:hidden;
    text-overflow:ellipsis;
  }

  #sidebar.expanded .menu-label{

    font-size:12px;

    white-space:normal;
  }

  /* =====================================================
     TITLE
  ===================================================== */

  .sidebar-title{
    padding-top:4px;
  }

  #sidebar.expanded .sidebar-title .menu-item{

    width:100%;

    min-height:78px;

    padding:0 14px;

    gap:12px;

    border-radius:22px;
  }

  #sidebar.expanded .sidebar-title .menu-icon{

    width:42px;
    height:42px;

    min-width:42px;
  }

  #sidebar.expanded .sidebar-title .icon-logo{

    width:42px;
    height:42px;
  }

  #sidebar.expanded .sidebar-title h3{

    font-size:17px;
  }

  /* =====================================================
     BUTTONS
  ===================================================== */

  .btn-sidebar{

    min-height:54px;

    border-radius:18px;

    font-size:14px;
  }

  .sidebar-help{

    padding:14px;

    border-radius:18px;
  }

  .sidebar-help-text{

    font-size:13px;
    line-height:1.5;
  }

  /* =====================================================
     HANDLE
  ===================================================== */

  #sidebarHandle{

    width:38px;
    height:74px;

    right:-8px;

    border-radius:18px;

    font-size:20px;
  }

  #sidebarHandle::before{
    left:-5px;
  }
}

/* =========================================================
   EXTRA SMALL DEVICES
========================================================= */

@media(max-width:480px){

  #sidebar{

    left:4px;
    right:4px;
    bottom:4px;

    min-height:76px;
    max-height:76px;

    padding:6px;
  }

  #sidebar.collapsed{

    min-height:76px;
    max-height:76px;
  }

  .sidebar-scroll{

    gap:6px;
  }

  .menu-item{

    width:56px;
    min-width:56px;

    height:56px;

    border-radius:16px;
  }

  .menu-icon{

    width:22px;
    height:22px;

    min-width:22px;

    font-size:18px;
  }

  .menu-icon img,
  .menu-icon img.icon-logo{

    width:34px;
    height:34px;
  }

  .menu-label{

    font-size:7px;
  }

  #sidebar.expanded .menu-item{

    width:92px;
    min-width:92px;

    height:88px;
  }

  #sidebarHandle{

    width:34px;
    height:66px;

    right:-6px;
  }
}
/* ================= INTRO ================= */
#intro {
  position: fixed;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

#logo,
#intro-title {
  font-size: 60px;
  color: #ffcc00;
  text-shadow: 0 0 20px #ffcc00;
}

#intro img {
  max-width: 220px;
  height: auto;
  margin-bottom: 12px;
}

/* =================== HOME =================== */
.home-content {
  max-width: 1100px;
  width: 92%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 25px 10px;
  text-align: center;
  color: #ffffff;
}

.home-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #ffcc00;
}

.home-subtitle {
  font-size: 1.1em;
  opacity: 0.8;
}

/* ================= OBIETTIVI ================= */
.home-box-obiettivi-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.home-box-obiettivi {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  padding: 18px;
  border-radius: 12px;
  background: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  font-weight: 600;
  font-size: 1.1em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-box-obiettivi:nth-child(1) {
  border-top: 4px solid #e74c3c;
}

.home-box-obiettivi:nth-child(2) {
  border-top: 4px solid #f39c12;
}

.home-box-obiettivi:nth-child(3) {
  border-top: 4px solid #2ecc71;
}

.home-box-obiettivi:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

/* ================= CONTENITORE BOX PRINCIPALI ================= */
.home-main-boxes {
  display: flex;
  gap: 25px;
  width: 100%;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

/* ================= BOX STANDARD ================= */
.home-box {
  background: #1a1a1a;
  border-left: 5px solid #ffcc00;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex: 1;
  min-width: 340px;
  max-width: 540px;
  text-align: left;           /* Cambiato da center a left per meglio leggibilità */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  
  /* === MODIFICHE PER ALLUNGARLO === */
  min-height: 620px;          /* ← Principale: aumenta questa valore */
  display: flex;
  flex-direction: column;
}

.home-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
}

.home-box h3 {
  color: #ffcc00;
  margin-bottom: 14px;
  font-size: 1.4em;
}

/* ================= CARD PROSSIMA GARA ================= */
.home-race-card {
  flex: 1;
  min-width: 340px;
  max-width: 540px;

  display: flex;
  flex-direction: column;
  gap: 15px;

  align-self: stretch;
}

/* ================= CARD GARA ================= */

.race-card {
  background: linear-gradient(
    145deg,
    #1a1a1a,
    #131313
  );

  border: 2px solid #ffcc00;
  border-radius: 14px;
padding-top: 70px;
  padding: 22px;

  position: relative;

  box-shadow: 
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(255, 204, 0, 0.15);

  text-align: left;

  display: flex;
  flex-direction: column;
  gap: 12px;

  overflow: hidden;

  height: 100%;
  box-sizing: border-box;

  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.home-race-card:hover .race-card {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.65);
}

/* =========================================================
   TEMI EVENTI
========================================================= */

/* ================= CLASSIFICATE ================= */

.race-card.tema-classificate {

  border-color: #ffcc00;

  background: 
    linear-gradient(
      145deg,
      rgba(255, 204, 0, 0.10),
      #151515
    );

  box-shadow: 
    0 0 20px rgba(255, 204, 0, 0.18),
    0 8px 22px rgba(0,0,0,0.45);
}

/* ================= CAMPIONATO ================= */

.race-card.tema-campionato {

  border-color: #00bfff;

  background: 
    linear-gradient(
      145deg,
      rgba(0,191,255,0.12),
      #141414
    );

  box-shadow: 
    0 0 20px rgba(0,191,255,0.20),
    0 8px 22px rgba(0,0,0,0.45);
}

/* ================= ENDURANCE ================= */

.race-card.tema-endurance {

  border-color: #ff5a36;

  background: 
    linear-gradient(
      145deg,
      rgba(255,90,54,0.10),
      #151515
    );

  box-shadow: 
    0 0 20px rgba(255,90,54,0.18),
    0 8px 22px rgba(0,0,0,0.45);
}

/* ================= ASSETTO LIBERO ================= */

.race-card.tema-assetto {

  border-color: #00d26a;

  background: 
    linear-gradient(
      145deg,
      rgba(0,210,106,0.10),
      #151515
    );

  box-shadow: 
    0 0 20px rgba(0,210,106,0.18),
    0 8px 22px rgba(0,0,0,0.45);
}

/* ================= DREAM TEAM ================= */

.race-card.tema-dream {

  border-color: #b86cff;

  background: 
    linear-gradient(
      145deg,
      rgba(184,108,255,0.12),
      #141414
    );

  box-shadow: 
    0 0 20px rgba(184,108,255,0.22),
    0 8px 22px rgba(0,0,0,0.45);
}

/* ================= BUDGET CUP ================= */

.race-card.tema-budget {

  border-color: #ff7b00;

  background: 
    linear-gradient(
      145deg,
      rgba(255,123,0,0.10),
      #151515
    );

  box-shadow: 
    0 0 20px rgba(255,123,0,0.20),
    0 8px 22px rgba(0,0,0,0.45);
}
/* ================= LOCANDINA EVENTO ================= */

.race-locandina {
  margin-top: 10px;

  display: none; /* nascosta se vuota */

  /* 🔥 CENTRATURA */
  display: flex;
  justify-content: center;

  width: 100%;

  border-radius: 10px;
  overflow: hidden;

  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.race-locandina img {
  width: 100%;
  max-width: 700px;   /* 🔥 evita stretch totale */
  height: auto;

  display: block;
  margin: 0 auto;

  object-fit: cover;
  border-radius: 10px;

  transition: transform 0.3s ease;
}

.race-locandina img:hover {
  transform: scale(1.02);
}

/* ================= NAVIGAZIONE GARE HOME ================= */

.home-race-navigation {
  position: absolute;

  top: 12px;
  right: 14px;

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

  z-index: 30;
}

.home-race-counter {
  background: rgba(0,0,0,0.45);
  color: #fff;

  padding: 5px 10px;

  border-radius: 30px;

  font-size: 0.8rem;
  font-weight: 700;

  min-width: 46px;
  text-align: center;
}

.home-race-arrow {
  width: 30px;
  height: 30px;

  border: none;
  border-radius: 50%;

  background: rgba(0,0,0,0.55);
  color: #fff;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;

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

  transition: 0.25s ease;
}

.home-race-arrow:hover {
  background: #ffcc00;
  color: #000;
}



.race-label {
  position: absolute;

  top: 14px;
  left: 18px;

  background: #ffcc00;
  color: #000;

  font-weight: 800;
  font-size: 0.72rem;

  padding: 6px 12px;

  border-radius: 8px;

  letter-spacing: 1px;

  z-index: 30;

  box-shadow: 
    0 3px 10px rgba(0,0,0,0.35);
}

.race-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.race-type {
  color: #ffcc00;
  font-weight: 700;

  padding-right: 120px;

  line-height: 1.4;
}

.race-date-time {
  opacity: 0.8;
}

.race-dot {
  margin: 0 6px;
  opacity: 0.4;
}

.race-track {
  font-size: 1.5em;
  font-weight: 700;
  margin-top: 6px;
}

.race-category {
  opacity: 0.75;
  margin-bottom: 12px;
}

.race-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 14px 0;
}

.race-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.race-info-box {
  background: #222;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.race-info-label {
  font-size: 0.8em;
  opacity: 0.6;
}

.race-info-value {
  font-weight: 700;
  margin-top: 2px;
}

.race-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-outline {
  background: transparent;
  border: 1px solid #ffcc00;
  color: #ffcc00;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-outline:hover {
  background: #ffcc00;
  color: #000;
}

.btn-prenota {
  background: #ffcc00;
  border: none;
  padding: 12px 26px;
  color: #222;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-prenota:hover {
  transform: scale(1.07);
  background: #e6b800;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  margin-top: 15px;
}

input,
select {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  box-sizing: border-box;
}

button {
  background: #ffcc00;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 8px;
}
.banner-slider {
  position: relative;
  width: 100%;
  height: auto;        /* 👈 fondamentale */
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 25px;
  flex-shrink: 0;
  background: #111;
}


.banner-slide {
  display: none;
  width: 100%;
  height: auto;
}

.banner-slide.active {
  display: block;
  animation: fade 0.8s;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 👈 invece di cover */
  background: #000;      /* opzionale: riempie gli spazi vuoti */
  border-radius: 10px;
}

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;

  width: 38px;
  height: 38px;

  border: none;
  border-radius: 50%;

  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);

  color: #fff;
  font-size: 22px;
  font-weight: bold;

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

  cursor: pointer;

  transition: 
    background 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;

  opacity: 0;
  pointer-events: none;
}

.banner-slider:hover .banner-prev,
.banner-slider:hover .banner-next {
  opacity: 1;
  pointer-events: auto;
}

.banner-prev:hover,
.banner-next:hover {
  background: rgba(255,204,0,0.95);
  color: #000;
}

.banner-prev {
  left: 12px;
}

.banner-next {
  right: 12px;
}


.banner-prev { left: 10px; }
.banner-next { right: 10px; }

.banner-dots {
  text-align: center;
  margin-top: 10px;
}

.banner-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: 0.3s;
}

.banner-dot.active {
  background: #00ff88;
  transform: scale(1.3);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* PSN PIN MODAL */
/* OVERLAY */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/* CONTENUTO BASE */
.modal-content {
  background: #0a0a0a;
  border-radius: 14px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  border: 1px solid #222;
  animation: fadeIn .25s ease;
  max-height: min(85vh, 720px);
  overflow: auto;
}

/* INPUT */
.modal-content input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  margin-top: 10px;
  font-size: 16px; /* 🔥 evita zoom iOS */
}

/* BOTTONI */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
}

/* ================= MOBILE MODAL ================= */
@media (max-width: 600px) {
  .modal {
    align-items: center;
  }
  .modal-content {
    width: 100%;
    max-width: min(440px, 94vw);
    border-radius: 16px;
    padding: 20px 16px 24px;
    animation: fadeIn .25s ease;
  }
}

/* ANIMAZIONI */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ================= ADESIONE ================= */
.avatar-section {
  margin-top: 20px;
}

.avatar-header h2 {
  color: #ffcc00;
  margin-bottom: 5px;
}

.avatar-header p {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 15px;
}

.avatar-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 180px;
  background: #111;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  border: 1px solid rgba(255, 204, 0, 0.2);
}

#avatarPreviewImg {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffcc00;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
  display: none;
}

#avatarPreviewText {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.7;
}

.btn-confirm {
  margin-top: 10px;
  width: 100%;
  background: #ffcc00;
  border: none;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
}

.avatar-grid-wrapper {
  flex: 1;
  background: #0f0f0f;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 204, 0, 0.2);
  max-height: 220px;
  overflow-y: auto;
}

#avatarGrid,
#avatarGridModifica,
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
  align-items: center;
  justify-items: center;
}

#avatarGrid img,
#avatarGridModifica img,
.avatar-grid img {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px;
  max-height: 52px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

#avatarGrid img:hover,
#avatarGridModifica img:hover,
.avatar-grid img:hover {
  transform: scale(1.08);
  border: 2px solid #ffcc00;
}

.avatar-selected {
  border: 3px solid #ffcc00 !important;
  transform: scale(1.08);
  box-shadow: 0 0 10px #ffcc00;
}

/* FINE STEP 1 */
/* STEP 2 */
.community-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* STEP 2 */
.community-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white;
  text-decoration: none;
  cursor: pointer;
  position: relative;

  /* FIX: rimosso z-index che creava conflitto */
  /* z-index: 2; */
}


.community-link:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.team-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

/* STEP 2 */
#customOptions input[type="checkbox"],
#giorniBox input[type="checkbox"],
#fasceBox input[type="checkbox"] {
  accent-color: #ffcc00;
  transform: scale(1.2);
}

.locked {
  pointer-events: none;
  opacity: 1 !important;
  filter: none !important;
}

.locked::after {
  content: " 🔒";
  font-size: 12px;
  margin-left: 5px;
}

/* COMMUNITY GRID */
.community-grid {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;

  /* 🔥 FIX: porta la grid sopra overlay dei consensi */
  position: relative;
  z-index: 20;
}

.community-item {
  width: 100px;
  background: #111;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  /* 🔥 FIX: garantisce che ogni item riceva il click */
  position: relative;
  z-index: 30;
}

.community-item img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.community-item span {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  line-height: 1.1;
}

.community-item:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
}

.community-selected {
  border: 2px solid #ffcc00;
  box-shadow: 0 0 12px #ffcc00;
}

/* CONSENSI */
.consensi-wrapper {
  background:#111;
  border-radius:10px;
  overflow:hidden;

  /* 🔥 FIX: consensi sotto la community-grid */
  position: relative;
  z-index: 1;
}

.consensi-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px;
  background:#1a1a1a;

  /* 🔥 FIX: header non deve coprire la grid */
  position: relative;
  z-index: 1;
}

.consensi-box {
  --base-height: 120px;
  height: var(--base-height);
  max-height: var(--base-height);
  overflow:auto;
  padding:10px;
  resize: vertical;
  min-height: var(--base-height);
  max-height: calc(var(--base-height) * 3.33);
  transition:0.25s;

  /* 🔥 FIX: box sotto la grid */
  position: relative;
  z-index: 1;
}

.consensi-box.expanded {
  height: calc(var(--base-height) * 3);
  max-height: calc(var(--base-height) * 3);
}


.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.form-message.error {
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid red;
  color: #ff4d4d;
}

.form-message.success {
  background: rgba(0, 255, 100, 0.15);
  border: 1px solid #00ff88;
  color: #00ff88;
}

/* Error Adesione */
.input-error {
  border: 2px solid #ff4444 !important;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3) !important;
  animation: shake 0.5s ease-in-out;
}

.select-error {
  border: 2px solid #ff4444 !important;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3) !important;
}

.consensi-error {
  outline: 2px solid #ff4444;
  outline-offset: 2px;
  border-radius: 5px;
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
/* ===== WIZARD ADESIONE ===== */
.adesione-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 20px 0 24px;
  align-items: center;
}

.adesione-progress-line {
  position: absolute;
  top: 14px;
  left: 3%;
  right: 3%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.adesione-progress-fill {
  position: absolute;
  top: 14px;
  left: 3%;
  width: 0;
  height: 2px;
  background: #ffcc00;
  transition: width 0.25s ease;
}

.adesione-progress-step {
  position: relative;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.45;
}

.adesione-progress-step::before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 2px solid #363636;
  background: #0f0f0f;
}

.adesione-progress-step.active {
  opacity: 1;
  color: #ffcc00;
  font-weight: 700;
}

.adesione-progress-step.active::before {
  border-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.35);
}

.adesione-wizard-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.adesione-step {
  display: none;
}

.adesione-step.active {
  display: block;
}

.adesione-sub {
  opacity: 0.65;
  font-size: 13px;
  margin-top: -2px;
}

.adesione-nav {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn-secondary {
  background: #111;
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.7);
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
}

.btn-secondary:hover {
  background: #181818;
}

@media (max-width: 900px) {

  .adesione-progress{
    grid-template-columns: repeat(3, 1fr);
    row-gap: 12px;
  }
  .adesione-progress-line,
  .adesione-progress-fill {
    display: none;
  }
}


/* =========================================
   PILOT CARD PREMIUM SYSTEM
========================================= */

.pilot-card{

  position:relative;

  width:260px;
  min-height:420px;

  perspective:1400px;

  transform-style:preserve-3d;

  -webkit-perspective:1400px;
  -webkit-transform-style:preserve-3d;

  isolation:isolate;

  cursor:pointer;

  flex-shrink:0;
}


/* =========================================
   FLIP INNER
========================================= */

.pilot-card-inner{

  position:relative;

  width:100%;
  height:100%;
  min-height:420px;

  transform-style:preserve-3d;
  -webkit-transform-style:preserve-3d;

  transition: 
    transform .75s cubic-bezier(.2,.8,.2,1);

  will-change:transform;

  transform:translateZ(0);

  -webkit-transform:translateZ(0);
}


/* flip SOLO via JS */
.pilot-card.flipped .pilot-card-inner{

  transform: 
    translateZ(0)
    rotateY(180deg);

  -webkit-transform: 
    translateZ(0)
    rotateY(180deg);
}


/* =========================================
   FRONT + BACK
========================================= */

.pilot-front,
.pilot-back{

  position:absolute;
  inset:0;

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

  gap:14px;

  padding:18px 16px;

  border-radius:24px;

    overflow:visible;

  border:2px solid rgba(255,255,255,.10);

  box-sizing:border-box;

  transition: 
    box-shadow .25s ease,
    border-color .25s ease;

  /* FIX BROWSER */
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;

  transform-style:preserve-3d;
  -webkit-transform-style:preserve-3d;

  will-change:transform;

  transform:translateZ(1px);

  -webkit-transform:translateZ(1px);
}


/* FRONT */

.pilot-front{

  z-index:2;

  transform: 
    rotateY(0deg)
    translateZ(1px);

  -webkit-transform: 
    rotateY(0deg)
    translateZ(1px);
}


/* BACK */

.pilot-back{

  justify-content:flex-start;

  transform: 
    rotateY(180deg)
    translateZ(1px);

  -webkit-transform: 
    rotateY(180deg)
    translateZ(1px);
}
/* FIX SAFARI / MOBILE */

.pilot-front,
.pilot-back{
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* =========================================
   PREMIUM OVERLAY
========================================= */

.pilot-front::before,
.pilot-back::before{

  content:"";

  position:absolute;
  inset:0;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.10),
      rgba(255,255,255,.02)
    );

  pointer-events:none;
}

.pilot-front::after,
.pilot-back::after{

  content:"";

  position:absolute;

  inset:-40%;

  background: 
    radial-gradient(
      circle,
      rgba(255,255,255,.08),
      transparent 70%
    );

  opacity:.4;

  pointer-events:none;
}


/* =========================================
   HOVER
========================================= */

.pilot-card:hover .pilot-front,
.pilot-card:hover .pilot-back{

  box-shadow: 
    0 18px 36px rgba(0,0,0,.45),
    0 0 24px rgba(255,255,255,.10);

  border-color: 
    rgba(255,255,255,.20);
}


/* IMPORTANTISSIMO:
   evita override del flip */
.pilot-card:hover .pilot-card-inner{
  will-change:transform;
}


/* =========================================
   POST-IT PIN
========================================= */

.pin-corner{

  position:absolute;

  top:-8px;
  right:-8px;

  width:62px;
  height:62px;

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

  transform:rotate(10deg);

  z-index:20;
}

.pin-btn{

  width:54px;
  height:54px;

  border:none;
  border-radius:14px;

  font-size:22px;

  cursor:pointer;

  color:#fff;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.18),
      rgba(255,255,255,.05)
    );

  backdrop-filter:blur(8px);

  box-shadow: 
    0 8px 20px rgba(0,0,0,.45);

  transition: 
    transform .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.pin-btn:hover{

  transform: 
    scale(1.08)
    rotate(-10deg);
}

.pin-btn.active{

  background: 
    linear-gradient(
      145deg,
      #ffe066,
      #ffcc00
    );

  color:#000;

  box-shadow: 
    0 0 20px rgba(255,204,0,.7);
}


/* =========================================
   AVATAR
========================================= */

.avatar{

  width:88px;
  height:88px;

  border-radius:50%;

  object-fit:cover;

  border:3px solid rgba(255,255,255,.18);

  z-index:2;

  flex-shrink:0;

  transition: 
    transform .25s ease,
    box-shadow .25s ease;
}

.pilot-card:hover .avatar{

  transform:scale(1.08);

  box-shadow: 
    0 0 18px rgba(255,255,255,.22);
}


/* =========================================
   INFO
========================================= */

.pilot-info{

  position:relative;
  z-index:2;

  text-align:center;

  width:100%;
}

.pilot-info strong{

  display:block;

  font-size:18px;
  font-weight:900;

  margin-bottom:4px;

  word-break:break-word;
}

.pilot-info small{

  font-size:13px;

  opacity:.85;

  word-break:break-word;
}


/* =========================================
   EXPAND BUTTON PREMIUM (CLEAN)
========================================= */

.expand-btn{

  width:100%;

  min-height:46px;

  margin-top:auto;

  border:none;
  border-radius:14px;

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

  color:#fff;

  cursor:pointer;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.16),
      rgba(255,255,255,.05)
    );

  border:1px solid rgba(255,255,255,.10);

  backdrop-filter:blur(8px);

  box-shadow: 
    0 6px 14px rgba(0,0,0,.20);

  transition: 
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;

  z-index:5;
}


/* =========================================
   EXPAND BOX (COMPACT + HIGHER)
========================================= */

.expand-btn{

  width:100%;

  min-height:44px;

  margin-top:auto;

  padding:10px 14px;

  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;

  font-size:14px;
  font-weight:800;
  line-height:1;

  color:#fff;

  cursor:pointer;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.16),
      rgba(255,255,255,.05)
    );

  backdrop-filter:blur(8px);

  box-shadow: 
    0 6px 14px rgba(0,0,0,.20);

  transition: 
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;

  will-change: transform;

  z-index:5;
}

.expand-btn:hover{

  transform:translateY(-2px);

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.24),
      rgba(255,255,255,.08)
    );

  box-shadow: 
    0 0 14px rgba(255,255,255,.14);
}

.expand-btn:active{
  transform:scale(.96);
}

/* =========================================
   QUICK STATS WRAPPER (COMPACT)
========================================= */

.expand-box .quick-stats{

  width:100%;

  display:grid;
  grid-template-columns: repeat(3, 1fr);

  gap:6px; /* 🔥 ridotto */

  padding:8px; /* 🔥 ridotto */

  border-radius:12px;

  background: rgba(255,255,255,.06);

  border:1px solid rgba(255,255,255,.08);

  box-sizing:border-box;
}


/* GRID FALLBACK */

.quick-stats{

  display:grid;
  grid-template-columns: repeat(3, 1fr);

  gap:6px;

  width:100%;
}


/* STAT BOX */

.quick-stats span{

  min-width:0;

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

  min-height:50px; /* 🔥 più compatto */

  padding:6px 4px; /* 🔥 ridotto */

  border-radius:10px;

  background: rgba(255,255,255,.04);

  border:1px solid rgba(255,255,255,.06);

  text-align:center;

  overflow:hidden;
}


/* LABEL */

.qs-label{

  width:100%;

  font-size:10px;

  font-weight:600;

  opacity:.85;

  margin-bottom:2px;

  line-height:1.2;

  word-break:break-word;
}


/* VALUE */

.qs-value{

  width:100%;

  font-size:15px; /* 🔥 leggermente ridotto */

  font-weight:900;

  line-height:1.1;

  color:#fff;

  text-align:center;

  overflow-wrap:anywhere;

  min-width:0;
}


/* =========================================
   RETRO TROFEI
========================================= */

.retrotrofei{

  width:100%;

  display:grid;

  grid-template-columns: 
    repeat(2,minmax(0,1fr));

  gap:12px;

  padding:14px 10px;

  margin-top:6px;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.02)
    );

  border: 
    1px solid rgba(255,255,255,.10);

  border-radius:18px;

  backdrop-filter:blur(10px);

  box-sizing:border-box;

  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,.12),
    0 8px 22px rgba(0,0,0,.25);
}


/* TROFEO BOX */

.retrotrofei span{

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

  padding:12px 8px;

  min-height:70px;

  border-radius:14px;

  background: 
    rgba(255,255,255,.06);

  border: 
    1px solid rgba(255,255,255,.10);

  text-align:center;

  box-sizing:border-box;

  box-shadow: 
    0 0 10px rgba(255,215,0,.15),
    inset 0 0 6px rgba(255,255,255,.05);

  transition: 
    transform .25s ease,
    box-shadow .25s ease;
}

.retrotrofei span:hover{

  transform: 
    translateY(-4px)
    scale(1.04);

  box-shadow: 
    0 0 18px rgba(255,215,0,.35),
    inset 0 0 10px rgba(255,255,255,.10);
}


/* LABEL */

.trofei-label{

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

  opacity:.85;

  margin-bottom:4px;

  text-transform:uppercase;

  letter-spacing:.5px;

  text-shadow: 
    0 1px 2px rgba(0,0,0,.4);
}


/* VALUE */

.trofei-value{

  font-size:20px;
  font-weight:900;

  color:#ffd700;

  line-height:1;

  text-shadow: 
    0 0 6px rgba(255,215,0,.6),
    0 0 12px rgba(255,215,0,.4);
}

.trofei-value::before{

  content:"🏆 ";

  font-size:16px;

  margin-right:2px;

  opacity:.9;
}
/* =========================================
   ACTION BUTTONS
========================================= */

.pilot-actions {

  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 10px;

  width: 100%;

  z-index: 2;
}

.pilot-actions button {

  min-height: 42px;
  min-width: 42px;

  padding: 10px 14px;

  border: none;
  border-radius: 12px;

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

  color: #fff;

  cursor: pointer;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.16),
      rgba(255,255,255,.05)
    );

  backdrop-filter: blur(8px);

  transition: 
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.pilot-actions button:hover {

  transform: scale(1.08);

  box-shadow: 
    0 0 12px rgba(255,255,255,.15);
}

.pilot-actions button:active {
  transform: scale(.92);
}

.pilot-card.expand-open .pilot-actions {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .25s ease;
}
.pilot-card.expand-open .expand-btn {
  transform: translateY(-60px);
  transition: transform .25s ease;
}
.pilot-card.expand-open .expand-box {
    transform: translateY(-60px);
  transition: bottom .25s ease;
}



/* =========================================
   CONFRONTO
========================================= */

.btn-confronto {

  opacity: .55;

  transition: all .2s ease;
}

.btn-confronto:hover {
  opacity: 1;
}

.btn-confronto.active {

  opacity: 1;

  background: 
    linear-gradient(
      145deg,
      #ffe066,
      #ffcc00
    );

  color: #000;

  box-shadow: 
    0 0 18px rgba(255,204,0,.6);
}

/* =========================================
   BADGE VS
========================================= */

.badge-vs {

  padding: 4px 8px;

  border-radius: 8px;

  font-size: 11px;
  font-weight: 800;

  color: #fff;

  background: 
    linear-gradient(
      145deg,
      #ff2a2a,
      #cc0000
    );

  animation: 
    pulseVS 1.2s infinite ease-in-out;
}

@keyframes pulseVS {

  0%{
    transform: scale(1);
    opacity: 1;
  }

  50%{
    transform: scale(1.15);
    opacity: .7;
  }

  100%{
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================
   PIN CARD
========================================= */

.pin-card {

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 10px 12px;

  border-radius: 14px;

  background: #111;

  border: 1px solid rgba(255,204,0,.4);
}

/* =========================================
   GRID
========================================= */

.pilot-grid {

  display: grid;

  grid-template-columns: 
    repeat(auto-fit,minmax(260px,1fr));

  gap: 28px;

  width: 100%;
  max-width: 1400px;

  margin: 0 auto;

  padding: 20px;
}

/* =========================================
   MOBILE
========================================= */

@media(max-width:768px){

  .pilot-card{

    width:100%;
    max-width:420px;

    min-height:unset;
  }

  .pilot-front,
  .pilot-back{

    padding:16px 14px;
  }

  .expand-box .quick-stats{

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

  .retrotrofei{

    grid-template-columns: 
      repeat(2,minmax(0,1fr));
  }
}
/* =========================================
   COMPARE CONTAINER
========================================= */

.compare-container{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:stretch;

  gap:24px;

  width:100%;
  margin:30px auto;
  padding:10px;
}


/* =========================================
   COMPARE CARD
========================================= */

.compare-card{

  position:relative;

  width:280px;
  max-width:100%;

  padding:22px 20px;

  border-radius:24px;

  background: 
    linear-gradient(
      145deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );

  border:2px solid rgba(255,204,0,.45);

  box-shadow: 
    0 10px 30px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.08);

  backdrop-filter:blur(10px);

  overflow:hidden;

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


/* glow top */
.compare-card::before{

  content:"";

  position:absolute;

  top:-80px;
  left:-80px;

  width:180px;
  height:180px;

  border-radius:50%;

  background: 
    radial-gradient(
      circle,
      rgba(255,204,0,.25),
      transparent 70%
    );

  pointer-events:none;
}


/* hover */
.compare-card:hover{

  transform: 
    translateY(-6px)
    scale(1.02);

  border-color:#ffcc00;

  box-shadow: 
    0 16px 40px rgba(0,0,0,.55),
    0 0 20px rgba(255,204,0,.18);
}


/* =========================================
   AVATAR
========================================= */

.compare-card .avatar{

  width:110px;
  height:110px;

  object-fit:cover;

  border-radius:50%;

  display:block;

  margin:0 auto 16px;

  border:3px solid #ffcc00;

  box-shadow: 
    0 0 20px rgba(255,204,0,.25);
}


/* =========================================
   NOME PILOTA
========================================= */

.compare-card h3{

  text-align:center;

  margin-bottom:20px;

  font-size:24px;
  font-weight:800;

  color:#fff;

  letter-spacing:.5px;

  text-shadow: 
    0 2px 10px rgba(0,0,0,.5);
}


/* =========================================
   STATS
========================================= */

.compare-card div{

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

  gap:10px;

  padding:10px 12px;
  margin-bottom:10px;

  border-radius:14px;

  background: 
    rgba(255,255,255,.04);

  border: 
    1px solid rgba(255,255,255,.06);

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

  color:#f1f1f1;
}


/* =========================================
   MOBILE
========================================= */

@media(max-width:768px){

  .compare-container{

    gap:16px;
    padding:6px;
  }

  .compare-card{

    width:100%;
    max-width:420px;

    padding:20px 16px;
  }

  .compare-card h3{
    font-size:21px;
  }

  .compare-card div{
    font-size:13px;
  }
}
/* ==================================================
   GMZ PROFILE PREMIUM ULTRA — FIXED
================================================== */

/* =========================
   ANIMAZIONI (senza duplicati)
========================= */

@keyframes fadePop {
  0%   { opacity: 0; transform: translateY(12px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatingHero {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes heroGlow {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%       { opacity: .95; transform: scale(1.08); }
}

@keyframes shine {
  0%   { transform: translateX(-140%) skewX(-25deg); }
  100% { transform: translateX(220%) skewX(-25deg); }
}

@keyframes borderFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* =========================
   LAYOUT PRINCIPALE
========================= */

.profilo-layout {
  max-width: 1450px;
  margin: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadePop .45s ease;
}

/* =========================
   HERO (TOP ROW)
   flex: card + fazione hero
========================= */

.profilo-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;

  padding: 35px;
  border-radius: 30px;
  overflow: hidden;

  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 15px 50px rgba(0,0,0,.45);
}

/* pseudo-elementi decorativi */
.profilo-top::before,
.profilo-top::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.profilo-top::before {
  inset: -40%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 45%);
  animation: heroGlow 6s ease-in-out infinite;
}

.profilo-top::after {
  width: 220px;
  height: 200%;
  top: -50%;
  left: -30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  animation: shine 7s linear infinite;
}

/* =========================
   FAZIONE HERO (colonna destra del top)
   — occupa lo spazio rimanente
========================= */

.fazione-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 280px;
}

.fazione-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
  filter: blur(10px);
  animation: heroGlow 4s ease-in-out infinite;
  pointer-events: none;
}

.fazione-hero img {
  width: 300px;
  max-width: 100%;
  object-fit: contain;
  opacity: .96;
  position: relative;        /* sopra lo pseudo-::before */
  z-index: 1;
  animation: fadePop .7s ease, floatingHero 5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255,255,255,.18))
          drop-shadow(0 0 30px rgba(0,0,0,.75));
}

/* =========================
   HERO TOP-RIGHT INFO
   (GMZ Coins + Last Update + PIN)
   — relativo alla .fazione-hero
========================= */

.hero-top-info {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  z-index: 10;
}

.hero-coins,
.hero-update {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(0,0,0,0.25));
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  white-space: nowrap;
}

.hero-update small {
  display: block;
  opacity: .75;
  font-weight: 600;
}

.hero-top-info .sidebar-help-text {
  font-size: 10px;
  opacity: .6;
  color: #fff;
}

.hero-top-info button {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.05));
  backdrop-filter: blur(8px);
  transition: transform .2s, background .2s;
}

.hero-top-info button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
}

/* =========================
   CARD LICENSE (flip card)
========================= */

.card-container {
  perspective: 1400px;
  width: 420px;
  flex-shrink: 0;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 240px;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}

.card-container.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  backface-visibility: hidden;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  padding: 18px;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.faction-back-logo img {
  width: 180px;
  opacity: .30;
  animation: floatingHero 6s ease-in-out infinite;
}

/* =========================
   LICENSE — HEADER
========================= */

.license-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  opacity: .75;
  letter-spacing: 1px;
}

/* =========================
   LICENSE — BODY
========================= */

.license-body {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

.license-avatar {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  flex-shrink: 0;
}

.license-data {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.license-data div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 8px;
}

.license-data div:last-child {
  border-bottom: none;
}

.license-data .label {
  opacity: .65;
  white-space: nowrap;
}

.license-data b {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================
   LICENSE — STATS FOOTER
========================= */

.license-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  font-weight: 800;
}

/* =========================
   LICENSE BUTTON (edit)
========================= */

.edit-btn {
  position: absolute;
  right: 14px;
  bottom: 6px;
  padding: 7px 13px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  backdrop-filter: blur(10px);
  transition: transform .2s;
  z-index: 5;
}

.edit-btn:hover {
  transform: translateY(-2px);
}

/* =========================
   LICENSE BACK CONTENT
========================= */

.license-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
  z-index: 1;
}

.license-warning {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(0,0,0,.25));
  border: 1px solid rgba(255,255,255,.10);
  line-height: 1.5;
}

.license-warning small {
  display: block;
  font-weight: 600;
  opacity: .75;
  margin-top: 4px;
}

.license-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.license-links a {
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(0,0,0,.25));
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .25s, background .25s;
}

.license-links a:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(0,0,0,.20));
}

/* =========================
   CHARTS GRID
========================= */

.chart-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.chart-box {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.2));
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
}

/* =========================
   PREMIUM GRID (sezioni extra)
========================= */

.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}

/* =========================
   MINI BLOCK
========================= */

.mini-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.25));
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .25s;
}

.mini-block:hover {
  transform: translateX(4px) scale(1.01);
}

/* =========================
   TABELLA PREMIUM
========================= */

.tabella-premium {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2));
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  overflow-x: auto;
}

/* =========================
   PREMIUM CARD (usata in renderTabellaProfilo)
========================= */

.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.premium-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.22));
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: fadePop .4s ease;
}

.premium-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.premium-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.premium-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .2s;
}

.premium-row:last-child {
  border-bottom: none;
}

.premium-row:hover {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}

.premium-row span {
  opacity: .72;
  white-space: nowrap;
  margin-right: 8px;
}

.premium-row b {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
  color: #fff;
  font-weight: 800;
}
.link-modifica {
  color: #4da3ff;
  cursor: pointer;
  font-weight: 600;
  transition: 0.15s ease;
}

.link-modifica:hover {
  color: #82c3ff;
  text-decoration: underline;
}

.edit-hint {
  opacity: 0.6;
  font-size: 0.85em;
  margin-left: 4px;
  transition: 0.15s ease;
}

.link-modifica:hover .edit-hint {
  opacity: 1;
  transform: scale(1.15);
}
.profile-edit-info{
  margin-bottom:18px;
  padding:12px 16px;

  border-radius:14px;

  background:linear-gradient(
    135deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.03)
  );

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

  color:rgba(255,255,255,0.78);

  font-size:13px;
  font-weight:600;
  letter-spacing:.3px;

  backdrop-filter:blur(10px);

  text-align:center;
}

/* =========================
   BACK BTN
========================= */

.back-btn {
  align-self: flex-start;
  padding: 9px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.2));
  backdrop-filter: blur(10px);
  transition: transform .2s;
}

.back-btn:hover {
  transform: translateX(-3px);
}

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

@media (max-width: 900px) {
  .profilo-top {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
  }

  .card-container {
    width: 100%;
    max-width: 420px;
  }

  .fazione-hero {
    min-height: 200px;
  }

  .fazione-hero img {
    width: 200px;
  }

  .hero-top-info {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .chart-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .profilo-layout {
    padding: 12px;
    gap: 16px;
  }

  .license-stats {
    font-size: 10px;
    gap: 6px;
  }

  .profilo-top {
    border-radius: 20px;
    padding: 16px;
  }
}

/* ===== HEADER FISSO ===== */
.menu-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 204, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
}

/* ================= EVENTI / CAMPIONATI ================= */
#campionatiContainer {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 5px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

#campionatiContainer > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.campionato-card {
  min-width: 320px;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.campionato-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.campionato-info {
  padding: 15px;
}

.campionato-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.campionato-actions button {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: #ffcc00;
  cursor: pointer;
  font-weight: bold;
}

.gare-container {
  margin-top: 10px;
  background: #1a1a1a;
  padding: 10px;
  border-radius: 10px;
}

.gara-card {
  border-bottom: 1px solid #333;
  padding: 8px 0;
}

.gara-card:last-child {
  border-bottom: none;
}

.gara-img {
  width: 100%;
  margin-top: 5px;
  border-radius: 8px;
}

.evento-row {
  cursor: pointer;
  padding: 15px;
  transition: 0.2s;
}

.evento-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.evento-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.evento-left {
  flex: 2;
}

.evento-center {
  flex: 1;
  text-align: center;
}

.evento-right {
  flex: 1;
  text-align: right;
}

.evento-titolo {
  font-weight: bold;
  font-size: 16px;
}

.evento-data {
  font-size: 12px;
  opacity: 0.7;
}

.evento-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 5px 0;
}

.evento-expand {
  margin-top: 15px;
  animation: fadeIn 0.3s ease;
}

.evento-locandina {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.evento-img {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.evento-img:hover {
  transform: scale(1.05);
}

.campionato-info p {
  position: relative;
}

.campionato-info p::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, #111);
  pointer-events: none;
}

.live-btn {
  background: red;
  color: white;
  animation: pulse 1s infinite;
}


/* =========================
   EVENTI SPONSORIZZATI
========================= */

/* Container principale - scroll orizzontale come i campionati */
#sponsorizzatiContainer {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 5px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Le card sponsorizzate devono adattarsi come i campionati */
#sponsorizzatiContainer > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 300px; /* Larghezza fissa per le card, modificabile */
}

/* =========================
   EVENTI ESTERNI (PARTNER)
========================= */

/* Container principale - disposizione in colonna */
#eventiEsterniContainer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 10px 5px;
}

/* Ogni sezione partner */
#eventiEsterniContainer .partner-section {
  width: fit-content; /* 🔥 Invece di 100%, si adatta al contenuto */
  max-width: 100%; /* Ma non supera mai la larghezza del container */
}


/* =========================
   CARD SPONSOR
========================= */

.sponsor-card {
  min-width: 320px;
  background: linear-gradient(145deg, #141414, #0d0d0d);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.45);
}


/* =========================
   BADGE
========================= */

.sponsor-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: gold;
  color: #000;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  z-index: 5;
}


/* =========================
   IMMAGINE
========================= */

.sponsor-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}


/* =========================
   INFO
========================= */

.sponsor-info {
  padding: 15px;
}

.sponsor-info h2 {
  color: gold;
  margin-bottom: 8px;
  font-size: 20px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}


/* =========================
   PULSANTI
========================= */

.sponsor-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sponsor-actions button {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: gold;
  cursor: pointer;
  font-weight: bold;
  color: #000;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.sponsor-actions button:hover {
  background: #ffe680;
  transform: scale(1.02);
}

/* =========================
   SNL RESULTS PAGE
========================= */

.snl-results {
  margin-top: 20px;
  padding: 20px;
  background: rgba(20, 20, 20, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================
   PODIO
========================= */

.podium {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-end;
  margin: 20px 0;
  flex-wrap: wrap;
}

.podium-item {
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease;
}

.podium-item:hover {
  transform: translateY(-3px);
}

.podium-item span {
  display: block;
  font-size: 14px;
  opacity: 0.8;
}

.podium-item strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

/* oro / argento / bronzo */
.podium-item:nth-child(1) {
  border-color: #d4af37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.podium-item:nth-child(2) {
  border-color: #c0c0c0;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.2);
}

.podium-item:nth-child(3) {
  border-color: #cd7f32;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.2);
}

/* =========================
   BOTTONI
========================= */

.snl-results button {
  margin: 10px auto;
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #2b6cff;
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.snl-results button:hover {
  background: #1f4fcc;
}

/* =========================
   STORICO
========================= */

.snl-history {
  margin-top: 15px;
  padding: 10px;
  border-radius: 10px;

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

  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.snl-history.show {
  max-height: 500px;
  padding: 10px;
}

/* righe storico */
.snl-row {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.snl-row:last-child {
  border-bottom: none;
}

/* highlight primi 3 */
.snl-row:nth-child(1) {
  color: #d4af37;
  font-weight: 600;
}

.snl-row:nth-child(2) {
  color: #c0c0c0;
  font-weight: 600;
}

.snl-row:nth-child(3) {
  color: #cd7f32;
  font-weight: 600;
}

/* =========================
   HEADER COMPATIBILE
========================= */

.classifiche-page {
  color: #fff;
}

.classifiche-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.classifiche-header h1 {
  font-size: 22px;
  margin: 0;
}

.classifiche-header button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
}

.classifiche-header button:hover {
  background: rgba(255,255,255,0.2);
}
/* =========================
   TITOLI SEZIONI
========================= */

.titolo-sponsor {
  margin-top: 40px;
  margin-bottom: 10px;
  color: gold;
  font-size: 24px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .sponsor-card {
    min-width: 280px;
  }

  .sponsor-info h2 {
    font-size: 18px;
  }

}

/* ================= WIZARD / STEP ================= */
.step {
  display: none;
}

.step.active {
  display: block;
}

.anim-msg {
  animation: fadePop 0.4s ease;
}

.btn-danger {
  background: #ff3b3b;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-danger:hover {
  background: #e60000;
  transform: scale(1.05);
}

.btn-danger:active {
  transform: scale(0.95);
}

/* ==================================================
   TOAST PREMIUM MOBILE
================================================== */

#toast{
  position:fixed;
  left:50%;
  top:50%;

  transform:translate(-50%, -50%) scale(.85);

  width:auto;
  max-width:520px;

  padding:18px 26px;

  border-radius:22px;

  background:rgba(25,25,25,.96);
  color:#fff;

  font-size:17px;
  font-weight:800;
  line-height:1.45;
  text-align:center;

  box-shadow:
    0 25px 80px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.08);

  backdrop-filter:blur(14px);

  opacity:0;
  visibility:hidden;
  pointer-events:none;

  z-index:999999;

  transition: 
    opacity .28s ease,
    transform .28s cubic-bezier(.2,.9,.2,1),
    visibility .28s;

  border:1px solid rgba(255,255,255,.08);
}


/* ================= SHOW ================= */

#toast.show{
  opacity:1;
  visibility:visible;

  transform:
    translate(-50%, -50%)
    scale(1);
}


/* ================= SUCCESS ================= */

#toast.success{
  background:
    linear-gradient(135deg,#1fa34a,#157735);
}


/* ================= ERROR ================= */

#toast.error{
  background:
    linear-gradient(135deg,#e53935,#b71c1c);
}


/* ==================================================
   MOBILE ULTRA VISIBILITY
================================================== */

@media (max-width:768px){

  #toast{

    width:88vw;

    max-width:none;

    padding: 
      34px
      28px;

    border-radius:30px;

    font-size:24px;

    line-height:1.5;

    font-weight:900;

    top:50%;

    box-shadow: 
      0 30px 100px rgba(0,0,0,.75);

    border: 
      2px solid rgba(255,255,255,.10);

    backdrop-filter: 
      blur(18px);

  }

}


/* ==================================================
   SMALL DEVICES
================================================== */

@media (max-width:480px){

  #toast{

    width:92vw;

    font-size:22px;

    padding: 
      30px
      24px;

    border-radius:26px;

  }

}
/* ================= MODAL (seconda definizione, mantenuta) ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1e1e1e;
  color: white;
  padding: 20px;
  border-radius: 12px;
  width: min(400px, 90vw);
  margin: 0 auto;
  text-align: center;
  animation: pop 0.3s ease;
}

.modal-actions {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-actions button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#confirmYes {
  background: #28a745;
  color: white;
}

#confirmNo {
  background: #dc3545;
  color: white;
}

/* ================= CLASSIFICA ================= */

.classifica-page {
  padding: 20px;
}

/* ================= TABS ================= */

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  background: #111;
  color: #ccc;
  border: 1px solid #333;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.2s;
}

.tab:hover {
  border-color: #ffcc00;
  color: white;
}

.tab.active {
  background: #ffcc00;
  color: #000;
  font-weight: bold;
}

/* ================= LISTA ================= */

.classifica-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pilota-card {
  display: flex;
  align-items: left;
  justify-content: space-between;
  background: #111;
  border: 1px solid #222;
  padding: 12px;
  border-radius: 12px;
  transition: 0.25s;
  gap: 10px;
}

.pilota-card:hover {
  transform: translateY(-2px);
  border-color: #ffcc00;
  box-shadow: 0 0 18px rgba(255, 204, 0, 0.15);
}

.posizione {
  font-size: 20px;
  width: 40px;
  text-align: center;
  font-weight: bold;
}

.info {
  flex: 1;
  margin-left: 10px;
}

.nome {
  font-weight: bold;
  font-size: 14px;
}

.psn {
  font-size: 12px;
  color: #888;
}

.valore {
  font-size: 18px;
  font-weight: bold;
  color: #ffcc00;
}

/* ================= GRID CLASSIFICHE ================= */

.classifica-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* ================= BOX ================= */

.classifica-box {
  background: linear-gradient(
    180deg,
    rgba(20,20,20,0.98),
    rgba(10,10,10,0.98)
  );

  border-radius: 16px;
  padding: 18px;

  color: white;

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

  box-shadow: 
    0 8px 30px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.03);

  overflow: hidden;
}

/* ================= TITOLI ================= */

.classifica-box h2 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 18px;
  color: #ffcc00;
  letter-spacing: 0.5px;
}

/* ================= LEGHE ================= */

.lega-section {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}

.lega-title {
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.15);

  color: #ffcc00;

  padding: 10px 14px;
  border-radius: 10px;

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

  margin-bottom: 12px;

  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ================= TABLE ================= */

.classifica-table-wrapper {
  width: 100%;
}

.classifica-table-scroll {
  overflow-x: auto;
  border-radius: 12px;
}

.classifica-box table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  overflow: hidden;
}

/* HEADER */

.classifica-box th {
  background: rgba(255,255,255,0.06);

  color: #ffcc00;

  padding: 12px 10px;

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

  text-align: center;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;

  position: sticky;
  top: 0;
  z-index: 2;
}

/* CELLE */

.classifica-box td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  font-size: 13px;
}

/* RIGHE */

.classifica-box tbody tr {
  transition: 0.2s;
}

.classifica-box tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

/* ================= TOP 3 ================= */

.gold {
  background: 
    linear-gradient(
      90deg,
      rgba(212,175,55,0.35),
      rgba(184,134,11,0.25)
    );

  color: #fff;
  font-weight: bold;
}

.silver {
  background: 
    linear-gradient(
      90deg,
      rgba(192,192,192,0.25),
      rgba(169,169,169,0.18)
    );

  color: #fff;
  font-weight: bold;
}

.bronze {
  background: 
    linear-gradient(
      90deg,
      rgba(205,127,50,0.25),
      rgba(139,90,43,0.18)
    );

  color: #fff;
  font-weight: bold;
}

/* ================= PAGINATION ================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  margin-top: 16px;
}

.pagination button {
  width: 38px;
  height: 38px;

  border-radius: 10px;

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

  background: #1a1a1a;
  color: white;

  cursor: pointer;

  transition: 0.2s;
}

.pagination button:hover {
  background: #ffcc00;
  color: black;
  transform: scale(1.05);
}

.pagination span {
  font-size: 13px;
  color: #bbb;
  min-width: 110px;
  text-align: center;
}

/* ================= DESCRIZIONE ================= */

.desc-box {
  font-size: 13px;
  line-height: 1.5;
}

.desc-box h3 {
  color: #ffcc00;
  font-size: 14px;
  margin-bottom: 6px;
}

.desc-box ul {
  padding-left: 16px;
  margin: 6px 0;
}

.desc-box li {
  margin-bottom: 3px;
}

/* ================= BONUS ================= */

.bonus {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.bonus span {
  background: #1a1a1a;
  border: 1px solid #333;

  padding: 4px 7px;

  border-radius: 6px;

  font-size: 11px;
}

/* ================= EMPTY ================= */

.classifica-empty {
  background: #111;
  border: 1px solid #222;

  padding: 30px;

  border-radius: 16px;

  text-align: center;
  color: #888;
}

/* ================= SCROLLBAR ================= */

.classifica-table-scroll::-webkit-scrollbar {
  height: 8px;
}

.classifica-table-scroll::-webkit-scrollbar-track {
  background: #111;
}

.classifica-table-scroll::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 20px;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
.a{}
  .classifica-page {
    padding: 12px;
  }

  .classifica-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .classifica-box {
    padding: 14px;
  }

  .classifica-box table {
    min-width: 620px;
  }

  .classifica-box th,
  .classifica-box td {
    padding: 9px 8px;
    font-size: 12px;
  }

  .pagination {
    gap: 8px;
  }

  .pagination button {
    width: 34px;
    height: 34px;
  }

  .lega-title {
    width: 100%;
    justify-content: center;
  }

}

/* ADMIN MODAL */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.admin-modal.hidden {
  display: none;
}

.admin-modal-box {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-modal-box input {
  padding: 10px;
  border-radius: 6px;
  border: none;
}

.admin-modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* ===== TOUCH TARGET GLOBALI (miglioramento mobile) ===== */
@media (max-width: 768px) {
  .a{}
  
  button, .btn, .menu-item, .community-item, .tab, .pin-btn-action,
  .campionato-actions button, .btn-prenota, .btn-secondary, .btn-danger,
  .expand-btn, .remove-pin, .sidebar-help, #sidebarHandle {
    min-height: 44px;
  }
  input, select, textarea {
    font-size: 16px;
  }
}

/* =========================
   LOBBY WRAPPER (VERTICALE)
========================= */
.lobby-wrapper{
  display:flex;
  flex-direction: column;
  gap:30px;
}

/* =========================
   SEZIONE EVENTO
========================= */
.lobby-event-section{
  margin-bottom:30px;
}

.event-title{
  margin-bottom:10px;
  color:#fff;
}

/* =========================
   RIGA ORIZZONTALE DELLE LOBBY
========================= */
.lobby-event-row{
  display:flex;
  flex-direction: row;
  gap:20px;
  overflow-x:auto;
  padding-bottom:10px;
}

.lobby-column{
  display:flex;
  flex-direction:column;
  min-width:280px;
  gap:10px;
  flex:0 0 auto;
}

/* =========================
   LOBBY CARD
========================= */
.lobby-card{
  flex: 0 0 auto;
  min-width:280px;
  background:#111;
  border:1px solid #333;
  border-radius:10px;
  padding:10px;

  opacity:0;
  transform: translateY(12px);
  animation: cardEnter .4s ease forwards;
  will-change: transform, opacity;
}

.lobby-card{
  animation-delay: calc(var(--d, 0) * 0.12s);
}

@keyframes cardEnter{
  to{
    opacity:1;
    transform: translateY(0);
  }
}

/* =========================
   HEADER LOBBY
========================= */
.lobby-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.lobby-name{
  font-weight:bold;
  color:#fff;
  font-size:15px;
}

/* =========================
   ID LOBBY - NUOVA UX
========================= */

.lobby-id-section{
  margin-top:5px;
  margin-bottom:10px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.lobby-id-label{
  font-size:12px;
  color:#888;
  font-weight:bold;
}

.lobby-id-display{
  color:#0af;
  font-weight:bold;
  font-size:14px;
  padding:2px 0;
}

.lobby-id-controls{
  display:flex;
  align-items:center;
  gap:6px;
}

.lobby-id-input{
  background:#222;
  border:1px solid #444;
  color:#fff;
  padding:3px 6px;
  border-radius:4px;
  width:140px;
  font-size:12px;
}

.btn-edit, .btn-save{
  background:#333;
  border:1px solid #555;
  color:#fff;
  padding:3px 6px;
  border-radius:4px;
  cursor:pointer;
  font-size:12px;
}

.btn-edit:hover{
  background:#555;
}

.btn-save:hover{
  background:#0a84ff;
}


/* =========================
   TABELLINA SLOT
========================= */
.lobby-table{
  width:100%;
  border-collapse:collapse;
}

.lobby-table td{
  padding:4px;
  border-bottom:1px solid #222;
  font-size:13px;
}

.slot-num{
  width:25px;
  color:#888;
}

.slot-name.empty{
  color:#444;
}

.slot-name.filled{
  color:#fff;
}

/* =========================
   HOST BADGE
========================= */
.host-badge{
  margin-left:8px;
  font-size:10px;
  color:gold;
  text-shadow:0 0 6px rgba(255,215,0,0.6);
}

/* =========================
   GRID ROW ANIMATION
========================= */
.grid-row{
  opacity:0;
  transform: translateX(-18px);
  animation: gridEnter .35s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.045s);
}

@keyframes gridEnter{
  to{
    opacity:1;
    transform: translateX(0);
  }
}

/* =========================
   HOVER RACING EFFECT
========================= */
.lobby-card:hover{
  transform: translateY(-2px) scale(1.01);
  border-color:#555;
  transition: 0.2s ease;
}

/* =========================
   DISCORD FOOTER INTEGRATO
========================= */
.discord-banner-inside{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  margin-top:10px;
  padding:12px 14px;

  background:
    linear-gradient(
      90deg,
      rgba(88,101,242,.18),
      rgba(64,78,237,.08)
    );

  border:1px solid rgba(88,101,242,.35);

  border-radius:10px;

  text-decoration:none;

  transition:.2s ease;
}

.discord-banner-inside:hover{
  transform:translateY(-1px);

  border-color:#5865F2;

  background:
    linear-gradient(
      90deg,
      rgba(88,101,242,.28),
      rgba(64,78,237,.14)
    );
}

.discord-icon{
  font-size:16px;
}

.discord-text{
  flex:1;
  color:#dfe3ff;
  font-size:13px;
  font-weight:600;
}

.discord-arrow{
  color:#8ea1ff;
  font-size:14px;
}
/* =========================
   EMPTY LOBBY STATE
========================= */
.lobby-empty-state{

  max-width:700px;
  margin:40px auto;

  padding:40px 30px;

  background:
    linear-gradient(
      180deg,
      rgba(20,20,20,.95),
      rgba(10,10,10,.98)
    );

  border:1px solid #2b2b2b;
  border-radius:18px;

  text-align:center;

  box-shadow:
    0 0 30px rgba(0,0,0,.35);
}

.lobby-empty-icon{
  font-size:60px;
  margin-bottom:15px;
}

.lobby-empty-title{
  color:#fff;
  font-size:30px;
  margin-bottom:15px;
}

.lobby-empty-text{
  color:#aaa;
  font-size:16px;
  line-height:1.6;
  margin-bottom:30px;
}

.lobby-empty-actions{
  display:flex;
  flex-direction:column;
  gap:15px;
  align-items:center;
}

.lobby-empty-subtitle{
  color:#888;
  font-size:13px;
  margin-top:5px;
}

.lobby-empty-btn{

  width:100%;
  max-width:420px;

  padding:14px 18px;

  border-radius:12px;

  font-weight:bold;
  text-decoration:none;

  transition:.2s ease;

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

  gap:10px;
}

.lobby-empty-btn:hover{
  transform:translateY(-2px);
}

.lobby-empty-btn.discord{

  background:
    linear-gradient(
      90deg,
      #5865F2,
      #404EED
    );

  color:#fff;
}

.lobby-empty-btn.whatsapp{

  background:
    linear-gradient(
      90deg,
      #25D366,
      #1faa52
    );

  color:#fff;
}
/* =========================================================
   MOBILE FIX DEFINITIVO
   Da incollare alla fine del blocco CSS
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

#main {
  min-width: 0;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  #app {
    display: block;
    width: 100%;
    min-height: 100dvh;
  }

  #main {
    width: 100%;
    margin-left: 0;
    min-height: 100dvh;
    padding: 12px 10px calc(var(--gt7-sidebar-clearance, 200px) + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box;
  }

  body.sidebar-open #main {
    filter: blur(10px) brightness(.95);
    transform: scale(.99);
  }

  #intro {
    width: 100%;
    height: 100dvh;
    padding: 24px;
    text-align: center;
  }

  #logo,
  #intro-title {
    font-size: clamp(34px, 10vw, 52px);
  }

  #intro img {
    max-width: min(180px, 70vw);
  }

  /* Sidebar mobile */
  #sidebar {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    min-height: 76px;
    max-height: 76px;
    padding: 7px;
    border-radius: 22px;
    transform: none;
    overflow: hidden;
  }

  #sidebar.collapsed {
    min-height: 76px;
    max-height: 76px;
  }

  #sidebar.expanded {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    min-height: auto;
    max-height: none;
    height: auto;
    padding: 14px;
    border-radius: 26px;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
  }

  #sidebar.collapsed .sidebar-title {
    display: none;
  }

  .sidebar-scroll,
  #sidebar.collapsed .sidebar-scroll {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .sidebar-scroll::-webkit-scrollbar {
    display: none;
  }

  #sidebar.expanded .sidebar-scroll {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    align-content: flex-start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 2px 84px;
    scroll-snap-type: none;
  }

  .menu-item,
  .menu-item2 {
    width: 58px;
    min-width: 58px;
    height: 58px;
    border-radius: 17px;
    gap: 3px;
    padding: 5px;
    scroll-snap-align: start;
  }

  #sidebar.expanded .menu-item {
    width: 100%;
    min-width: 0;
    height: 92px;
    padding: 10px 7px;
    border-radius: 20px;
  }

  #sidebar.expanded .menu-item2 {
    display: none;
  }

  .menu-icon,
  .menu-icon2 {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 20px;
  }

  .menu-icon img,
  .menu-icon img.icon-logo,
  .menu-icon2 img {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
  }

  .menu-label {
    max-width: 100%;
    font-size: 7.5px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #sidebar.expanded .menu-label {
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #sidebar.expanded .sidebar-title {
    width: 100%;
    display: block;
    padding: 0 0 8px;
  }

  #sidebar.expanded .sidebar-title .menu-item {
    width: 100%;
    min-height: 72px;
    height: auto;
    padding: 10px 14px;
    flex-direction: row !important;
    justify-content: flex-start;
    gap: 12px;
  }

  #sidebar.expanded .sidebar-title .menu-icon,
  #sidebar.expanded .sidebar-title .icon-logo {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  #sidebar.expanded .sidebar-title h3 {
    font-size: clamp(16px, 5vw, 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #sidebarHandle {
    width: 34px;
    height: 64px;
    right: -6px;
    border-radius: 17px;
    font-size: 18px;
  }

  #sidebarHandle::before,
  #sidebar.expanded #sidebarHandle::before {
    left: -4px;
  }

  .btn-sidebar {
    min-height: 50px;
    font-size: 14px;
    border-radius: 16px;
  }

  .sidebar-help {
    padding: 14px;
    border-radius: 18px;
  }

  .sidebar-help-text {
    font-size: 13px;
    line-height: 1.45;
  }

  /* Home */
  .home-content {
    width: 100%;
    padding: 18px 0;
    gap: 20px;
  }

  .home-title {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1.1;
  }

  .home-subtitle {
    font-size: 15px;
    line-height: 1.5;
  }

  .home-box-obiettivi-container,
  .home-main-boxes {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .home-box-obiettivi,
  .home-box,
  .home-race-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .home-box {
    min-height: auto;
    padding: 18px;
    border-radius: 14px;
  }

  .race-card {
    height: auto;
    min-height: 0;
    padding: 64px 16px 18px;
    border-radius: 14px;
  }

  .home-race-navigation {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .home-race-counter {
    min-width: 42px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .home-race-arrow {
    width: 32px;
    height: 32px;
  }

  .race-label {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 120px);
    font-size: 11px;
    padding: 5px 9px;
  }

  .race-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .race-type {
    padding-right: 0;
  }

  .race-track {
    font-size: 22px;
    line-height: 1.2;
  }

  .race-info-grid {
    grid-template-columns: 1fr;
  }

  .race-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-outline,
  .btn-prenota {
    width: 100%;
    min-height: 44px;
  }

  .banner-slider {
    border-radius: 12px;
  }

  .banner-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .banner-prev,
  .banner-next {
    opacity: 1;
    pointer-events: auto;
    width: 34px;
    height: 34px;
  }

  /* Modal — centrati anche su mobile */
  .modal {
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .modal.show,
  .modal.open,
  .modal.is-open {
    display: flex;
  }

  .modal-content {
    width: 100%;
    max-width: min(440px, 94vw);
    margin: 0 auto;
    padding: 20px 16px 24px;
    border-radius: 16px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
    min-height: 44px;
  }

  /* Form adesione */
  .avatar-container,
  .community-row,
  .community-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .avatar-preview,
  .avatar-grid-wrapper {
    width: 100%;
  }

  #avatarGrid,
  #avatarGridModifica,
  .avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 7px;
  }

  #avatarGrid img,
  #avatarGridModifica img,
  .avatar-grid img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px;
    max-height: 48px;
  }

  .community-item {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
  }

  .adesione-progress {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .adesione-progress-line,
  .adesione-progress-fill {
    display: none;
  }

  .adesione-progress-step {
    font-size: 10px;
  }

  .adesione-nav {
    flex-direction: column;
  }

  .adesione-nav button {
    width: 100%;
  }

  /* Pilot card */
  .pilot-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 12px 0;
    justify-items: center;
  }

  .pilot-card {
    width: 100%;
    max-width: 380px;
    min-height: 420px;
  }

  .pilot-front,
  .pilot-back {
    padding: 16px 14px;
    border-radius: 22px;
  }

  .quick-stats,
  .expand-box .quick-stats,
  .retrotrofei {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-actions {
    gap: 8px;
  }

  .pilot-actions button {
    flex: 1 1 44px;
    min-height: 44px;
  }

  /* Confronto */
  .compare-container {
    gap: 16px;
    padding: 0;
    margin: 20px auto;
  }

  .compare-card {
    width: 100%;
    max-width: 420px;
    padding: 18px 16px;
    border-radius: 20px;
  }

  .compare-card h3 {
    font-size: 21px;
  }

  .compare-card div {
    font-size: 13px;
    align-items: flex-start;
  }

  /* Profilo */
  .profilo-layout {
    width: 100%;
    padding: 10px 0;
    gap: 16px;
  }

  .profilo-top {
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    border-radius: 20px;
  }

  .card-container {
    width: 100%;
    max-width: 420px;
  }

  .card-inner {
    height: auto;
    min-height: 260px;
  }

  .card-face {
    padding: 14px;
  }

  .license-body {
    gap: 12px;
  }

  .license-avatar {
    width: 68px;
    height: 68px;
  }

  .license-data div {
    font-size: 11px;
  }

  .license-stats {
    gap: 6px;
    font-size: 10px;
  }

  .fazione-hero {
    width: 100%;
    min-height: 170px;
  }

  .fazione-hero img {
    width: min(190px, 75vw);
  }

  .hero-top-info {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .chart-container,
  .premium-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .premium-card,
  .chart-box,
  .tabella-premium {
    border-radius: 16px;
  }

  .premium-row {
    gap: 10px;
  }

  .premium-row span,
  .premium-row b {
    max-width: 50%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Eventi */
  #campionatiContainer,
  #sponsorizzatiContainer,
  #eventiEsterniContainer {
    gap: 12px;
    padding: 8px 2px 24px;
  }

  .campionato-card,
  .sponsor-card {
    min-width: min(86vw, 320px);
  }

  .campionato-img,
  .sponsor-img {
    height: 150px;
  }

  .campionato-actions,
  .sponsor-actions {
    flex-direction: column;
  }

  .evento-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .evento-center,
  .evento-right {
    width: 100%;
    text-align: left;
  }

  .evento-img {
    max-width: 100%;
  }

  /* Toast */
  #toast {
    width: 90vw;
    max-width: none;
    padding: 24px 20px;
    border-radius: 24px;
    font-size: clamp(18px, 6vw, 23px);
  }

  /* Classifiche */
  .classifica-page {
    padding: 10px 0;
  }

  .classifiche-header {
    flex-direction: column;
    align-items: stretch;
  }

  .classifiche-header h1 {
    font-size: 21px;
  }

  .tabs {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .classifica-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .classifica-box {
    padding: 14px;
    border-radius: 14px;
    overflow: hidden;
  }

  .classifica-table-wrapper,
  .classifica-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .classifica-box table {
    min-width: 620px;
  }

  .classifica-box th,
  .classifica-box td {
    padding: 9px 8px;
    font-size: 12px;
  }

  .pilota-card {
    align-items: flex-start;
  }

  .info {
    min-width: 0;
    margin-left: 4px;
  }

  .nome,
  .psn {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pagination {
    gap: 8px;
  }

  .pagination button {
    width: 36px;
    height: 36px;
  }

  .pagination span {
    min-width: 88px;
  }

  .lega-title {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Lobby */
  .lobby-wrapper {
    gap: 20px;
  }

  .lobby-event-row {
    gap: 14px;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .lobby-column,
  .lobby-card {
    min-width: min(86vw, 320px);
    scroll-snap-align: start;
  }

  .lobby-header {
    gap: 8px;
    align-items: flex-start;
  }

  .lobby-id-controls {
    flex-wrap: wrap;
  }

  .lobby-id-input {
    width: 100%;
    min-height: 40px;
  }

  .discord-banner-inside {
    align-items: flex-start;
  }

  .lobby-empty-state {
    margin: 24px auto;
    padding: 28px 18px;
  }

  .lobby-empty-title {
    font-size: 24px;
  }

  .lobby-empty-text {
    font-size: 14px;
  }

  /* Touch */
  button,
  .btn,
  .tab,
  .menu-item,
  .menu-item2,
  .community-item,
  .pin-btn,
  .btn-sidebar,
  .btn-prenota,
  .btn-secondary,
  .btn-danger,
  .expand-btn,
  #sidebarHandle {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #main {
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: calc(var(--gt7-sidebar-clearance, 200px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* altezza gestita da css/sidebar.css (barra + coppa) — non forzare 70px */
  #sidebar {
    left: 50%;
    right: auto;
    /* bottom/size: sidebar.css */
  }

  .menu-item,
  .menu-item2 {
    width: 54px;
    min-width: 54px;
    height: 54px;
    border-radius: 15px;
  }

  .menu-icon,
  .menu-icon2 {
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 18px;
  }

  .menu-icon img,
  .menu-icon img.icon-logo,
  .menu-icon2 img {
    width: 31px;
    height: 31px;
  }

  .menu-label {
    font-size: 7px;
  }

  #sidebar.expanded .sidebar-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #sidebar.expanded .menu-item {
    height: 86px;
  }

  .race-card {
    padding: 68px 14px 16px;
  }

  .race-track {
    font-size: 20px;
  }

  .home-race-navigation {
    right: 8px;
  }

  .race-label {
    left: 10px;
    max-width: calc(100% - 116px);
  }

  .quick-stats,
  .expand-box .quick-stats,
  .retrotrofei {
    grid-template-columns: 1fr;
  }

  .compare-card div,
  .mini-block,
  .premium-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .premium-row span,
  .premium-row b {
    max-width: 100%;
    text-align: left;
  }

  .license-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .license-data {
    width: 100%;
  }

  .card-inner {
    min-height: 340px;
  }

  .classifica-box table {
    min-width: 560px;
  }

  .modal-content {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (hover: none) {
  .menu-item:hover,
  .menu-item2:hover,
  .home-box:hover,
  .home-box-obiettivi:hover,
  .race-locandina img:hover,
  .campionato-card:hover,
  .sponsor-card:hover,
  .compare-card:hover,
  .pilot-card:hover .pilot-front,
  .pilot-card:hover .pilot-back,
  .lobby-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   FIX MOBILE MIRATI
========================================================= */

@media (max-width: 768px) {
  #sidebar {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
  }

  #sidebar.open,
  #sidebar.expanded {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    min-height: auto;
    max-height: none;
    height: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 26px;
  }

  #sidebar.open .sidebar-title,
  #sidebar.expanded .sidebar-title {
    display: block;
    width: 100%;
    padding: 0 0 8px;
  }

  #sidebar.open .sidebar-scroll,
  #sidebar.expanded .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: flex-start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 2px 84px;
    scroll-snap-type: none;
  }

  #sidebar.open .menu-item,
  #sidebar.expanded .menu-item {
    width: 100%;
    min-width: 0;
    height: 88px;
    padding: 9px 6px;
    border-radius: 19px;
  }

  #sidebar.open .menu-item2,
  #sidebar.expanded .menu-item2 {
    display: none;
  }

  #sidebar.open .btn-sidebar,
  #sidebar.expanded .btn-sidebar,
  #sidebar.open .sidebar-help,
  #sidebar.expanded .sidebar-help {
    display: flex;
  }

  #sidebar.open .sidebar-title .menu-item,
  #sidebar.expanded .sidebar-title .menu-item {
    min-height: 70px;
    height: auto;
    flex-direction: row !important;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 14px;
  }

  .pilot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    padding: 10px 0;
    justify-items: stretch;
    align-items: stretch;
  }

  .pilot-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 360px;
  }

  .pilot-card-inner {
    min-height: 360px;
  }

  .pilot-front,
  .pilot-back {
    gap: 9px;
    padding: 12px 8px;
    border-radius: 18px;
  }

  .pin-corner {
    top: -6px;
    right: -6px;
    width: 44px;
    height: 44px;
  }

  .pin-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 16px;
  }

  .pilot-card .avatar {
    width: 58px;
    height: 58px;
  }

  .pilot-info strong {
    font-size: 13px;
    line-height: 1.15;
  }

  .pilot-info small {
    font-size: 10px;
    line-height: 1.2;
  }

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

  .pilot-actions button {
    min-width: 0;
    min-height: 34px;
    padding: 6px 3px;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .expand-btn {
    min-height: 36px;
    padding: 8px 5px;
    border-radius: 10px;
    font-size: 11px;
  }

  .quick-stats,
  .expand-box .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
  }

  .quick-stats span {
    min-height: 42px;
    padding: 4px 2px;
  }

  .qs-label {
    font-size: 8px;
  }

  .qs-value {
    font-size: 12px;
  }

  .retrotrofei {
    gap: 6px;
    padding: 8px 5px;
  }

  .retrotrofei span {
    min-height: 54px;
    padding: 7px 3px;
  }

  .trofei-label {
    font-size: 8px;
    letter-spacing: 0;
  }

  .trofei-value {
    font-size: 15px;
  }

  .trofei-value::before {
    display: block;
    margin: 0;
    font-size: 12px;
  }

  .campionato-actions,
  .sponsor-actions {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .campionato-actions button,
  .sponsor-actions button {
    flex: 1 1 calc(50% - 6px);
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.1;
    box-shadow: none;
  }

  .sponsor-actions button:hover,
  .campionato-actions button:hover {
    transform: none;
  }

  #toast {
    width: auto;
    max-width: 86vw;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.35;
  }

  .profilo-layout .premium-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .profilo-layout .tabella-premium {
    padding: 12px;
  }

  .profilo-layout .premium-header {
    padding: 10px;
    font-size: 10px;
    letter-spacing: .4px;
  }

  .profilo-layout .premium-body {
    padding: 8px;
  }

  .profilo-layout .premium-row {
    padding: 6px 2px;
    gap: 4px;
    font-size: 10px;
    align-items: flex-start;
  }

  .profilo-layout .premium-row span,
  .profilo-layout .premium-row b {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }
}

@media (max-width: 480px) {

  /* =========================
     SIDEBAR
  ========================= */

  #sidebar {
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
  }

  #sidebar.open,
  #sidebar.expanded {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  #sidebar.open .sidebar-scroll,
  #sidebar.expanded .sidebar-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* =========================
     PILOT GRID
  ========================= */

  .pilot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  /* =========================
     PILOT CARD (FLIP FIX MOBILE)
  ========================= */

  .pilot-card,
  .pilot-card-inner {
    min-height: 350px;
    height: 350px;
  }

.pilot-card,
.pilot-card-inner{
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}

  .pilot-front,
  .pilot-back {
    padding: 10px 6px;

    /* IMPORTANTISSIMO: solo sulle facce */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* =========================
     AVATAR
  ========================= */

  .pilot-card .avatar {
    width: 52px;
    height: 52px;
  }

  /* =========================
     BUTTONS
  ========================= */

  .pilot-actions button {
    min-height: 32px;
    padding: 5px 2px;
    font-size: 9px;
  }

  .campionato-actions button,
  .sponsor-actions button {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 11px;
  }

  /* =========================
     TOAST
  ========================= */

  #toast {
    max-width: 88vw;
    padding: 12px 14px;
    border-radius: 15px;
    font-size: 14px;
  }

  /* =========================
     PROFILO GRID
  ========================= */

  .profilo-layout .premium-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
}
/* =====================================================
   FILTRI EVENTI
===================================================== */

.filtri-eventi{

  display:flex;
  flex-wrap:wrap;
  gap:10px;

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

  width:100%;

  margin:18px 0 26px;
  padding:0 6px;
}

/* =====================================================
   BUTTONS
===================================================== */

.filtri-eventi button{

  position:relative;

  border:none;
  outline:none;

  cursor:pointer;

  padding:12px 18px;

  border-radius:14px;

  background:
    linear-gradient(
      145deg,
      #1c1c1c,
      #101010
    );

  color:#f5f5f5;

  font-size:0.95rem;
  font-weight:700;
  letter-spacing:.3px;

  white-space:nowrap;

  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    color .18s ease;

  box-shadow:
    0 4px 12px rgba(0,0,0,.35);

  overflow:hidden;
}

/* =====================================================
   HOVER
===================================================== */

.filtri-eventi button:hover{

  transform:translateY(-2px);

  background:
    linear-gradient(
      145deg,
      #ffcc00,
      #ff9f00
    );

  color:#000;

  box-shadow:
    0 8px 18px rgba(255,204,0,.35);
}

/* =====================================================
   ACTIVE CLICK
===================================================== */

.filtri-eventi button:active{

  transform:scale(.96);
}

/* =====================================================
   BOTTONE ATTIVO
   aggiungi class="active"
===================================================== */

.filtri-eventi button.active{

  background:
    linear-gradient(
      145deg,
      #ffcc00,
      #ff9f00
    );

  color:#000;

  box-shadow:
    0 8px 20px rgba(255,204,0,.45);
}

/* =====================================================
   MOBILE
===================================================== */

@media(max-width:768px){

  .filtri-eventi{

    flex-wrap:nowrap;

    overflow-x:auto;
    overflow-y:hidden;

    justify-content:flex-start;

    gap:8px;

    padding:0 12px 8px;

    margin:14px 0 20px;

    scroll-behavior:smooth;

    -webkit-overflow-scrolling:touch;

    scrollbar-width:none;
  }

  .filtri-eventi::-webkit-scrollbar{
    display:none;
  }

  .filtri-eventi button{

    flex:0 0 auto;

    min-width:max-content;

    padding:11px 16px;

    font-size:.88rem;

    border-radius:12px;
  }
}

/* =====================================================
   EXTRA SMALL DEVICES
===================================================== */

@media(max-width:480px){

  .filtri-eventi{

    gap:7px;

    padding-left:10px;
    padding-right:10px;
  }

  .filtri-eventi button{

    padding:10px 14px;

    font-size:.82rem;

    border-radius:11px;
  }
}


/* =========================================================
   MOBILE CARD VISIBILITY FIXES
========================================================= */

.pilot-card,
.pilot-card-inner,
.card-container,
.card-inner {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.pilot-front,
.pilot-back,
.card-face {
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-container.flipped .card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.card-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.trofei-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.trofei-value::before {
  content: "";
  display: inline-block;
  width: .72em;
  height: .72em;
  flex: 0 0 .72em;
  margin: 0 2px 0 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff5a8 0 18%, #ffd700 38%, #b77900 100%);
  box-shadow:
    0 0 8px rgba(255,215,0,.45),
    inset 0 1px 2px rgba(255,255,255,.45);
}

@media (max-width: 768px) {
  .pilot-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)) !important;
    gap: 12px;
    align-items: stretch;
  }

  .pilot-card,
  .pilot-card-inner {
    min-height: clamp(400px, 72vw, 460px);
    height: clamp(400px, 72vw, 460px);
  }

  .pilot-front,
  .pilot-back {
    align-items: stretch;
    gap: 8px;
    padding: 12px 10px;
    overflow: hidden;
  }

  .pilot-front > *,
  .pilot-back > * {
    position: relative;
    z-index: 2;
    min-width: 0;
  }

  .pilot-card .avatar,
  .pilot-info {
    align-self: center;
  }

  .pilot-info strong,
  .pilot-info small,
  .qs-label,
  .trofei-label {
    overflow-wrap: anywhere;
  }

  .quick-stats,
  .expand-box .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .quick-stats span {
    min-width: 0;
    min-height: 44px;
  }

  .retrotrofei {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    margin-top: 2px;
    overflow: hidden;
  }

  .retrotrofei span {
    min-width: 0;
    min-height: 58px;
    padding: 7px 4px;
  }

  .trofei-label {
    font-size: clamp(7px, 2.2vw, 9px);
    line-height: 1.12;
    letter-spacing: 0;
  }

  .trofei-value {
    font-size: clamp(13px, 3vw, 16px);
    line-height: 1.05;
  }

  .pilot-actions button,
  .expand-btn {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .card-container {
    width: min(100%, 420px);
  }

  .card-inner {
    height: clamp(270px, 62vw, 320px);
    min-height: 0;
  }

  .card-face {
    display: flex;
    flex-direction: column;
    padding: 14px;
    overflow: hidden;
  }

  .card-back {
    align-items: center;
    justify-content: center;
  }

  .faction-back-logo img {
    width: min(180px, 58vw);
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .pilot-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr)) !important;
    gap: 10px;
  }

  .pilot-card,
  .pilot-card-inner {
    min-height: clamp(410px, 118vw, 455px);
    height: clamp(410px, 118vw, 455px);
  }

  .pilot-front,
  .pilot-back {
    padding: 12px 8px;
  }

  .quick-stats,
  .expand-box .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .card-inner {
    height: clamp(315px, 86vw, 360px);
    min-height: 0;
  }

  .card-face {
    border-radius: 20px;
    padding: 12px;
  }
}

/* =========================================================
   MOBILE PILOT FLIP STABILITY
========================================================= */

@media (max-width: 768px) {
  .pilot-card {
    overflow: hidden;
    border-radius: 18px;
    contain: layout paint;
  }

  .pilot-card,
  .pilot-card-inner {
    height: clamp(420px, 76vw, 480px) !important;
    min-height: clamp(420px, 76vw, 480px) !important;
  }

  .pilot-card-inner,
  .pilot-card.flipped .pilot-card-inner {
    transform: none !important;
    -webkit-transform: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
  }

  .pilot-front,
  .pilot-back {
    position: absolute;
    inset: 0;
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    background:
      linear-gradient(
        145deg,
        rgba(32,32,32,.98),
        rgba(12,12,12,.98)
      );
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition:
      opacity .22s ease,
      visibility .22s ease;
  }

  .pilot-front {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
  }

  .pilot-back {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .pilot-card.flipped .pilot-front {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
  }

  .pilot-card.flipped .pilot-back {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 3;
  }

  .pilot-front::before,
  .pilot-front::after,
  .pilot-back::before,
  .pilot-back::after {
    border-radius: inherit;
  }

  .pilot-front > *,
  .pilot-back > * {
    max-width: 100%;
    flex-shrink: 0;
  }

  .pilot-card.expand-open .pilot-actions,
  .pilot-card.expand-open .expand-btn,
  .pilot-card.expand-open .expand-box {
    transform: none !important;
  }

  .pilot-card.expand-open .pilot-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .retrotrofei span:hover {
    transform: none;
  }

  .card-container {
    overflow: hidden;
    border-radius: 20px;
    contain: layout paint;
  }

  .card-inner,
  .card-container.flipped .card-inner {
    transform: none !important;
    -webkit-transform: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
  }

  .card-face {
    position: absolute;
    inset: 0;
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    background:
      linear-gradient(
        135deg,
        rgba(28,28,28,.98),
        rgba(10,10,10,.98)
      );
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition:
      opacity .22s ease,
      visibility .22s ease;
  }

  .card-face:not(.card-back) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
  }

  .card-container.flipped .card-face:not(.card-back) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
  }

  .card-container.flipped .card-back {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 3;
  }
}

@media (max-width: 480px) {
  .pilot-card,
  .pilot-card-inner {
    height: clamp(430px, 122vw, 500px) !important;
    min-height: clamp(430px, 122vw, 500px) !important;
  }
}

.team-pilots-box {
  background: #111;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  line-height: 1.6;
}

.pilota {
  font-size: 15px;
  padding: 3px 0;
}

.capo-team {
  font-weight: 700;
  color: #4cc9f0;
}

.tag-capo {
  background: #4cc9f0;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 6px;
  font-weight: 700;
}

.auto-fixed {
  background: #111;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  font-size: 15px;
  font-weight: 600;
}

/* =========================================================
   GT7 GAMING ZONE - PREMIUM WIZARD
========================================================= */

.wizard-container{

  position:relative;

  margin-top:25px;
  padding:35px;

  border-radius:24px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.05),
      rgba(255,255,255,.02)
    );

  border:1px solid rgba(255,255,255,.08);

  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);

  box-shadow:
    0 25px 60px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.08);

  overflow:hidden;
}

.wizard-container::before{

  content:"";

  position:absolute;
  inset:0;

  background:
    radial-gradient(
      circle at top right,
      rgba(255,204,0,.08),
      transparent 45%
    );

  pointer-events:none;
}

/* =========================================================
   TITOLI
========================================================= */

.wizard-container h1,
.wizard-container h2,
.wizard-container h3{

  color:#fff;
  font-weight:700;
  letter-spacing:.5px;
}

.wizard-container h2{

  margin-bottom:20px;

  font-size:26px;

  text-align:center;
}

/* =========================================================
   PROGRESS BAR
========================================================= */

.wizard-progress{

  position:relative;

  height:10px;

  margin-bottom:50px;

  border-radius:50px;

  background:
    rgba(255,255,255,.05);

  overflow:visible;
}

.wizard-progress-fill{

  height:100%;

  border-radius:50px;

  background:
    linear-gradient(
      90deg,
      #ffcc00,
      #ffe566
    );

  box-shadow:
    0 0 20px rgba(255,204,0,.8);

  transition:
    width .4s ease;
}

/* =========================================================
   STEP CIRCLE
========================================================= */

.wizard-step{

  position:absolute;

  top:-18px;

  width:42px;
  height:42px;

  border-radius:50%;

  background:#151515;

  border:2px solid rgba(255,255,255,.15);

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

  color:#aaa;

  font-weight:700;

  transition:.35s;
}

.wizard-step.active{

  background:
    linear-gradient(
      180deg,
      #ffcc00,
      #ffb700
    );

  color:#000;

  border-color:#ffcc00;

  box-shadow:
    0 0 25px rgba(255,204,0,.8);

  transform:scale(1.12);
}

#stepDot0{left:0;}
#stepDot1{left:33%;}
#stepDot2{left:66%;}
#stepDot3{right:0;}

/* =========================================================
   STEP BOX
========================================================= */

.wizard-step-box{

  animation:
    wizardFade .35s ease;
}

@keyframes wizardFade{

  from{
    opacity:0;
    transform:translateY(12px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* =========================================================
   CARD SELEZIONE
========================================================= */

.wizard-choice-container{

  display:flex;
  gap:25px;
  flex-wrap:wrap;
  justify-content:center;
}

.wizard-choice{

  width:320px;

  padding:28px;

  border-radius:20px;

  background:
    linear-gradient(
      180deg,
      #1c1c1c,
      #101010
    );

  border:
    1px solid rgba(255,255,255,.08);

  color:#fff;

  cursor:pointer;

  transition:.3s;

  text-align:center;

  box-shadow:
    0 10px 30px rgba(0,0,0,.4);
}

.wizard-choice:hover{

  transform:
    translateY(-5px);

  border-color:#ffcc00;

  box-shadow:
    0 0 25px rgba(255,204,0,.25),
    0 15px 40px rgba(0,0,0,.55);
}

.wizard-choice-desc{

  margin-top:15px;

  color:#aaa;

  font-size:14px;

  line-height:1.6;
}

/* =========================================================
   SELECT
========================================================= */

.wizard-container select{

  width:100%;

  padding:14px 16px;

  border-radius:12px;

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

  background:#141414;

  color:#fff;

  font-size:15px;

  transition:.25s;
}

.wizard-container select:focus{

  outline:none;

  border-color:#ffcc00;

  box-shadow:
    0 0 15px rgba(255,204,0,.25);
}

/* =========================================================
   INPUT
========================================================= */

.wizard-container input{

  width:100%;

  padding:14px 16px;

  border-radius:12px;

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

  background:#141414;

  color:#fff;

  font-size:15px;
}

.wizard-container input:focus{

  outline:none;

  border-color:#ffcc00;

  box-shadow:
    0 0 15px rgba(255,204,0,.25);
}

/* =========================================================
   BUTTONS
========================================================= */

.wizard-nav{

  display:flex;
  justify-content:space-between;

  margin-top:30px;
}

.wizard-next,
.wizard-prev,
#btnInviaAdesEventi{

  min-width:180px;

  padding:14px 24px;

  border:none;

  border-radius:14px;

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

  cursor:pointer;

  transition:.25s;
}

.wizard-next,
#btnInviaAdesEventi{

  background:
    linear-gradient(
      90deg,
      #ffcc00,
      #ffd84d
    );

  color:#000;

  box-shadow:
    0 0 20px rgba(255,204,0,.35);
}

.wizard-next:hover,
#btnInviaAdesEventi:hover{

  transform:translateY(-2px);

  box-shadow:
    0 0 28px rgba(255,204,0,.55);
}

.wizard-prev{

  background:
    rgba(255,255,255,.08);

  color:#fff;

  border:
    1px solid rgba(255,255,255,.12);
}

.wizard-prev:hover{

  background:
    rgba(255,255,255,.15);
}

/* =========================================================
   INFO BOX
========================================================= */

.wizard-info{

  margin-top:15px;

  padding:15px;

  border-radius:12px;

  background:
    rgba(255,255,255,.04);

  border:
    1px solid rgba(255,255,255,.08);

  color:#ddd;
}

/* =========================================================
   TEAM BOX
========================================================= */

.team-pilots-box{

  margin-top:12px;

  padding:18px;

  border-radius:14px;

  background:
    rgba(255,255,255,.04);

  border:
    1px solid rgba(255,255,255,.08);
}

.pilota{

  padding:8px 0;

  color:#ddd;
}

.capo-team{

  color:#ffcc00;

  font-weight:700;
}

.tag-capo{

  background:#ffcc00;

  color:#000;

  padding:2px 8px;

  border-radius:20px;

  margin-left:8px;

  font-size:11px;
}

/* =========================================================
   AUTO FIXED
========================================================= */

.auto-fixed{

  padding:14px;

  border-radius:12px;

  background:
    linear-gradient(
      180deg,
      rgba(255,204,0,.08),
      rgba(255,204,0,.03)
    );

  border:
    1px solid rgba(255,204,0,.25);

  color:#ffdc5a;

  font-weight:600;
}

/* =========================================================
EVENTI MINI WIZARD - PREMIUM GLASS
========================================================= */

.wizard-container{

margin:20px 0 35px;

padding:28px;

border-radius:22px;

background:
linear-gradient(
180deg,
rgba(255,255,255,.06),
rgba(255,255,255,.03)
);

border:1px solid rgba(255,255,255,.08);

backdrop-filter:blur(18px);

box-shadow:
0 12px 35px rgba(0,0,0,.35),
inset 0 1px 0 rgba(255,255,255,.08);

}

.wizard-container h2{

margin:0 0 25px;

text-align:center;

font-size:1.8rem;

font-weight:800;

letter-spacing:.5px;

color:#fff;

}

/* =========================================================
GRID
========================================================= */

.wizard-menu{

display:grid;

grid-template-columns:
repeat(2,minmax(0,1fr));

gap:18px;

max-width:1000px;

margin:auto;

}

/* =========================================================
BUTTON CARD
========================================================= */

.wizard-btn{

position:relative;

display:flex;

flex-direction:column;

justify-content:center;

align-items:center;

text-align:center;

gap:6px;

min-height:145px;

padding:24px;

border:none;

border-radius:18px;

cursor:pointer;

color:#fff;

background:
linear-gradient(
145deg,
rgba(255,255,255,.08),
rgba(255,255,255,.03)
);

border:1px solid rgba(255,255,255,.08);

transition:
transform .25s ease,
box-shadow .25s ease,
border-color .25s ease;

overflow:hidden;

}

.wizard-btn:hover{

transform:translateY(-4px);

border-color:
rgba(255,255,255,.18);

box-shadow:
0 10px 30px rgba(0,0,0,.35);

}

.wizard-btn:active{

transform:translateY(-1px);

}

/* =========================================================
TOP ACCENT
========================================================= */

.wizard-btn::before{

content:"";

position:absolute;

top:0;
left:0;
right:0;

height:3px;

border-radius:18px 18px 0 0;

background:
linear-gradient(
90deg,
#00e0ff,
#00ff9d
);

opacity:.85;

}

/* =========================================================
TITLE
========================================================= */

.wizard-btn strong{

display:block;

font-size:1.15rem;

font-weight:800;

line-height:1.3;

color:#fff;

}

/* =========================================================
SECONDARY LABEL
========================================================= */

.wizard-btn small{

display:block;

font-size:.72rem;

font-weight:700;

text-transform:uppercase;

letter-spacing:.8px;

color:
rgba(255,255,255,.55);

}

/* =========================================================
DESCRIPTION
========================================================= */

.wizard-btn span{

display:block;

max-width:90%;

font-size:.90rem;

font-weight:500;

line-height:1.5;

color:
rgba(255,255,255,.72);

}

/* =========================================================
BACK BUTTON
========================================================= */

.wizard-back{

margin-top:20px;

width:100%;

padding:14px;

border:none;

border-radius:14px;

cursor:pointer;

color:#fff;

font-weight:700;

background:
rgba(255,255,255,.06);

border:1px solid rgba(255,255,255,.08);

transition:.25s;

}

.wizard-back:hover{

background:
rgba(255,255,255,.10);

}

/* =========================================================
INFO BAR
========================================================= */

#wizardInfo{

margin-top:18px;

padding:14px 18px;

border-radius:14px;

background:
rgba(255,255,255,.04);

border:1px solid rgba(255,255,255,.06);

color:
rgba(255,255,255,.82);

text-align:center;

line-height:1.5;

}

/* =========================================================
MOBILE
========================================================= */

@media (max-width:768px){

.wizard-container{
padding:20px;
}

.wizard-container h2{
font-size:1.5rem;
}

.wizard-menu{
grid-template-columns:1fr;
}

.wizard-btn{
min-height:120px;
padding:20px;
}

.wizard-btn strong{
font-size:1.05rem;
}

.wizard-btn small{
font-size:.68rem;
}

.wizard-btn span{
font-size:.84rem;
}

}

/* =========================================================
   MODAL IMPOSTAZIONI EVENTO
========================================================= */
.modal-overlay{

  position:fixed;
  inset:0;

  z-index:99999;

  display:flex;

  justify-content:center;

  align-items:center;

  overflow-y:auto;

  padding:
    max(12px, env(safe-area-inset-top))
    12px
    max(12px, env(safe-area-inset-bottom));

  background:rgba(0,0,0,.75);

  backdrop-filter:blur(8px);

  animation:modalFade .25s ease;

}
/* =========================================================
   BOX
========================================================= */

.modal-box {
  position: relative;
  width: min(980px, 100%);
  margin: auto;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  overflow-y: auto;
  overflow-x: auto;        /* aggiunto */
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.10);
}

/* =========================================================
   HEADER
========================================================= */

.modal-box h2{

  margin:0 0 18px;

  padding-right:50px;

  text-align:center;

  color:#fff;

  font-size:clamp(
    1.3rem,
    4vw,
    1.9rem
  );

  font-weight:800;

}

/* =========================================================
   ALERT
========================================================= */

.modal-alert{

  margin-bottom:20px;

  padding:14px 18px;

  border-radius:14px;

  background:
    rgba(255,255,255,.05);

  border:1px solid rgba(255,255,255,.08);

  color:
    rgba(255,255,255,.85);

  text-align:center;

  font-size:.95rem;

  line-height:1.5;

}

/* =========================================================
   CONTENUTO
========================================================= */

/* Il contenitore del contenuto deve occupare tutto lo spazio disponibile */
.modal-contents {
  width: 100%;
  box-sizing: border-box;
  padding: 0 !important;
  overflow-x: auto;
  color: #fff;
  line-height: 1.7;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.modal-contents pre {
  margin: 0;
  padding: 14px 18px;       /* allineato con .modal-alert */
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Menlo', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
  tab-size: 2;
}

/* Se il contenuto è HTML (es. tabella), assicuriamoci che occupi tutto */
.modal-contents table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
}

/* Aggiungi scroll orizzontale per tabelle troppo larghe */
.modal-contents .table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.modal-contents th,
.modal-contents td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.modal-contents th {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.modal-contents tr:last-child td {
  border-bottom: none;
}

.modal-contents td {
  color: rgba(255, 255, 255, 0.85);
}

/* Per liste e paragrafi all'interno del contenuto */
.modal-contents ul,
.modal-contents ol {
  padding-left: 24px;
  margin: 8px 0;
}

.modal-contents li {
  margin-bottom: 6px;
}

.modal-contents p {
  margin-bottom: 12px;
}

/* =========================================================
   CLOSE BUTTON
========================================================= */

.modal-close{

  position:absolute;

  top:15px;

  right:15px;

  width:42px;

  height:42px;

  border:none;

  border-radius:50%;

  cursor:pointer;

  font-size:1rem;

  font-weight:700;

  color:#fff;

  background:
    rgba(255,255,255,.08);

  border:1px solid rgba(255,255,255,.10);

  transition:.25s;

}

.modal-close:hover{

  transform:scale(1.08);

  background:
    rgba(255,255,255,.15);

}

/* =========================================================
   SCROLLBAR
========================================================= */

.modal-box::-webkit-scrollbar{

  width:8px;

}

.modal-box::-webkit-scrollbar-thumb{

  border-radius:10px;

  background:
    rgba(255,255,255,.20);

}

/* =========================================================
   ANIMATION
========================================================= */

@keyframes modalFade{

  from{

    opacity:0;

    transform:scale(.96);

  }

  to{

    opacity:1;

    transform:scale(1);

  }

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  .modal-overlay {
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
  }

  .modal-box {
    width: 100%;
    max-width: min(960px, 96vw);
    border-radius: 18px;
    padding: 16px 14px;
    max-height: min(88dvh, calc(100dvh - 24px));
    overflow-y: auto;
    overflow-x: auto;
    margin: auto;
  }

  /* Titolo più compatto */
  .modal-box h2 {
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    margin-bottom: 12px;
    padding-right: 40px;            /* spazio per il pulsante close */
  }

  /* Alert più compatto e allineato */
  .modal-alert {
    padding: 12px 14px;             /* stesso padding del contenuto */
    font-size: 0.8rem;
    border-radius: 12px;
    margin-bottom: 14px;
    text-align: center;
    line-height: 1.4;
  }

  /* Contenuto: occupa tutta la larghezza */
  .modal-contents {
    width: 100%;
    padding: 0;
    font-size: 0.85rem;
    overflow-x: visible;            /* scroll gestito dal box */
  }

  /* Il <pre> si allarga a tutto lo spazio */
  .modal-contents pre {
    padding: 12px 14px;             /* stesso padding di .modal-alert */
    font-size: 0.8rem;
    line-height: 1.6;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;            /* scroll gestito dal box */
    white-space: pre;               /* mantiene spazi/tabulazioni – NON va a capo */
    tab-size: 2;
    margin: 0;
    border-width: 1px;
  }

  /* Tabelle su mobile: scroll orizzontale */
  .modal-contents table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;            /* evita che le celle vadano a capo */
    border-radius: 10px;
    margin: 6px 0;
  }

  .modal-contents th,
  .modal-contents td {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  /* Lista e paragrafi su mobile */
  .modal-content ul,
  .modal-contents ol {
    padding-left: 18px;
    margin: 6px 0;
  }

  .modal-contents li {
    margin-bottom: 4px;
    font-size: 0.82rem;
  }

  .modal-contents p {
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  /* Pulsante di chiusura più piccolo e touch-friendly */
  .modal-close {
    width: 36px;
    height: 36px;
    top: 12px;
    right: 12px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .modal-close:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
  }

  /* Scrollbar personalizzata su mobile (opzionale) */
  .modal-box::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  .modal-box::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.20);
  }

  .modal-box::-webkit-scrollbar-track {
    background: transparent;
  }

}

.hidden-soft {
  opacity: 0;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none;
  transition: opacity .25s ease, max-height .25s ease;
}
/* =========================================================
   FIX FLIP CARD MOBILE – ALTEZZA CORRETTA
   ========================================================= */
@media (max-width: 768px) {

  /* Il contenitore principale può adattarsi */
  .pilot-card {
    position: relative;
    height: auto !important;
    min-height: 380px !important; /* puoi scendere a 350 se vuoi più compatta */
  }

  /* Il wrapper del flip non deve forzare altezza */
  .pilot-card-inner {
    height: 100% !important;
    min-height: 100% !important;
  }

  /* Le due facce devono essere sovrapposte e identiche */
  .pilot-front,
  .pilot-back {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: visible !important;
  }
}

.avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffcc00;
}
.wizard-quick-actions{

  display:flex;
  gap:12px;

  justify-content:center;

  flex-wrap:wrap;

  margin:20px 0 30px;
}

/* =========================================================
   ISCRIZIONE EVENTI EXTRA
   ========================================================= */


.wizard-info-btn{

  min-width:220px;

  padding:14px;

  border-radius:12px;

  font-weight:700;

  background:#1a1a1a;

  border:1px solid #ffcc00;

  color:#ffcc00;

  cursor:pointer;

  transition:.25s;
}

.wizard-info-btn:hover{

  background:#ffcc00;
  color:#000;

  transform:translateY(-2px);
}

.calendario-evento-modal{

  width:min(980px,100%);

  margin:auto;

  padding:28px;

  border-radius:24px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.04)
    );

  border:1px solid rgba(255,255,255,.10);

  backdrop-filter:blur(20px);

  box-shadow:
    0 20px 60px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.10);
}
/* ==========================================
   CARD EVENTO
========================================== */

.calendario-evento-card{

  position:relative;

  padding:18px;

  margin-bottom:14px;

  border-radius:18px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.04)
    );

  border:1px solid rgba(255,255,255,.08);

  backdrop-filter:blur(10px);

  box-shadow:
    0 8px 24px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.08);

  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;

}

.calendario-evento-card:hover{

  transform:translateY(-2px);

  border-color:
    rgba(255,204,0,.35);

  box-shadow:
    0 12px 30px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,204,0,.15);

}

/* ==========================================
   DATA
========================================== */

.calendario-evento-card .data{

  display:inline-flex;

  align-items:center;

  gap:6px;

  margin-bottom:10px;

  padding:6px 12px;

  border-radius:999px;

  font-size:.85rem;

  font-weight:700;

  color:#ffcc00;

  background:
    rgba(255,204,0,.10);

  border:
    1px solid rgba(255,204,0,.20);

}

/* ==========================================
   TITOLO
========================================== */

.calendario-evento-card .titolo{

  margin-bottom:12px;

  color:#fff;

  font-size:clamp(
    1rem,
    2vw,
    1.2rem
  );

  font-weight:800;

  line-height:1.3;

}

/* ==========================================
   CIRCUITO
========================================== */

.calendario-evento-card .info-principale{

  margin-bottom:14px;

  color:
    rgba(255,255,255,.9);

  font-weight:600;

}

/* ==========================================
   DETTAGLI
========================================== */

.calendario-evento-card .evento-dettagli{

  display:grid;

  gap:8px;

  margin-bottom:14px;

}

.calendario-evento-card .evento-dettagli div{

  padding:10px 12px;

  border-radius:12px;

  background:
    rgba(255,255,255,.04);

  border:
    1px solid rgba(255,255,255,.05);

  color:
    rgba(255,255,255,.9);

}

/* ==========================================
   EXTRA
========================================== */

.calendario-evento-card .evento-extra{

  display:flex;

  flex-wrap:wrap;

  gap:10px;

  margin-bottom:14px;

}

.calendario-evento-card .evento-extra span{

  padding:8px 12px;

  border-radius:999px;

  background:
    rgba(255,255,255,.05);

  border:
    1px solid rgba(255,255,255,.06);

  color:
    rgba(255,255,255,.85);

  font-size:.9rem;

  font-weight:600;

}

/* ==========================================
   INFO
========================================== */

.calendario-evento-card .evento-info{

  margin-top:10px;

  padding:14px;

  border-radius:14px;

  background:
    rgba(255,255,255,.05);

  border:
    1px solid rgba(255,255,255,.08);

  color:
    rgba(255,255,255,.85);

  line-height:1.6;

}

/* ==========================================
   ACTIONS
========================================== */

.calendario-evento-card .evento-actions{

  display:flex;

  flex-wrap:wrap;

  gap:10px;

  margin-top:16px;

}

.calendario-evento-card .evento-actions button{

  flex:1;

  min-width:180px;

  padding:12px 14px;

  border:none;

  border-radius:12px;

  cursor:pointer;

  font-weight:700;

  color:#fff;

  background:
    rgba(255,255,255,.08);

  border:
    1px solid rgba(255,255,255,.10);

  transition:.25s;

}

.calendario-evento-card .evento-actions button:hover{

  transform:translateY(-2px);

  background:
    rgba(255,204,0,.15);

  border-color:
    rgba(255,204,0,.35);

}

/* ==========================================
   MOBILE
========================================== */

@media(max-width:768px){

  .calendario-evento-card{

    padding:15px;

  }

  .calendario-evento-card .evento-actions{

    flex-direction:column;

  }

  .calendario-evento-card .evento-actions button{

    width:100%;

  }

}

/* =====================================================
   LOBBY SLOT PLAYER (NUOVA STRUTTURA)
===================================================== */

.slot-player {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* PSN + HOST */
.slot-psn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

/* HOST BADGE */
.host-badge {
  background: #ffcc00;
  color: #000;
  font-size: 10px;
  font-weight: 800;

  padding: 2px 8px;
  border-radius: 999px;

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

  white-space: nowrap;
}

/* =====================================================
   SUB INFO (AUTO + TEAM)
===================================================== */

.slot-subtitle {
  display: flex;
  flex-direction: column;
  gap: 2px;

  margin-top: 2px;
  font-size: 12px;

  opacity: 0.9;
}

/* AUTO */
.slot-auto {
  display: flex;
  align-items: center;
  gap: 6px;

  color: #cfcfcf;
  font-weight: 500;
}

/* TEAM */
.slot-team {
  display: flex;
  align-items: center;
  gap: 6px;

  color: #ffcc00;
  font-weight: 600;
}

/* =====================================================
   SLOT CELL STYLING
===================================================== */

.slot-name {
  padding: 8px 6px;
  border-radius: 6px;

  transition: all 0.2s ease;
}

.slot-name.filled {
  background: rgba(255, 255, 255, 0.04);
}

.slot-name.empty {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* =====================================================
   TABLE LOOK MIGLIORATO
===================================================== */

.lobby-table {
  width: 100%;
  border-collapse: collapse;
}

.grid-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.grid-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.slot-num {
  width: 40px;
  text-align: center;

  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

/* =====================================================
   MOBILE OPTIMIZATION
===================================================== */

@media (max-width: 768px) {

  .slot-psn {
    font-size: 13px;
  }

  .slot-auto,
  .slot-team {
    font-size: 11px;
  }

  .host-badge {
    font-size: 9px;
    padding: 2px 6px;
  }
}

/*=====================================================
SELETTORI MOBILE
=====================================================*/

.mobileLobbySelector{
    display:none;
}

@media (max-width:900px){

.mobileLobbySelector{

    display:flex;
    gap:10px;
    margin:0 0 18px;

}

.mobileLobbySelector select{

    flex:1;

    background:#1d1d1d;

    color:#fff;

    border:1px solid rgba(255,255,255,.15);

    border-radius:10px;

    padding:12px;

    font-size:14px;

}

.lobby-wrapper{

    display:block;

}

.lobby-event-row{

    display:block;

}

.lobby-column{

    width:100%;

    max-width:100%;

    margin:0;

}

}
@media (max-width: 768px) {

  .classifica-box {
    padding: 12px;
  }

  /* ❗ NON trasformiamo in card */
  .classifica-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .classifica-box table {
    width: 100%;
    min-width: 520px; /* 👈 fondamentale per non distruggere layout */
    border-collapse: collapse;
  }

  .classifica-box th {
    font-size: 11px;
    padding: 8px;
    white-space: nowrap;
  }

  .classifica-box td {
    font-size: 12px;
    padding: 8px;
    white-space: nowrap;
  }

  .classifica-nome {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .classifica-sub {
    font-size: 10px;
    color: #aaa;
  }
/* ==========================================
   EVENTI PARTNER
========================================== */

.partner-section {
  margin-bottom: 35px;
}

/* ==========================================
   HEADER COMMUNITY
========================================== */

.partner-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  padding: 0 5px;
}

.partner-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.partner-count {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================
   SLIDER EVENTI
========================================== */

.partner-events {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.partner-events > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.partner-events::-webkit-scrollbar {
  height: 8px;
}

.partner-events::-webkit-scrollbar-track {
  background: rgba(255,255,255,.05);
  border-radius: 20px;
}

.partner-events::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15);
  border-radius: 20px;
}

.partner-events::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.25);
}

/* ==========================================
   CARD EVENTO
========================================== */

.partner-event-card {
  flex: 0 0 320px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.04)
    );

  border: 1px solid rgba(255,255,255,.08);

  border-radius: 22px;

  overflow: hidden;

  backdrop-filter: blur(15px);

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

.partner-event-card:hover {
  transform: translateY(-5px);

  border-color:
    rgba(255,255,255,.20);

  box-shadow:
    0 15px 35px rgba(0,0,0,.35);
}

/* ==========================================
   IMMAGINE
========================================== */

.partner-event-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

/* ==========================================
   CONTENUTO
========================================== */

.partner-event-info {
  padding: 20px;
}

.partner-event-info h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.partner-event-info p {
  margin: 0;
  color: rgba(255,255,255,.75);
  line-height: 1.5;
  font-size: 14px;
}

/* ==========================================
   BOTTONE
========================================== */

.partner-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px;

  border: none;
  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      #0078ff,
      #00b4ff
    );

  color: #fff;
  font-weight: 700;
  font-size: 14px;

  cursor: pointer;

  transition:
    transform .2s,
    opacity .2s;
}

.partner-btn:hover {
  transform: translateY(-2px);
  opacity: .9;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

  .partner-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .partner-header h2 {
    font-size: 20px;
  }

  .partner-count {
    margin-left: 0;
  }

  .partner-event-card {
    flex: 0 0 280px;
  }

  .partner-event-img {
    height: 150px;
  }

  .partner-event-info {
    padding: 16px;
  }

  .partner-event-info h3 {
    font-size: 18px;
  }
}
/* ==========================================
   COMMUNITY PARTNER
========================================== */

.partner-section {
  margin-bottom: 40px;
}

.partner-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.partner-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.partner-count {
  margin-left: auto;

  padding: 6px 14px;

  background:
    rgba(255,255,255,.08);

  border-radius: 30px;

  font-size: 13px;
  color: rgba(255,255,255,.7);
}

/* ==========================================
   EVENTI DEL PARTNER
========================================== */

.partner-events-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================
   CARD EVENTO
========================================== */

.partner-event-card {
  display: flex;
  gap: 20px;

  background:
    rgba(255,255,255,.05);

  border:
    1px solid rgba(255,255,255,.08);

  border-radius: 22px;

  overflow: hidden;

  transition: .25s;
}

.partner-event-card:hover {
  transform: translateY(-3px);

  border-color:
    rgba(255,255,255,.18);

  box-shadow:
    0 10px 30px
    rgba(0,0,0,.30);
}

.partner-event-img {
  width: 260px;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
}

.partner-event-info {
  flex: 1;
  padding: 22px;
}

.partner-event-info h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.partner-event-info p {
  margin: 0;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
}

.partner-btn {
  margin-top: 20px;

  padding: 12px 20px;

  border: none;
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #0078ff,
      #00b4ff
    );

  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width:768px) {

  .partner-event-card {
    flex-direction: column;
  }

  .partner-event-img {
    width: 100%;
    height: 180px;
  }

  .partner-event-info {
    padding: 18px;
  }

  .partner-event-info h3 {
    font-size: 20px;
  }

}
}
/* =====================================================
   EVENTI PARTNER
   (stesso stile dei Campionati)
===================================================== */

.partner-section{
    width:100%;
    margin-bottom:35px;
}

/* ---------- HEADER ---------- */

.partner-header{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:15px;
    padding:0 5px;
}

.partner-header h2{
    margin:0;
    font-size:22px;
    color:#fff;
}

.partner-count{
    margin-left:auto;
    padding:5px 12px;
    border-radius:20px;
    background:rgba(255,255,255,.08);
    color:#bbb;
    font-size:13px;
    font-weight:600;
}

/* ---------- SLIDER ---------- */

.partner-events{

    display:flex;
    gap:16px;

    overflow-x:auto;

    padding:5px;

    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;

}

.partner-events::-webkit-scrollbar{
    height:8px;
}

.partner-events::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.15);
    border-radius:20px;
}

.partner-events>*{

    flex:0 0 auto;

    scroll-snap-align:start;

}

/* ---------- CARD ---------- */

.partner-event-card{

    width:320px;
    min-width:320px;
    max-width:320px;

    background:#111;

    border-radius:16px;

    overflow:hidden;

    display:flex;
    flex-direction:column;

    box-shadow:
        0 0 15px rgba(0,0,0,.45);

    transition:
        transform .25s,
        box-shadow .25s;

}

.partner-event-card:hover{

    transform:translateY(-4px);

    box-shadow:
        0 0 20px rgba(0,0,0,.6);

}

/* ---------- IMMAGINE ---------- */

.partner-event-img{

    width:100%;
    height:160px;

    object-fit:cover;

    display:block;

}

/* ---------- INFO ---------- */

.partner-event-info{

    display:flex;
    flex-direction:column;

    flex:1;

    padding:15px;

}

.partner-event-info h3{

    margin:0 0 10px;

    font-size:20px;

    color:#fff;

}

.partner-event-info p{

    margin:0;

    color:#cfcfcf;

    line-height:1.45;

    font-size:14px;

    min-height:60px;

    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;

}

/* ---------- BOTTONE ---------- */

.partner-btn{

    margin-top:auto;

    width:100%;

    padding:10px;

    border:none;

    border-radius:8px;

    background:#ffcc00;

    color:#000;

    font-weight:bold;

    cursor:pointer;

}

/* ---------- MOBILE ---------- */

@media (max-width:768px){

    .partner-event-card{

        width:280px;
        min-width:280px;
        max-width:280px;

    }

    .partner-event-img{

        height:160px;

    }

}
/* =========================================
   CLASSIFICHE - Premium Edition v6.0
   CSS Module - COMPLETE
   ✅ Tabellone Fase Finale
   ✅ Fasi: Finale, Semifinale, Quarti, Ottavi, Sedicesimi
   ✅ Sfida, Spareggio, Playoff, Eliminatoria, Gironi
   ✅ Dream Team & Budget Cup support
   ✅ Avatar & Testo Ingranditi
   ✅ Ottimizzazione Mobile & Schermi Stretti
   ✅ Leggibilità Migliorata
   ✅ Deep Link Funzionanti
   Last Update: 2026-07-29
========================================= */

/* ================= CSS CUSTOM PROPERTIES ================= */
:root {
  /* Colors */
  --primary: #ffcc00;
  --primary-rgb: 255, 204, 0;
  --primary-light: #ffed4a;
  --accent-blue: #0078ff;
  --accent-blue-rgb: 0, 120, 255;
  --accent-blue-dark: #0056cc;
  --dream-purple: #ba55d3;
  --dream-purple-rgb: 186, 85, 211;
  --budget-green: #32cd32;
  --budget-green-rgb: 50, 205, 50;
  
  /* Backgrounds */
  --bg-dark: #0a0a0a;
  --bg-card: #111111;
  --bg-overlay: rgba(20, 20, 20, 0.98);
  --bg-table-header: rgba(255, 255, 255, 0.06);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-sticky: #1a1a1a;
  --bg-avatar-placeholder: rgba(255, 255, 255, 0.06);
  --bg-tabellone: rgba(10, 10, 20, 0.6);
  --bg-bracket-match: rgba(20, 20, 30, 0.8);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-avatar: rgba(255, 204, 0, 0.4);
  --border-avatar-placeholder: rgba(255, 255, 255, 0.2);
  --border-tabellone: rgba(255, 215, 0, 0.2);
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  
  /* Gradients */
  --gold-gradient: linear-gradient(90deg, rgba(212, 175, 55, 0.35), rgba(184, 134, 11, 0.25));
  --silver-gradient: linear-gradient(90deg, rgba(192, 192, 192, 0.25), rgba(169, 169, 169, 0.18));
  --bronze-gradient: linear-gradient(90deg, rgba(205, 127, 50, 0.25), rgba(139, 90, 43, 0.18));
  --title-gradient: linear-gradient(135deg, var(--primary), var(--primary-light));
  --tu-badge-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  --tabellone-title-gradient: linear-gradient(135deg, #ffd700, #ff8c00);
  
  /* Shadows */
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 18px rgba(var(--primary-rgb), 0.15);
  --shadow-avatar-hover: 0 0 12px rgba(255, 204, 0, 0.35);
  --shadow-sticky: 2px 0 6px rgba(0, 0, 0, 0.35);
  --shadow-bracket-match: 0 2px 8px rgba(0, 0, 0, 0.3);
  
  /* Podium Avatar Shadows */
  --shadow-gold-avatar: 0 0 14px rgba(212, 175, 55, 0.4);
  --shadow-silver-avatar: 0 0 14px rgba(192, 192, 192, 0.35);
  --shadow-bronze-avatar: 0 0 14px rgba(205, 127, 50, 0.35);
  
  /* Current Pilot Glow */
  --tu-glow-subtle: inset 0 0 15px rgba(var(--accent-blue-rgb), 0.15), 0 0 8px rgba(var(--accent-blue-rgb), 0.2);
  --tu-glow-strong: inset 0 0 25px rgba(var(--accent-blue-rgb), 0.3), 0 0 16px rgba(var(--accent-blue-rgb), 0.4);
  --tu-podium-glow: inset 0 0 20px rgba(var(--accent-blue-rgb), 0.2), 0 0 15px rgba(var(--accent-blue-rgb), 0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-avatar: 0.25s ease;
  
  /* ========== ENHANCED COLUMN WIDTHS ========== */
  --col-avatar: 56px;
  --col-avatar-mobile: 50px;
  --col-avatar-small: 46px;
  --col-avatar-xs: 42px;
  --col-avatar-xxs: 38px;
  --col-numeric: 65px;
  --col-numeric-mobile: 55px;
  --col-numeric-xs: 48px;
  --col-numeric-xxs: 44px;
  --col-name-min: 160px;
  --col-name-mobile: 110px;
  --col-name-xs: 100px;
  
  /* ========== ENHANCED AVATAR SIZES ========== */
  --avatar-size: 40px;
  --avatar-size-mobile: 36px;
  --avatar-size-xs: 30px;
  --avatar-size-xxs: 26px;
  --avatar-border-width: 2px;
  --avatar-border-width-mobile: 1.5px;
  
  /* ========== ENHANCED FONT SIZES ========== */
  --font-size-title: clamp(16px, 2vw, 19px);
  --font-size-header: 12px;
  --font-size-cell: 13px;
  --font-size-psn: 14px;
  --font-size-sub: 11px;
  --font-size-badge: 10px;
  
  /* Spacing */
  --spacing-page: 20px;
  --spacing-card: 20px;
  --spacing-cell: 10px 10px;
  --spacing-header: 12px 10px;
  --spacing-section: 14px;
}

/* ================= KEYFRAMES ================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes tuPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(var(--accent-blue-rgb), 0.4); opacity: 1; }
  50% { box-shadow: 0 2px 18px rgba(var(--accent-blue-rgb), 0.7); opacity: 0.9; }
}

@keyframes tuGlow {
  0%, 100% { box-shadow: var(--tu-glow-subtle); }
  50% { box-shadow: var(--tu-glow-strong); }
}

@keyframes bracketSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

/* ================= BASE LAYOUT ================= */
.classifiche-page {
  padding: var(--spacing-page);
  max-width: 100%;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease;
  box-sizing: border-box;
}

/* ================= HEADER ================= */
.classifiche-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: var(--spacing-section);
  border-bottom: 1px solid var(--border-subtle);
}

.classifiche-header h1 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.5px;
}

.classifiche-nav {
  display: flex;
  gap: 8px;
}

/* ================= BUTTONS ================= */
.btn-back,
.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-back:hover,
.btn-retry:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* ================= LOADING & ERROR STATES ================= */
.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-icon {
  font-size: 48px;
  animation: pulse 2s ease infinite;
}

.loading-state p,
.error-state p {
  color: var(--text-muted);
  font-size: 16px;
}

/* ================= GRID SYSTEM ================= */
.classifiche-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-section);
  width: 100%;
  max-width: 100%;
}

.classifica-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: var(--spacing-section);
  width: 100%;
}

/* ================= CARD COMPONENT ================= */
.classifica-box {
  background: linear-gradient(180deg, var(--bg-overlay), rgba(10, 10, 10, 0.98));
  border-radius: var(--radius-lg);
  padding: var(--spacing-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.classifica-box:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
}

.classifica-box.multi-lega {
  padding-bottom: 24px;
}

/* ================= SECTION TITLE ================= */
.classifica-titolo {
  text-align: center;
  margin: 0 0 16px 0;
  font-size: var(--font-size-title);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  position: relative;
}

.classifica-titolo::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin: 8px auto 0;
  border-radius: 2px;
}

/* ================= LEGA SECTION ================= */
.lega-section {
  margin-top: var(--spacing-section);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--spacing-section);
  width: 100%;
}

.lega-section:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.lega-title {
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-cell);
  font-weight: 700;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  flex-wrap: wrap;
}

/* ================= FASE BADGE ================= */
.fase-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-full);
  padding: 3px 14px;
  font-size: 0.75em;
  font-weight: 500;
  color: #ffd700;
  vertical-align: middle;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.fase-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* ================= FASI CONTAINER ================= */
.fasi-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.fase-subsection {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 215, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.3s ease;
}

.fase-subsection:hover {
  border-color: rgba(255, 215, 0, 0.2);
  background: rgba(255, 215, 0, 0.03);
}

.fase-title {
  font-size: 0.95em;
  color: #ffd700;
  margin: 0 0 10px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================
   TABELLONE FASE FINALE v6.0
========================================= */

.tabellone-lega {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-tabellone);
  border: 1px solid var(--border-tabellone);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.tabellone-lega::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.tabellone-lega-title {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 800;
  background: var(--tabellone-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tabellone-bracket {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Bracket Round */
.bracket-round {
  flex: 1;
  min-width: 200px;
  max-width: 350px;
  animation: bracketSlideIn 0.5s ease forwards;
  animation-delay: calc(var(--round-index, 0) * 0.1s);
}

.bracket-round:nth-child(1) { --round-index: 0; }
.bracket-round:nth-child(2) { --round-index: 1; }
.bracket-round:nth-child(3) { --round-index: 2; }
.bracket-round:nth-child(4) { --round-index: 3; }
.bracket-round:nth-child(5) { --round-index: 4; }
.bracket-round:nth-child(6) { --round-index: 5; }
.bracket-round:nth-child(7) { --round-index: 6; }
.bracket-round:nth-child(8) { --round-index: 7; }

.bracket-round-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Bracket Matches */
.bracket-matches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bracket-match {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-bracket-match);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
  box-shadow: var(--shadow-bracket-match);
}

.bracket-match:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.05);
}

/* Bracket Position */
.bracket-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Bracket Name */
.bracket-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bracket Points */
.bracket-points {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ================= PODIUM BRACKET STYLES ================= */
.bracket-match.podium-1 {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(184, 134, 11, 0.1));
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  animation: goldPulse 3s ease-in-out infinite;
}

.bracket-match.podium-1 .bracket-pos {
  background: rgba(212, 175, 55, 0.3);
  color: #ffd700;
}

.bracket-match.podium-1 .bracket-points {
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
}

.bracket-match.podium-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(169, 169, 169, 0.08));
  border-color: rgba(192, 192, 192, 0.4);
}

.bracket-match.podium-2 .bracket-pos {
  background: rgba(192, 192, 192, 0.25);
  color: #c0c0c0;
}

.bracket-match.podium-2 .bracket-points {
  background: rgba(192, 192, 192, 0.15);
  color: #c0c0c0;
}

.bracket-match.podium-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(139, 90, 43, 0.08));
  border-color: rgba(205, 127, 50, 0.4);
}

.bracket-match.podium-3 .bracket-pos {
  background: rgba(205, 127, 50, 0.25);
  color: #cd7f32;
}

.bracket-match.podium-3 .bracket-points {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
}

/* ================= DREAM TEAM TABELLONE ================= */
.classifica-box[data-tipo="Dream Team"] .tabellone-lega,
.classifica-box:has(.classifica-titolo:contains("Dream")) .tabellone-lega {
  border-color: rgba(var(--dream-purple-rgb), 0.3);
}

.classifica-box[data-tipo="Dream Team"] .bracket-round-title,
.classifica-box:has(.classifica-titolo:contains("Dream")) .bracket-round-title {
  background: rgba(var(--dream-purple-rgb), 0.1);
  border-color: rgba(var(--dream-purple-rgb), 0.2);
  color: var(--dream-purple);
}

.classifica-box[data-tipo="Dream Team"] .bracket-points,
.classifica-box:has(.classifica-titolo:contains("Dream")) .bracket-points {
  background: rgba(var(--dream-purple-rgb), 0.1);
  color: var(--dream-purple);
}

/* ================= BUDGET CUP TABELLONE ================= */
.classifica-box[data-tipo="Budget Cup"] .tabellone-lega,
.classifica-box:has(.classifica-titolo:contains("Budget")) .tabellone-lega {
  border-color: rgba(var(--budget-green-rgb), 0.3);
}

.classifica-box[data-tipo="Budget Cup"] .bracket-round-title,
.classifica-box:has(.classifica-titolo:contains("Budget")) .bracket-round-title {
  background: rgba(var(--budget-green-rgb), 0.1);
  border-color: rgba(var(--budget-green-rgb), 0.2);
  color: var(--budget-green);
}

.classifica-box[data-tipo="Budget Cup"] .bracket-points,
.classifica-box:has(.classifica-titolo:contains("Budget")) .bracket-points {
  background: rgba(var(--budget-green-rgb), 0.1);
  color: var(--budget-green);
}

/* ================= TABLE CONTAINER ================= */
.classifica-table-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.classifica-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

/* ================= TABLE BASE ================= */
.classifica-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* ================= TABLE HEADER ================= */
.classifica-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}

.classifica-table th {
  background: var(--bg-table-header);
  backdrop-filter: blur(10px);
  color: var(--primary);
  padding: var(--spacing-header);
  border-bottom: 2px solid var(--border-medium);
  text-align: center;
  font-size: var(--font-size-header);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.classifica-table th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.classifica-table th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

/* ================= TABLE BODY ================= */
.classifica-table td {
  padding: var(--spacing-cell);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  font-size: var(--font-size-cell);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.classifica-table tbody tr {
  transition: var(--transition-fast);
  position: relative;
}

.classifica-table tbody tr:hover {
  background: var(--bg-hover);
}

/* ================= DEFAULT COLUMN WIDTHS ================= */
.classifica-table th:first-child,
.classifica-table td:first-child {
  width: var(--col-avatar);
  min-width: var(--col-avatar);
  max-width: var(--col-avatar);
  text-align: center;
  padding: 8px 4px;
}

.classifica-table th:nth-child(2),
.classifica-table td:nth-child(2) {
  min-width: var(--col-name-min);
  text-align: left;
  white-space: normal;
  word-break: break-word;
  padding: var(--spacing-cell);
}

.classifica-table th:nth-child(3),
.classifica-table td:nth-child(3),
.classifica-table th:nth-child(4),
.classifica-table td:nth-child(4) {
  min-width: var(--col-numeric);
  text-align: center;
  white-space: nowrap;
  padding: 10px 8px;
}

/* ================= HIDE 5TH COLUMN ================= */
.classifica-table th:nth-child(5),
.classifica-table td:nth-child(5) {
  display: none !important;
}

/* ================= AVATAR COMPONENT ================= */
.classifica-table td:first-child img,
img.classifica-avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  border: var(--avatar-border-width) solid var(--border-avatar);
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition-avatar), border-color var(--transition-avatar), box-shadow var(--transition-avatar);
  background: var(--bg-avatar-placeholder);
}

.classifica-table tbody tr:hover td:first-child img,
.classifica-table tbody tr:hover img.classifica-avatar {
  transform: scale(1.2);
  border-color: #ffcc00;
  box-shadow: var(--shadow-avatar-hover);
}

/* Avatar Placeholder */
img.classifica-avatar[src=""],
img.classifica-avatar:not([src]),
.classifica-avatar-placeholder {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  background: var(--bg-avatar-placeholder);
  border: var(--avatar-border-width) dashed var(--border-avatar-placeholder);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  vertical-align: middle;
}

/* ================= PODIUM STYLES ================= */
.gold {
  background: var(--gold-gradient);
  color: #fff;
  font-weight: 600;
}

.gold td:first-child img,
.gold img.classifica-avatar {
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: var(--shadow-gold-avatar);
}

.silver {
  background: var(--silver-gradient);
  color: #fff;
  font-weight: 600;
}

.silver td:first-child img,
.silver img.classifica-avatar {
  border-color: rgba(192, 192, 192, 0.9);
  box-shadow: var(--shadow-silver-avatar);
}

.bronze {
  background: var(--bronze-gradient);
  color: #fff;
  font-weight: 600;
}

.bronze td:first-child img,
.bronze img.classifica-avatar {
  border-color: rgba(205, 127, 50, 0.9);
  box-shadow: var(--shadow-bronze-avatar);
}

.gold:hover,
.silver:hover,
.bronze:hover {
  filter: brightness(1.1);
}

/* ================= CURRENT PILOT (TU) HIGHLIGHT ================= */
.classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) {
  background: linear-gradient(90deg, rgba(var(--accent-blue-rgb), 0.15), rgba(var(--accent-blue-rgb), 0.06)) !important;
  border-left: 3px solid var(--accent-blue) !important;
  animation: tuGlow 3s ease-in-out infinite;
}

.classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze):hover {
  background: linear-gradient(90deg, rgba(var(--accent-blue-rgb), 0.22), rgba(var(--accent-blue-rgb), 0.1)) !important;
}

.classifica-table tbody tr.current-pilot.gold {
  background: var(--gold-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb), 0.75) !important;
  box-shadow: var(--tu-podium-glow);
  animation: tuGlow 3s ease-in-out infinite;
}

.classifica-table tbody tr.current-pilot.silver {
  background: var(--silver-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb), 0.75) !important;
  box-shadow: var(--tu-podium-glow);
  animation: tuGlow 3s ease-in-out infinite;
}

.classifica-table tbody tr.current-pilot.bronze {
  background: var(--bronze-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb), 0.75) !important;
  box-shadow: var(--tu-podium-glow);
  animation: tuGlow 3s ease-in-out infinite;
}

.tu-badge {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 10px;
  background: var(--tu-badge-gradient);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--font-size-badge);
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(var(--accent-blue-rgb), 0.4);
  z-index: 10;
  pointer-events: none;
  animation: tuPulse 2s ease-in-out infinite;
}

.tu-star-inline {
  display: inline-block;
  margin-left: 3px;
  font-size: 11px;
  animation: pulse 2s ease-in-out infinite;
  vertical-align: middle;
}

.classifica-table tbody tr.current-pilot:hover .tu-badge {
  opacity: 0.85;
  transform: translateY(-50%) scale(1.05);
}

tr.current-pilot .classifica-nome .psn {
  color: #fff;
  text-shadow: 0 0 8px rgba(var(--accent-blue-rgb), 0.5);
}

/* ================= SPECIAL CELLS ================= */
.classifica-nome {
  text-align: left;
  padding: 2px 0;
}

.classifica-nome .psn {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-size: var(--font-size-psn);
  white-space: normal;
  word-break: break-word;
}

.classifica-sub {
  font-size: var(--font-size-sub);
  color: var(--text-muted);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

.classifica-sub b {
  color: var(--primary);
  font-weight: 600;
}

/* ================= PAGINATION ================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: var(--spacing-section);
  border-top: 1px solid var(--border-subtle);
}

.pagination-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.pagination-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-size: var(--font-size-cell);
  color: var(--text-secondary);
  min-width: 120px;
  text-align: center;
  font-weight: 500;
}

/* ================= EMPTY & NO DATA STATES ================= */
.classifica-empty {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  padding: 40px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.no-data {
  text-align: center;
  padding: var(--spacing-section);
  color: var(--text-muted);
  font-style: italic;
}

/* ================= MOBILE SELECTORS ================= */
.classifica-mobile-selector {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--spacing-section);
  margin-bottom: var(--spacing-section);
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.selector-group {
  margin-bottom: 12px;
}

.selector-group:last-child {
  margin-bottom: 0;
}

.selector-group label {
  display: block;
  font-size: var(--font-size-header);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mobile-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffcc00' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.mobile-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.mobile-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ================= CUSTOM SCROLLBAR ================= */
.classifica-table-scroll::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.classifica-table-scroll::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
}

.classifica-table-scroll::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: var(--radius-xl);
  border: 2px solid var(--bg-dark);
}

.classifica-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.classifica-table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #333 var(--bg-dark);
}

/* =========================================
   TEAM TABLE OVERRIDES
========================================= */
.classifica-box .classifica-table {
  table-layout: fixed;
}

.classifica-box .classifica-table th:nth-child(2),
.classifica-box .classifica-table td:nth-child(2) {
  width: calc(100% - 180px);
  min-width: 0;
  max-width: none;
}

.classifica-box .classifica-table th:nth-child(3),
.classifica-box .classifica-table td:nth-child(3),
.classifica-box .classifica-box .classifica-table th:nth-child(4),
.classifica-box .classifica-table td:nth-child(4) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.classifica-box .classifica-nome {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.classifica-box .classifica-nome .psn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classifica-box .classifica-sub {
  white-space: normal;
}

/* =========================================
   RESPONSIVE - TABLET (max-width: 1024px)
========================================= */
@media (max-width: 1024px) {
  .classifica-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .classifica-box {
    padding: 16px;
  }

  .classifiche-header h1 {
    font-size: clamp(20px, 3.5vw, 24px);
  }

  .classifica-table th,
  .classifica-table td {
    padding: 8px 8px;
    font-size: 12px;
  }

  .tabellone-bracket {
    flex-direction: column;
  }

  .bracket-round {
    max-width: 100%;
  }
}

/* =========================================
   RESPONSIVE - MOBILE (max-width: 768px)
========================================= */
@media (max-width: 768px) {
  .classifiche-page {
    padding: 8px;
  }

  .classifiche-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .classifiche-header h1 {
    font-size: 19px;
  }

  .classifica-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .classifica-box {
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .classifica-titolo {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .tabellone-lega {
    padding: 12px;
    margin-bottom: 16px;
  }

  .tabellone-lega-title {
    font-size: 15px;
  }

  .bracket-round {
    min-width: 100%;
  }

  .bracket-round-title {
    font-size: 12px;
  }

  .bracket-match {
    padding: 8px 10px;
  }

  .bracket-name {
    font-size: 12px;
  }

  .bracket-points {
    font-size: 10px;
  }

  .classifica-table-scroll {
    overflow-x: auto;
    margin: 0;
    padding: 0;
    border-radius: var(--radius-md);
  }

  .classifica-table {
    min-width: 450px;
    width: max(450px, 100%);
  }

  .classifica-table th {
    font-size: 11px;
    padding: 10px 6px;
    letter-spacing: 0.2px;
  }

  .classifica-table td {
    font-size: var(--font-size-cell);
    padding: 10px 6px;
  }

  /* Sticky avatar column */
  .classifica-table th:first-child,
  .classifica-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: var(--col-avatar-mobile);
    min-width: var(--col-avatar-mobile);
    max-width: var(--col-avatar-mobile);
    padding: 8px 4px;
    white-space: nowrap;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    position: sticky;
    left: var(--col-avatar-mobile);
    z-index: 3;
    min-width: var(--col-name-mobile);
    padding: 10px 6px;
  }

  .classifica-table th:first-child,
  .classifica-table th:nth-child(2) {
    background: var(--bg-sticky);
  }

  .classifica-table td:first-child,
  .classifica-table td:nth-child(2) {
    background: var(--bg-card);
  }

  .classifica-table tbody tr:hover td:first-child,
  .classifica-table tbody tr:hover td:nth-child(2) {
    background: var(--bg-sticky);
  }

  .gold td:first-child,
  .gold td:nth-child(2) { background: #2a2210; }
  .silver td:first-child,
  .silver td:nth-child(2) { background: #222; }
  .bronze td:first-child,
  .bronze td:nth-child(2) { background: #26190f; }

  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:first-child,
  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:nth-child(2) {
    background: #0f1a2e;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    box-shadow: var(--shadow-sticky);
  }

  .classifica-table td:first-child img,
  img.classifica-avatar {
    width: var(--avatar-size-mobile);
    height: var(--avatar-size-mobile);
    border-width: var(--avatar-border-width-mobile);
  }

  img.classifica-avatar[src=""],
  img.classifica-avatar:not([src]),
  .classifica-avatar-placeholder {
    width: var(--avatar-size-mobile);
    height: var(--avatar-size-mobile);
    font-size: 12px;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3),
  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    min-width: var(--col-numeric-mobile);
    padding: 10px 6px;
    white-space: nowrap;
    font-size: 13px;
  }

  .classifica-table th:nth-child(5),
  .classifica-table td:nth-child(5) {
    display: none !important;
  }

  .classifica-nome .psn {
    font-size: var(--font-size-psn);
  }

  .classifica-sub {
    font-size: var(--font-size-sub);
  }

  .tu-badge {
    right: 3px;
    padding: 3px 6px;
    font-size: 8px;
    gap: 2px;
  }

  .tu-star-inline {
    font-size: var(--font-size-badge);
    margin-left: 2px;
  }

  .pagination {
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .pagination-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .pagination-info {
    font-size: 12px;
    min-width: 80px;
  }

  .lega-title {
    width: 100%;
    justify-content: center;
    font-size: var(--font-size-sub);
    padding: 6px 10px;
    margin-bottom: 8px;
  }

  .fase-badge {
    font-size: 0.7em;
    padding: 2px 8px;
  }

  .classifica-mobile-selector {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
  }

  .classifiche-nav {
    width: 100%;
  }

  .btn-back {
    width: 100%;
    justify-content: center;
    font-size: var(--font-size-cell);
    padding: 10px 14px;
  }

  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) {
    border-left-width: 2px !important;
  }

  .classifica-table tbody tr.current-pilot.gold,
  .classifica-table tbody tr.current-pilot.silver,
  .classifica-table tbody tr.current-pilot.bronze {
    border-width: 1.5px !important;
  }

  .classifica-box .classifica-table th:nth-child(2),
  .classifica-box .classifica-table td:nth-child(2) {
    min-width: 110px;
  }

  .classifica-box .classifica-table th:nth-child(3),
  .classifica-box .classifica-table td:nth-child(3),
  .classifica-box .classifica-table th:nth-child(4),
  .classifica-box .classifica-table td:nth-child(4) {
    min-width: var(--col-numeric-mobile);
    width: var(--col-numeric-mobile);
  }
}

/* =========================================
   RESPONSIVE - SMALL MOBILE (max-width: 575px)
========================================= */
@media (max-width: 575px) {
  .classifiche-page {
    padding: 4px;
  }

  .classifiche-header h1 {
    font-size: 16px;
  }

  .classifica-box {
    padding: 8px;
  }

  .tabellone-lega {
    padding: 8px;
  }

  .tabellone-lega-title {
    font-size: 13px;
  }

  .bracket-match {
    padding: 6px 8px;
    gap: 6px;
  }

  .bracket-pos {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }

  .bracket-name {
    font-size: 10px;
  }

  .bracket-points {
    font-size: 9px;
    padding: 2px 6px;
  }

  .classifica-table-scroll {
    overflow-x: hidden;
  }

  .classifica-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }

  .classifica-table th {
    font-size: 10px;
    padding: 6px 3px;
  }

  .classifica-table td {
    font-size: 11px;
    padding: 6px 3px;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    width: var(--col-avatar-xs);
    min-width: var(--col-avatar-xs);
    max-width: var(--col-avatar-xs);
    padding: 5px 3px;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    left: var(--col-avatar-xs);
    width: auto;
    min-width: 0;
    max-width: calc(100% - var(--col-avatar-xs) - (var(--col-numeric-xs) * 2));
    padding: 6px 5px;
    overflow: hidden;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3),
  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    width: var(--col-numeric-xs);
    min-width: var(--col-numeric-xs);
    max-width: var(--col-numeric-xs);
    padding: 6px 3px;
    font-size: 12px;
  }

  .classifica-table td:first-child img,
  img.classifica-avatar {
    width: var(--avatar-size-xs);
    height: var(--avatar-size-xs);
  }

  img.classifica-avatar[src=""],
  img.classifica-avatar:not([src]),
  .classifica-avatar-placeholder {
    width: var(--avatar-size-xs);
    height: var(--avatar-size-xs);
    font-size: 10px;
  }

  .classifica-nome .psn {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .classifica-sub {
    font-size: 9px;
    line-height: 1.2;
  }

  .tu-badge {
    right: 1px;
    padding: 2px 4px;
    font-size: 7px;
  }

  .tu-star-inline {
    font-size: 8px;
  }

  .classifica-titolo {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .pagination-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .pagination-info {
    font-size: 10px;
    min-width: 60px;
  }

  .btn-back {
    padding: 6px 10px;
    font-size: 11px;
  }

  .classifica-mobile-selector {
    padding: 8px;
    margin-bottom: 6px;
  }

  .mobile-select {
    font-size: 11px;
    padding: 8px 28px 8px 10px;
  }
}

/* =========================================
   RESPONSIVE - EXTRA COMPACT (max-width: 570px)
========================================= */
@media (max-width: 570px) {
  .classifica-table th:first-child,
  .classifica-table td:first-child {
    width: var(--col-avatar-xxs);
    min-width: var(--col-avatar-xxs);
    max-width: var(--col-avatar-xxs);
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    left: var(--col-avatar-xxs);
    width: auto;
    min-width: 0 !important;
    max-width: calc(100% - var(--col-avatar-xxs) - (var(--col-numeric-xxs) * 2));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 4px;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3) {
    width: var(--col-numeric-xxs);
    min-width: var(--col-numeric-xxs);
    max-width: var(--col-numeric-xxs);
    padding: 5px 2px;
    font-size: 11px;
  }

  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    width: var(--col-numeric-xxs);
    min-width: var(--col-numeric-xxs);
    max-width: var(--col-numeric-xxs);
    padding: 5px 2px;
    font-size: 11px;
  }

  .classifica-avatar,
  .classifica-table td:first-child img {
    width: var(--avatar-size-xxs);
    height: var(--avatar-size-xxs);
  }

  .classifica-nome .psn {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .classifica-sub {
    font-size: 8px;
    line-height: 1.1;
  }

  .classifica-table th {
    font-size: 9px;
  }

  .classifica-table td {
    font-size: 10px;
  }

  .classifica-table-scroll {
    overflow-x: hidden !important;
  }

  .classifica-table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 4px 2px !important;
  }

  .classifica-table td:first-child img,
  img.classifica-avatar {
    width: 22px !important;
    height: 22px !important;
    border-width: 1px !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 32px - 96px) !important;
    padding: 4px 3px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .classifica-nome .psn {
    font-size: 9px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .classifica-sub {
    font-size: 7px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    opacity: 0.7;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3),
  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    padding: 4px 2px !important;
    font-size: 10px !important;
    font-weight: 600;
  }

  .classifica-table th {
    font-size: 8px !important;
    padding: 5px 2px !important;
    letter-spacing: 0 !important;
  }

  .classifica-table td {
    font-size: 9px !important;
    padding: 5px 3px !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    position: sticky !important;
    left: 32px !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table td:nth-child(2) {
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.5) !important;
  }

  .gold td:first-child,
  .gold td:nth-child(2) { background: #2a2210 !important; }
  .silver td:first-child,
  .silver td:nth-child(2) { background: #222 !important; }
  .bronze td:first-child,
  .bronze td:nth-child(2) { background: #26190f !important; }

  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:first-child,
  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:nth-child(2) {
    background: #0f1a2e !important;
  }

  .tu-badge {
    right: 1px !important;
    padding: 1px 3px !important;
    font-size: 6px !important;
    gap: 1px !important;
    border-radius: 4px !important;
  }

  .tu-star-inline {
    font-size: 6px !important;
  }

  .pagination-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }

  .pagination-info {
    font-size: 9px !important;
    min-width: 50px !important;
  }

  .classifica-box {
    padding: 6px !important;
  }

  .classifica-titolo {
    font-size: 10px !important;
    margin-bottom: 5px !important;
  }

  .classifica-titolo::after {
    width: 40px !important;
    height: 1px !important;
    margin: 4px auto 0 !important;
  }

  .lega-title {
    font-size: 9px !important;
    padding: 4px 8px !important;
    margin-bottom: 6px !important;
  }

  .classifica-table th:nth-child(5),
  .classifica-table td:nth-child(5) {
    display: none !important;
  }

  .classifica-table-container {
    overflow: visible !important;
  }

  .classifica-table-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* =========================================
   RESPONSIVE - MOBILE S (max-width: 375px)
========================================= */
@media (max-width: 375px) {
  .classifiche-page {
    padding: 2px !important;
  }

  .classifiche-header h1 {
    font-size: 14px !important;
  }

  .classifica-box {
    padding: 5px !important;
    border-radius: 10px !important;
  }

  .tabellone-lega {
    padding: 6px !important;
  }

  .tabellone-lega-title {
    font-size: 11px !important;
  }

  .bracket-round-title {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }

  .bracket-match {
    padding: 5px 6px !important;
    gap: 4px !important;
  }

  .bracket-pos {
    width: 20px !important;
    height: 20px !important;
    font-size: 8px !important;
  }

  .bracket-name {
    font-size: 9px !important;
  }

  .bracket-points {
    font-size: 8px !important;
    padding: 1px 5px !important;
  }

  .classifica-titolo {
    font-size: 9px !important;
    margin-bottom: 4px !important;
    letter-spacing: 0.2px !important;
  }

  .classifica-titolo::after {
    width: 30px !important;
    height: 1px !important;
    margin: 3px auto 0 !important;
  }

  .classifica-table-scroll {
    overflow-x: hidden !important;
  }

  .classifica-table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
  }

  .classifica-table th {
    font-size: 7px !important;
    padding: 4px 1px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .classifica-table td {
    font-size: 8px !important;
    padding: 4px 2px !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 3px 1px !important;
  }

  .classifica-table td:first-child img,
  img.classifica-avatar {
    width: 20px !important;
    height: 20px !important;
    border-width: 1px !important;
  }

  img.classifica-avatar[src=""],
  img.classifica-avatar:not([src]),
  .classifica-avatar-placeholder {
    width: 20px !important;
    height: 20px !important;
    font-size: 7px !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 28px - 80px) !important;
    padding: 4px 2px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .classifica-nome .psn {
    font-size: 7px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-weight: 500 !important;
  }

  .classifica-sub {
    font-size: 6px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    opacity: 0.65 !important;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3),
  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    padding: 4px 1px !important;
    font-size: 8px !important;
    font-weight: 600 !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    position: sticky !important;
    left: 28px !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table td:nth-child(2) {
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.4) !important;
  }

  .gold td:first-child,
  .gold td:nth-child(2) { background: #2a2210 !important; }
  .silver td:first-child,
  .silver td:nth-child(2) { background: #1f1f1f !important; }
  .bronze td:first-child,
  .bronze td:nth-child(2) { background: #26190f !important; }

  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:first-child,
  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:nth-child(2) {
    background: #0f1a2e !important;
  }

  .tu-badge {
    right: 0 !important;
    padding: 1px 2px !important;
    font-size: 5px !important;
    gap: 0 !important;
    border-radius: 3px !important;
    letter-spacing: 0 !important;
  }

  .tu-star-inline {
    font-size: 5px !important;
    margin-left: 1px !important;
  }

  .classifica-table th:nth-child(5),
  .classifica-table td:nth-child(5) {
    display: none !important;
  }

  .pagination {
    gap: 4px !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
  }

  .pagination-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 9px !important;
    border-radius: 6px !important;
  }

  .pagination-info {
    font-size: 8px !important;
    min-width: 45px !important;
  }

  .lega-title {
    font-size: 8px !important;
    padding: 3px 6px !important;
    margin-bottom: 4px !important;
    gap: 3px !important;
  }

  .fase-badge {
    font-size: 0.65em !important;
    padding: 1px 6px !important;
  }

  .classifica-mobile-selector {
    padding: 5px !important;
    margin-bottom: 4px !important;
    border-radius: 8px !important;
  }

  .selector-group label {
    font-size: 9px !important;
    margin-bottom: 3px !important;
  }

  .mobile-select {
    font-size: 9px !important;
    padding: 6px 24px 6px 8px !important;
    border-radius: 6px !important;
  }

  .btn-back {
    padding: 5px 8px !important;
    font-size: 9px !important;
    border-radius: 6px !important;
  }

  .classifica-box .classifica-table th:nth-child(2),
  .classifica-box .classifica-table td:nth-child(2) {
    min-width: 0 !important;
    max-width: calc(100% - 28px - 80px) !important;
  }

  .classifica-box .classifica-table th:nth-child(3),
  .classifica-box .classifica-table td:nth-child(3),
  .classifica-box .classifica-table th:nth-child(4),
  .classifica-box .classifica-table td:nth-child(4) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
}

/* =========================================
   RESPONSIVE - MOBILE M (376px - 425px)
========================================= */
@media (min-width: 376px) and (max-width: 425px) {
  .classifiche-page {
    padding: 4px !important;
  }

  .classifiche-header h1 {
    font-size: 15px !important;
  }

  .classifica-box {
    padding: 6px !important;
    border-radius: 12px !important;
  }

  .tabellone-lega {
    padding: 8px !important;
  }

  .tabellone-lega-title {
    font-size: 12px !important;
  }

  .bracket-match {
    padding: 6px 8px !important;
  }

  .classifica-titolo {
    font-size: 10px !important;
    margin-bottom: 5px !important;
  }

  .classifica-titolo::after {
    width: 35px !important;
    height: 1px !important;
    margin: 4px auto 0 !important;
  }

  .classifica-table-scroll {
    overflow-x: hidden !important;
  }

  .classifica-table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
  }

  .classifica-table th {
    font-size: 8px !important;
    padding: 5px 2px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .classifica-table td {
    font-size: 9px !important;
    padding: 5px 2px !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 4px 2px !important;
  }

  .classifica-table td:first-child img,
  img.classifica-avatar {
    width: 24px !important;
    height: 24px !important;
    border-width: 1px !important;
  }

  img.classifica-avatar[src=""],
  img.classifica-avatar:not([src]),
  .classifica-avatar-placeholder {
    width: 24px !important;
    height: 24px !important;
    font-size: 8px !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 32px - 90px) !important;
    padding: 5px 3px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .classifica-nome .psn {
    font-size: 8px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-weight: 500 !important;
  }

  .classifica-sub {
    font-size: 7px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    opacity: 0.7 !important;
  }

  .classifica-table th:nth-child(3),
  .classifica-table td:nth-child(3),
  .classifica-table th:nth-child(4),
  .classifica-table td:nth-child(4) {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    padding: 5px 2px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
  }

  .classifica-table th:first-child,
  .classifica-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table th:nth-child(2),
  .classifica-table td:nth-child(2) {
    position: sticky !important;
    left: 32px !important;
    z-index: 3 !important;
    background: var(--bg-card, #111) !important;
  }

  .classifica-table td:nth-child(2) {
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.45) !important;
  }

  .gold td:first-child,
  .gold td:nth-child(2) { background: #2a2210 !important; }
  .silver td:first-child,
  .silver td:nth-child(2) { background: #1f1f1f !important; }
  .bronze td:first-child,
  .bronze td:nth-child(2) { background: #26190f !important; }

  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:first-child,
  .classifica-table tbody tr.current-pilot:not(.gold):not(.silver):not(.bronze) td:nth-child(2) {
    background: #0f1a2e !important;
  }

  .tu-badge {
    right: 1px !important;
    padding: 1px 3px !important;
    font-size: 6px !important;
    gap: 1px !important;
    border-radius: 4px !important;
  }

  .tu-star-inline {
    font-size: 6px !important;
    margin-left: 1px !important;
  }

  .classifica-table th:nth-child(5),
  .classifica-table td:nth-child(5) {
    display: none !important;
  }

  .pagination {
    gap: 5px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  .pagination-btn {
    width: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
    border-radius: 7px !important;
  }

  .pagination-info {
    font-size: 9px !important;
    min-width: 55px !important;
  }

  .lega-title {
    font-size: 9px !important;
    padding: 4px 8px !important;
    margin-bottom: 5px !important;
    gap: 4px !important;
  }

  .classifica-mobile-selector {
    padding: 6px !important;
    margin-bottom: 5px !important;
  }

  .selector-group label {
    font-size: 10px !important;
    margin-bottom: 4px !important;
  }

  .mobile-select {
    font-size: 10px !important;
    padding: 7px 26px 7px 9px !important;
  }

  .btn-back {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }

  .classifica-box .classifica-table th:nth-child(2),
  .classifica-box .classifica-table td:nth-child(2) {
    min-width: 0 !important;
    max-width: calc(100% - 32px - 90px) !important;
  }

  .classifica-box .classifica-table th:nth-child(3),
  .classifica-box .classifica-table td:nth-child(3),
  .classifica-box .classifica-table th:nth-child(4),
  .classifica-box .classifica-table td:nth-child(4) {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
  }
}

/* =========================================
   DESKTOP ONLY (min-width: 769px)
========================================= */
@media (min-width: 769px) {
  .classifica-mobile-selector {
    display: none !important;
  }

  .classifica-table {
    min-width: 100%;
  }
}

/* =========================================
   ACCESSIBILITY
========================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.classifica-table a:focus,
.btn-back:focus,
.pagination-btn:focus,
.mobile-select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  .classifica-box {
    border: 2px solid currentColor;
  }

  .classifica-table th {
    background: #333;
  }

  .classifica-table tbody tr.current-pilot {
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
  }

  .tabellone-lega {
    border: 2px solid currentColor;
  }
}
/* =========================================
   TABELLONE 1vs1 - ELIMINAZIONE DIRETTA v7.0
   ✅ Finale, Semifinale, Quarti, Ottavi, Sedicesimi
   ✅ Spareggio, Playoff, Sfida, Eliminatoria
   ✅ Layout VS con vincitore evidenziato
========================================= */

/* Container eliminazione diretta */
.tabellone-eliminazione {
  border-color: rgba(255, 100, 50, 0.3) !important;
  background: linear-gradient(180deg, rgba(15, 5, 0, 0.7), rgba(10, 5, 0, 0.6)) !important;
}

.tabellone-eliminazione::before {
  background: radial-gradient(ellipse at center, rgba(255, 100, 50, 0.08) 0%, transparent 70%) !important;
}

.tabellone-1v1-bracket {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Round 1vs1 */
.bracket-1v1 {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  animation: bracketSlideIn 0.5s ease forwards;
  animation-delay: calc(var(--round-index, 0) * 0.15s);
}

.bracket-1v1:nth-child(1) { --round-index: 0; }
.bracket-1v1:nth-child(2) { --round-index: 1; }
.bracket-1v1:nth-child(3) { --round-index: 2; }
.bracket-1v1:nth-child(4) { --round-index: 3; }
.bracket-1v1:nth-child(5) { --round-index: 4; }
.bracket-1v1:nth-child(6) { --round-index: 5; }
.bracket-1v1:nth-child(7) { --round-index: 6; }
.bracket-1v1:nth-child(8) { --round-index: 7; }

/* Container partite 1vs1 */
.bracket-matches-1v1 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Singola partita 1vs1 */
.match-1v1 {
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.9), rgba(12, 12, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}

.match-1v1:hover {
  border-color: rgba(255, 150, 50, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 100, 50, 0.15);
}

/* Header partita */
.match-1v1-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.match-1v1-num {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.match-1v1-badge {
  font-size: 9px;
  font-weight: 700;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  animation: goldPulse 3s ease-in-out infinite;
  letter-spacing: 0.5px;
}

/* Container giocatori */
.match-1v1-players {
  display: flex;
  align-items: stretch;
  padding: 6px;
  gap: 0;
}

/* Giocatore */
.match-1v1-player {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
  min-width: 0;
}

.match-1v1-player:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Giocatore vincitore */
.match-1v1-player.match-winner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(184, 134, 11, 0.06));
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.match-1v1-player.match-winner .match-1v1-name {
  color: #ffd700;
  font-weight: 700;
}

.match-1v1-player.match-winner .match-1v1-points {
  color: #ffd700;
  background: rgba(212, 175, 55, 0.2);
}

/* Giocatore BYE (senza avversario) */
.match-1v1-player.match-bye {
  opacity: 0.35;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.match-1v1-player.match-bye .match-1v1-name {
  font-style: italic;
}

/* Nome giocatore */
.match-1v1-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
  line-height: 1.3;
}

/* Punti giocatore */
.match-1v1-points {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* Corona vincitore */
.match-1v1-crown {
  font-size: 18px;
  position: absolute;
  top: -10px;
  right: -6px;
  animation: crownBounce 1.2s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  z-index: 2;
}

@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-4px) rotate(-8deg); }
  40% { transform: translateY(0) rotate(0deg); }
  60% { transform: translateY(-3px) rotate(8deg); }
  80% { transform: translateY(0) rotate(0deg); }
}

/* VS separator */
.match-1v1-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.2);
  padding: 0 12px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.01);
  position: relative;
}

.match-1v1-vs::before,
.match-1v1-vs::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-50%);
}

.match-1v1-vs::before {
  top: -2px;
}

.match-1v1-vs::after {
  bottom: -2px;
}

/* Finale - Vincitore assoluto */
.match-1v1.match-final-winner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.1), rgba(255, 215, 0, 0.05));
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), 0 8px 25px rgba(0, 0, 0, 0.4);
  animation: finalGlow 2s ease-in-out infinite;
}

@keyframes finalGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.3), 0 8px 25px rgba(0, 0, 0, 0.4); }
}

.match-1v1.match-final-winner .match-1v1-header {
  background: rgba(255, 215, 0, 0.08);
}

.match-1v1.match-final-winner .match-1v1-num {
  color: rgba(255, 215, 0, 0.6);
}

/* Podio partite */
.match-1v1.match-podium-1 {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
}

.match-1v1.match-podium-2 {
  border-color: rgba(192, 192, 192, 0.25);
  box-shadow: 0 4px 20px rgba(192, 192, 192, 0.05);
}

.match-1v1.match-podium-3 {
  border-color: rgba(205, 127, 50, 0.25);
  box-shadow: 0 4px 20px rgba(205, 127, 50, 0.05);
}

/* =========================================
   DREAM TEAM - BRACKET 1vs1
========================================= */
.classifica-box[data-tipo="Dream Team"] .tabellone-eliminazione,
.classifica-box:has(.classifica-titolo:contains("Dream")) .tabellone-eliminazione {
  border-color: rgba(var(--dream-purple-rgb), 0.3) !important;
  background: linear-gradient(180deg, rgba(20, 5, 30, 0.7), rgba(10, 5, 20, 0.6)) !important;
}

.classifica-box[data-tipo="Dream Team"] .match-1v1-player.match-winner,
.classifica-box:has(.classifica-titolo:contains("Dream")) .match-1v1-player.match-winner {
  background: linear-gradient(135deg, rgba(186, 85, 211, 0.12), rgba(138, 43, 226, 0.06));
  border-color: rgba(186, 85, 211, 0.3);
}

.classifica-box[data-tipo="Dream Team"] .match-1v1-player.match-winner .match-1v1-name,
.classifica-box:has(.classifica-titolo:contains("Dream")) .match-1v1-player.match-winner .match-1v1-name {
  color: #ba55d3;
}

.classifica-box[data-tipo="Dream Team"] .match-1v1-player.match-winner .match-1v1-points,
.classifica-box:has(.classifica-titolo:contains("Dream")) .match-1v1-player.match-winner .match-1v1-points {
  color: #ba55d3;
  background: rgba(186, 85, 211, 0.2);
}

.classifica-box[data-tipo="Dream Team"] .match-final-winner,
.classifica-box:has(.classifica-titolo:contains("Dream")) .match-final-winner {
  border-color: rgba(186, 85, 211, 0.5) !important;
  box-shadow: 0 0 30px rgba(186, 85, 211, 0.2), 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* =========================================
   BUDGET CUP - BRACKET 1vs1
========================================= */
.classifica-box[data-tipo="Budget Cup"] .tabellone-eliminazione,
.classifica-box:has(.classifica-titolo:contains("Budget")) .tabellone-eliminazione {
  border-color: rgba(var(--budget-green-rgb), 0.3) !important;
  background: linear-gradient(180deg, rgba(5, 20, 5, 0.7), rgba(5, 10, 5, 0.6)) !important;
}

.classifica-box[data-tipo="Budget Cup"] .match-1v1-player.match-winner,
.classifica-box:has(.classifica-titolo:contains("Budget")) .match-1v1-player.match-winner {
  background: linear-gradient(135deg, rgba(50, 205, 50, 0.12), rgba(34, 139, 34, 0.06));
  border-color: rgba(50, 205, 50, 0.3);
}

.classifica-box[data-tipo="Budget Cup"] .match-1v1-player.match-winner .match-1v1-name,
.classifica-box:has(.classifica-titolo:contains("Budget")) .match-1v1-player.match-winner .match-1v1-name {
  color: #32cd32;
}

.classifica-box[data-tipo="Budget Cup"] .match-1v1-player.match-winner .match-1v1-points,
.classifica-box:has(.classifica-titolo:contains("Budget")) .match-1v1-player.match-winner .match-1v1-points {
  color: #32cd32;
  background: rgba(50, 205, 50, 0.2);
}

.classifica-box[data-tipo="Budget Cup"] .match-final-winner,
.classifica-box:has(.classifica-titolo:contains("Budget")) .match-final-winner {
  border-color: rgba(50, 205, 50, 0.5) !important;
  box-shadow: 0 0 30px rgba(50, 205, 50, 0.2), 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* =========================================
   RESPONSIVE - TABELLONE 1vs1 TABLET
========================================= */
@media (max-width: 1024px) {
  .tabellone-1v1-bracket {
    flex-direction: column;
    gap: 16px;
  }

  .bracket-1v1 {
    max-width: 100%;
    min-width: 100%;
  }
}

/* =========================================
   RESPONSIVE - TABELLONE 1vs1 MOBILE
========================================= */
@media (max-width: 768px) {
  .bracket-1v1 {
    min-width: 100%;
    max-width: 100%;
  }
  
  .match-1v1-name {
    font-size: 12px;
    max-width: 50%;
  }
  
  .match-1v1-points {
    font-size: 10px;
    padding: 3px 10px;
  }
  
  .match-1v1-player {
    padding: 10px 12px;
  }
  
  .match-1v1-vs {
    padding: 0 8px;
    font-size: 8px;
  }
  
  .match-1v1-crown {
    font-size: 14px;
    top: -8px;
    right: -4px;
  }
  
  .match-1v1-header {
    padding: 8px 12px;
  }
  
  .match-1v1-badge {
    font-size: 8px;
    padding: 2px 8px;
  }
}

/* =========================================
   RESPONSIVE - TABELLONE 1vs1 SMALL MOBILE
========================================= */
@media (max-width: 575px) {
  .bracket-1v1 {
    min-width: 100%;
  }

  .bracket-matches-1v1 {
    gap: 10px;
  }

  .match-1v1-name {
    font-size: 10px;
    max-width: 45%;
  }
  
  .match-1v1-points {
    font-size: 9px;
    padding: 2px 8px;
  }
  
  .match-1v1-player {
    padding: 8px 10px;
  }
  
  .match-1v1-vs {
    padding: 0 6px;
    font-size: 7px;
    letter-spacing: 1px;
  }
  
  .match-1v1-crown {
    font-size: 12px;
    top: -6px;
    right: -3px;
  }
  
  .match-1v1-header {
    padding: 6px 10px;
  }
  
  .match-1v1-num {
    font-size: 8px;
  }
  
  .match-1v1-badge {
    font-size: 7px;
    padding: 2px 6px;
  }
}

/* =========================================
   RESPONSIVE - TABELLONE 1vs1 EXTRA COMPACT
========================================= */
@media (max-width: 375px) {
  .bracket-matches-1v1 {
    gap: 8px;
  }

  .match-1v1-name {
    font-size: 9px;
    max-width: 40%;
  }
  
  .match-1v1-points {
    font-size: 8px;
    padding: 2px 6px;
  }
  
  .match-1v1-player {
    padding: 6px 8px;
  }
  
  .match-1v1-vs {
    padding: 0 4px;
    font-size: 6px;
  }
  
  .match-1v1-crown {
    font-size: 10px;
    top: -5px;
    right: -2px;
  }
}
/* =========================================
   PRINT STYLES
========================================= */
@media print {
  .classifiche-page {
    background: white;
    color: black;
    padding: 0;
  }

  .classifica-box {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

  .tabellone-lega {
    background: white;
    border: 1px solid #ccc;
  }

  .classifica-table th {
    background: #f5f5f5;
    color: #333;
  }

  .gold,
  .silver,
  .bronze {
    background: none !important;
    font-weight: bold;
  }

  .current-pilot {
    outline: 2px solid #000;
    outline-offset: -2px;
  }

  .tu-badge {
    border: 1px solid #000;
    background: #e0e0e0 !important;
    color: #000 !important;
  }

  .pagination,
  .classifiche-nav,
  .classifica-mobile-selector {
    display: none !important;
  }

  .bracket-match {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
/* ================= RANKING =================*/
/* Stile base card pilota corrente - versione normale */
.pilota-card.current-pilot:not(.gold):not(.silver):not(.bronze) {
  background: linear-gradient(90deg, rgba(var(--accent-blue-rgb),0.15), rgba(var(--accent-blue-rgb),0.06)) !important;
  border-left: 3px solid var(--accent-blue) !important;
  animation: tuGlow 3s ease-in-out infinite;
  position: relative;
}

.pilota-card.current-pilot:not(.gold):not(.silver):not(.bronze):hover {
  background: linear-gradient(90deg, rgba(var(--accent-blue-rgb),0.22), rgba(var(--accent-blue-rgb),0.10)) !important;
}

/* Stile card pilota corrente - podio oro */
.pilota-card.current-pilot.gold {
  background: var(--gold-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb),0.75) !important;
  box-shadow: inset 0 0 20px rgba(var(--accent-blue-rgb),0.2), 0 0 15px rgba(var(--accent-blue-rgb),0.25);
  animation: tuGlow 3s ease-in-out infinite;
}

/* Stile card pilota corrente - podio argento */
.pilota-card.current-pilot.silver {
  background: var(--silver-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb),0.75) !important;
  box-shadow: inset 0 0 20px rgba(var(--accent-blue-rgb),0.2), 0 0 15px rgba(var(--accent-blue-rgb),0.25);
  animation: tuGlow 3s ease-in-out infinite;
}

/* Stile card pilota corrente - podio bronzo */
.pilota-card.current-pilot.bronze {
  background: var(--bronze-gradient) !important;
  border: 2px dashed rgba(var(--accent-blue-rgb),0.75) !important;
  box-shadow: inset 0 0 20px rgba(var(--accent-blue-rgb),0.2), 0 0 15px rgba(var(--accent-blue-rgb),0.25);
  animation: tuGlow 3s ease-in-out infinite;
}

/* Badge TU nella card */
.pilota-card .tu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 8px;
  background: linear-gradient(135deg, var(--accent-blue), #0056cc);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(var(--accent-blue-rgb),0.4);
  animation: tuPulse 2s ease-in-out infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* Badge Tua Posizione nella card */
.pilota-card .tu-star-inline {
  display: block;
  font-size: 0.7em;
  color: #FFD700;
  margin-top: 2px;
  animation: pulse 2s ease-in-out infinite;
}

/* Assicurati che il nome possa contenere il badge */
.pilota-card .info .nome {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* =========================================================
   SLIDER FULLSCREEN PROFESSIONALE - LAYOUT GRAN TURISMO 7
   Layout: Immagine full-width, info a sinistra,
   card scorrevoli a destra con scroll, pulsanti azione sotto le card.
   CSS AGGIORNATO - v5.4 CON DESCRIZIONE ESPANDIBILE, CARD CIRCUITO,
   TODAY HIGHLIGHT, BADGE OGGI, TESTI ESPANDI/RIDUCI
========================================================= */

/* ---------- RESET ---------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

/* ---------- HERO FULLSCREEN ---------- */
.es2-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  background: #0a0a0a;
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.es2-track { position: relative; width: 100%; height: 100%; }

.es2-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.es2-slide.active { opacity: 1; pointer-events: auto; }

/* ---------- SFONDO IMMAGINE ---------- */
.es2-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}

.es2-slide.active .es2-slide-bg {
  animation: slowZoom 8s ease forwards;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.es2-slide-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.7) 25%, rgba(10,10,10,0.25) 50%, rgba(10,10,10,0.15) 70%, rgba(10,10,10,0.05) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.1) 40%, rgba(10,10,10,0.6) 75%, rgba(10,10,10,0.95) 100%);
  z-index: 1;
}

.es2-slide::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, transparent 70%);
  z-index: 2;
  opacity: 0.6;
}

/* ---------- LAYOUT PRINCIPALE ---------- */
.es2-slide-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(40px, 6vh, 80px) clamp(20px, 4vw, 60px) 0;
}

/* ---------- SEZIONE INFORMAZIONI SINISTRA ---------- */
.es2-info-panel {
  position: absolute;
  left: clamp(20px, 4vw, 60px);
  top: 50%;
  transform: translateY(-55%);
  max-width: min(520px, 44vw);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
}

.es2-info-eyebrow {
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.es2-info-eyebrow::before {
  content: '';
  width: clamp(20px, 3vw, 40px);
  height: 2px;
  background: #fbbf24;
  border-radius: 2px;
}

.es2-info-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -1.5px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

/* ═══════════════════════════════════════════════════════════════════════
   BOX DESCRIZIONE ESPANDIBILE (HTML dal foglio)
   ═══════════════════════════════════════════════════════════════════════ */
.es2-desc-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: clamp(8px, 1vw, 12px);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}

.es2-desc-box:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

.es2-desc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.es2-desc-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.es2-desc-icon { font-size: 14px; }

.es2-desc-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
}

/* Testo espandi/riduci con icona separata */
.es2-desc-expand-text,
.es2-gara-expand-text {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.es2-desc-expand-icon,
.es2-gara-expand-icon {
  display: inline-block;
  font-size: 9px;
  width: 12px;
  text-align: center;
}

.es2-desc-content {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  animation: expandIn 0.3s ease;
}

@keyframes expandIn {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}

.es2-desc-inner {
  font-size: clamp(10px, 0.9vw, 12px);
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.es2-desc-inner b,
.es2-desc-inner strong { color: #fbbf24; }

/* ═══════════════════════════════════════════════════════════════════════
   GARA DEL GIORNO ESPANDIBILE
   ═══════════════════════════════════════════════════════════════════════ */
.es2-gara-giorno {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 14px;
  padding: clamp(10px, 1.2vw, 14px);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}

.es2-gara-giorno:hover {
  border-color: rgba(251,191,36,0.4);
  background: rgba(255,255,255,0.06);
}

.es2-gara-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.es2-gara-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.es2-gara-icon { font-size: 15px; }

.es2-gara-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fbbf24;
  font-weight: 700;
}

.es2-gara-live {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  animation: pulse-live 1.5s infinite;
}

.es2-gara-oggi {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
}

@keyframes pulse-live {
  0%,100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.es2-gara-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
}

.es2-gara-expanded {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: expandIn 0.3s ease;
}

.es2-gara-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.es2-gara-row:last-child { border-bottom: none; }

.es2-gara-key {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  font-weight: 500;
}

.es2-gara-value {
  color: rgba(255,255,255,0.85);
  font-size: 10px;
  font-weight: 600;
}

.es2-gara-value.highlight { color: #fbbf24; }

.es2-gara-info-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 25px;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.es2-gara-info-btn:hover {
  background: rgba(251,191,36,0.25);
  border-color: rgba(251,191,36,0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(251,191,36,0.15);
}

/* ═══════════════════════════════════════════════════════════════════════
   PARTECIPANTI
   ═══════════════════════════════════════════════════════════════════════ */
.es2-partecipanti {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: clamp(8px, 1vw, 12px);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.es2-partecipanti-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.es2-partecipanti-icon { font-size: 13px; }

.es2-partecipanti-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
}

.es2-partecipanti-refresh {
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
  padding: 0;
}

.es2-partecipanti-refresh:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  transform: rotate(180deg);
}

.es2-partecipanti-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 10px;
}

.es2-loading-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  animation: loading-pulse 1s infinite;
}

@keyframes loading-pulse {
  0%,100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

.es2-partecipanti-empty {
  text-align: center;
  padding: 14px 10px;
}

.es2-partecipanti-empty span { font-size: 22px; display: block; margin-bottom: 4px; }
.es2-partecipanti-empty p { color: rgba(255,255,255,0.5); font-size: 11px; margin: 0 0 2px; }
.es2-partecipanti-empty small { color: rgba(255,255,255,0.3); font-size: 8px; }

/* Stats sempre visibili */
.es2-partecipanti-stats {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.es2-stat {
  flex: 1;
  min-width: 35px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 5px 3px;
  text-align: center;
}

.es2-stat.iscritti-stat {
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
}

.es2-stat-num {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.1;
}

.es2-stat.iscritti-stat .es2-stat-num { color: #fbbf24; font-size: 15px; }
.es2-stat-num.present { color: #10b981; }
.es2-stat-num.absent { color: #ef4444; }

.es2-stat-label {
  font-size: 7px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 1px;
}

.es2-stat.iscritti-stat .es2-stat-label { color: #fbbf24; font-weight: 700; }

.es2-partecipanti-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.es2-partecipante-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  font-size: 10px;
  transition: all 0.2s ease;
}

.es2-partecipante-chip:hover {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.5);
  transform: translateY(-2px);
}

.es2-chip-avatar-wrapper {
  width: 26px; height: 26px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  border: 2px solid rgba(16,185,129,0.4);
}

.es2-chip-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.es2-chip-avatar-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,185,129,0.2);
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 50%;
}

.es2-chip-name {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 10px;
  max-width: 65px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.es2-chip-host { font-size: 11px; margin-left: auto; }

.es2-partecipanti-more {
  text-align: center;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: #fbbf24;
  font-size: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.es2-partecipanti-more:hover { color: #f59e0b; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   MODALE LISTA COMPLETA PARTECIPANTI
   ═══════════════════════════════════════════════════════════════════════ */
.es2-modal-partecipanti { max-width: 480px !important; }

.es2-partecipanti-modal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.es2-partecipanti-modal-list::-webkit-scrollbar { width: 4px; }
.es2-partecipanti-modal-list::-webkit-scrollbar-track { background: transparent; }
.es2-partecipanti-modal-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.es2-partecipante-modal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s ease;
}

.es2-partecipante-modal-row:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(16,185,129,0.3);
}

.es2-partecipante-avatar-wrapper {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  border: 2px solid rgba(16,185,129,0.4);
}

.es2-partecipante-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.es2-partecipante-avatar-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,185,129,0.2);
  color: #10b981;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 50%;
}

.es2-partecipante-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.es2-partecipante-name { color: #fff; font-weight: 600; font-size: 13px; }
.es2-partecipante-status { color: #10b981; font-size: 10px; font-weight: 500; }
.es2-modal-host { font-size: 18px; flex-shrink: 0; }

/* ---------- PANNELLO DESTRO: CARD + AZIONI ---------- */
.es2-right-panel {
  position: absolute;
  right: clamp(20px, 4vw, 60px);
  bottom: clamp(40px, 8vh, 80px);
  width: min(500px, 45vw);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

/* ---------- CARD SCORREVOLI ---------- */
.es2-cards-scroll {
  display: flex;
  gap: clamp(12px, 1.5vw, 18px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(251,191,36,0.4) rgba(255,255,255,0.05);
  padding-bottom: 12px;
  cursor: grab;
  user-select: none;
}

.es2-cards-scroll:active { cursor: grabbing; }

.es2-cards-scroll::-webkit-scrollbar { height: 5px; }
.es2-cards-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 10px; margin: 0 20px; }
.es2-cards-scroll::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.4); border-radius: 10px; transition: background 0.3s; }
.es2-cards-scroll::-webkit-scrollbar-thumb:hover { background: rgba(251,191,36,0.7); }
.es2-cards-scroll::after { content: ''; flex: 0 0 8px; height: 1px; }

/* ═══════════════════════════════════════════════════════════════════════
   SINGOLA CARD - CIRCUITO CONTINUO + TODAY HIGHLIGHT
   ═══════════════════════════════════════════════════════════════════════ */
.es2-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: clamp(160px, 16vw, 220px);
  background: rgba(20,20,20,0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: clamp(12px, 1.5vw, 16px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: clamp(10px, 1vw, 14px);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 0.6vw, 8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 1;
}

.es2-card:hover {
  background: rgba(30,30,30,0.9);
  border-color: rgba(251,191,36,0.5);
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(251,191,36,0.25), 0 0 30px rgba(251,191,36,0.08);
}

/* Card di oggi illuminata */
.es2-card.today-highlight {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.3) !important;
  animation: todayGlow 2s ease-in-out infinite;
}

@keyframes todayGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), 0 0 0 2px rgba(16, 185, 129, 0.5); }
}

/* Badge OGGI sulla card */
.es2-card-today-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Card selezionata - IN PRIMO PIANO */
.es2-card.selected {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 35px rgba(251,191,36,0.35), 0 0 0 2px rgba(251,191,36,0.5), 0 20px 50px rgba(0,0,0,0.7) !important;
  background: rgba(35,35,35,0.95) !important;
  transform: scale(1.06) translateY(-6px) !important;
  z-index: 10 !important;
}

/* Card selezionata che è anche today-highlight */
.es2-card.selected.today-highlight {
  border-color: #10b981 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), 0 0 0 2px rgba(16, 185, 129, 0.6), 0 20px 50px rgba(0,0,0,0.7) !important;
}

/* Card adiacenti */
.es2-card.prev,
.es2-card.next {
  opacity: 0.65;
  transform: scale(0.9);
  z-index: 2;
}

.es2-card.prev { transform: scale(0.9) translateX(8px); }
.es2-card.next { transform: scale(0.9) translateX(-8px); }

/* Card lontane */
.es2-card.far-prev,
.es2-card.far-next {
  opacity: 0.35;
  transform: scale(0.82);
  z-index: 1;
}

.es2-card.far-prev { transform: scale(0.82) translateX(14px); }
.es2-card.far-next { transform: scale(0.82) translateX(-14px); }

/* Animazione ingresso circuito */
.es2-card.circuit-enter {
  animation: cardCircuitIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardCircuitIn {
  from { opacity: 0; transform: scale(0.75) translateX(25px); }
  to { opacity: 1; transform: scale(1) translateX(0); }
}

.es2-card-thumb {
  width: 100%;
  height: clamp(70px, 9vw, 100px);
  border-radius: clamp(8px, 1vw, 10px);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.es2-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20,20,20,0.9) 100%);
}

.es2-card-tag {
  position: absolute;
  top: clamp(6px, 0.6vw, 8px);
  left: clamp(6px, 0.6vw, 8px);
  z-index: 2;
  font-size: clamp(7px, 0.6vw, 8px);
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: clamp(2px, 0.3vw, 4px) clamp(6px, 0.8vw, 10px);
  border-radius: 12px;
  text-transform: uppercase;
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
}

.es2-card-circuit {
  font-size: clamp(7px, 0.7vw, 8px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  opacity: 0.9;
}

.es2-card-title {
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

/* ---------- BARRA AZIONI ---------- */
.es2-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 0.8vw, 10px);
}

.es2-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.6vw, 8px);
  padding: clamp(7px, 0.8vw, 10px) clamp(12px, 1.5vw, 20px);
  border-radius: 50px;
  font-size: clamp(9px, 0.8vw, 11px);
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 80px;
}

.es2-action-btn.primary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #1a1a1a;
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 8px 25px rgba(245,158,11,0.35), inset 0 1px 3px rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.es2-action-btn.primary::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.es2-action-btn.primary:hover::after { opacity: 1; }

.es2-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(245,158,11,0.5), inset 0 1px 3px rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.4);
}

.es2-action-btn.primary.pulse {
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(251,191,36,0); }
}

.es2-action-btn.primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}

.es2-action-btn.primary.disabled:hover { transform: none; box-shadow: none; }
.es2-action-btn.primary.disabled::after { display: none; }

.es2-action-btn.secondary {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.es2-action-btn.secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.es2-action-btn svg {
  width: clamp(13px, 1vw, 16px);
  height: clamp(13px, 1vw, 16px);
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ---------- STATUS PILL ---------- */
.es2-status-pill {
  font-size: clamp(9px, 0.8vw, 10px);
  font-weight: 600;
  padding: clamp(4px, 0.5vw, 6px) clamp(8px, 1vw, 12px);
  border-radius: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  right: clamp(16px, 2vw, 24px);
  z-index: 4;
}

.es2-status-pill.live {
  background: rgba(220,38,38,0.2);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.4);
  animation: statusGlow 2s ease-in-out infinite;
}

.es2-status-pill.open {
  background: rgba(255,204,0,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.4);
}

@keyframes statusGlow {
  0%,100% { box-shadow: 0 0 15px rgba(248,113,113,0.2); }
  50% { box-shadow: 0 0 25px rgba(248,113,113,0.4); }
}

.es2-dot-live {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #f87171;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ========= TOAST ========= */
.es2-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 14px 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.es2-toast-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========= MODAL ========= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 24px);
  color: #fbbf24;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.1); }

/* ========= RESPONSIVE ========= */
@media (max-width: 1024px) {
  .es2-slide-inner {
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(30px, 5vh, 50px) clamp(16px, 3vw, 30px) 0;
  }
  
  .es2-info-panel {
    position: relative;
    left: auto; top: auto;
    transform: none;
    max-width: 100%;
    margin-bottom: clamp(14px, 2vh, 20px);
  }
  
  .es2-info-title { font-size: clamp(24px, 4vw, 40px); }
  
  .es2-right-panel {
    position: relative;
    right: auto; bottom: auto;
    width: 100%;
    max-width: 100%;
  }
  
  .es2-cards-scroll { gap: clamp(10px, 1.5vw, 14px); }
  .es2-card { width: clamp(150px, 28vw, 200px); }
  .es2-card-thumb { height: clamp(65px, 11vw, 90px); }
  
  .es2-card.selected { transform: scale(1.04) translateY(-4px) !important; }
  .es2-card.prev,
  .es2-card.next { transform: scale(0.92); opacity: 0.6; }
  .es2-card.far-prev,
  .es2-card.far-next { transform: scale(0.85); opacity: 0.3; }
}

@media (max-width: 768px) {
  .es2-hero { min-height: 550px; }
  
  .es2-slide-overlay {
    background: linear-gradient(180deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.3) 30%, rgba(10,10,10,0.5) 60%, rgba(10,10,10,0.9) 100%);
  }
  
  .es2-info-panel { margin-bottom: clamp(10px, 1.5vh, 14px); }
  .es2-info-title { font-size: clamp(22px, 5vw, 32px); }
  .es2-right-panel { gap: clamp(10px, 1.5vw, 14px); }
  
  .es2-card {
    width: clamp(130px, 32vw, 170px);
    padding: clamp(8px, 1.2vw, 12px);
  }
  
  .es2-card-thumb { height: clamp(55px, 14vw, 80px); }
  .es2-actions-bar { gap: clamp(5px, 0.8vw, 7px); }
  
  .es2-action-btn {
    padding: clamp(6px, 1vw, 8px) clamp(8px, 1.5vw, 14px);
    font-size: clamp(8px, 1vw, 10px);
  }
  
  .es2-card.selected { transform: scale(1.03) translateY(-4px) !important; }
  .es2-card.prev,
  .es2-card.next { transform: scale(0.92); opacity: 0.6; }
  .es2-card.far-prev,
  .es2-card.far-next { transform: scale(0.85); opacity: 0.3; }
  
  .es2-gara-expand-text,
  .es2-desc-expand-text { font-size: 8px; }
  .es2-gara-expand-icon,
  .es2-desc-expand-icon { font-size: 8px; width: 10px; }
  
  .es2-card-today-badge { font-size: 6px; padding: 1px 5px; top: 4px; right: 4px; }
}

@media (max-width: 480px) {
  .es2-hero { min-height: 480px; }
  
  .es2-slide-inner { padding: clamp(20px, 4vh, 30px) clamp(10px, 2vw, 16px) 0; }
  .es2-info-panel { margin-bottom: clamp(6px, 1vh, 10px); gap: 6px; }
  .es2-info-eyebrow { font-size: clamp(8px, 1.2vw, 9px); gap: 5px; }
  .es2-info-title { font-size: clamp(18px, 5vw, 26px); }
  .es2-right-panel { gap: clamp(6px, 1vw, 10px); }
  .es2-cards-scroll { gap: clamp(6px, 1.2vw, 8px); }
  
  .es2-card {
    width: clamp(120px, 42vw, 150px);
    padding: clamp(6px, 1vw, 8px);
    border-radius: clamp(8px, 1.2vw, 10px);
    gap: 3px;
  }
  
  .es2-card-thumb { height: clamp(50px, 16vw, 65px); }
  .es2-card-title { font-size: clamp(11px, 1.8vw, 13px); }
  .es2-card-circuit { font-size: clamp(6px, 1vw, 7px); }
  
  .es2-actions-bar { flex-wrap: wrap; }
  
  .es2-action-btn {
    flex: 1 1 auto;
    min-width: 60px;
    padding: clamp(5px, 1.2vw, 7px) clamp(6px, 1.5vw, 10px);
    font-size: clamp(7px, 1.2vw, 9px);
  }
  
  .es2-gara-giorno { padding: 8px; }
  .es2-partecipanti { padding: 6px; }
  .es2-desc-box { padding: 8px; }
  
  .es2-chip-name { max-width: 50px; font-size: 8px; }
  .es2-chip-avatar-wrapper { width: 22px; height: 22px; }
  .es2-chip-avatar-fallback { font-size: 8px; }
  
  .es2-card.selected { transform: scale(1.04) translateY(-3px) !important; }
  .es2-card.prev,
  .es2-card.next { transform: scale(0.9); opacity: 0.55; }
  .es2-card.far-prev,
  .es2-card.far-next { transform: scale(0.82); opacity: 0.25; }
  
  .es2-gara-expand-text,
  .es2-desc-expand-text { font-size: 7px; gap: 2px; }
  .es2-gara-expand-icon,
  .es2-desc-expand-icon { font-size: 7px; width: 10px; }
  
  .es2-card-today-badge { font-size: 5px; padding: 1px 4px; top: 3px; right: 3px; border-radius: 6px; }
}
/* ═══════════════════════════════════════════════════════
   MODALE PARTECIPA/ISCRIVITI - PREMIUM GT7 STYLE
   ═══════════════════════════════════════════════════════ */

/* ─────────── OVERLAY (senza class .modal — solo #id) ─────────── */
#confirmModal,
#psnModal {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  animation: modalOverlayIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#confirmModal[style*="display: block"],
#confirmModal[style*="display:block"],
#confirmModal[style*="display: flex"],
#confirmModal[style*="display:flex"],
#psnModal[style*="display: block"],
#psnModal[style*="display:block"],
#psnModal[style*="display: flex"],
#psnModal[style*="display:flex"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─────────── DIALOG ─────────── */
#confirmModal .modal-content {
  background: linear-gradient(180deg, #1a1a2e 0%, #111827 100%);
  border-radius: 24px;
  padding: 0;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  color: #fff;
  border: 1px solid rgba(251, 191, 36, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(251, 191, 36, 0.04);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Accento superiore dorato */
#confirmModal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, #fbbf24, transparent);
  z-index: 3;
  opacity: 0.8;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────── HEADER ─────────── */
#confirmModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

#confirmModal .modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 12px;
}

#confirmModal .modal-header h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-radius: 2px;
}

#confirmModal .modal-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  line-height: 1;
}

#confirmModal .modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  transform: rotate(90deg);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* ─────────── BODY / TESTO ─────────── */
#confirmText {
  padding: 28px 28px 20px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  letter-spacing: 0.01em;
}

#confirmText b,
#confirmText strong {
  color: #fbbf24;
  font-weight: 700;
}

#confirmText small {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
}

#confirmText .highlight {
  color: #10b981;
  font-weight: 600;
}

#confirmText .warning {
  color: #ef4444;
  font-weight: 600;
}

/* ─────────── INPUT PIN ─────────── */
#pinInput {
  display: block;
  width: calc(100% - 56px);
  margin: 0 28px 8px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 4px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

#pinInput:focus {
  border-color: #fbbf24;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(251, 191, 36, 0.1),
    0 0 25px rgba(251, 191, 36, 0.08);
}

#pinInput::placeholder {
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 2px;
  font-family: inherit;
}

#pinInput.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ─────────── TOGGLE PIN ─────────── */
#togglePinBtn {
  display: inline-block;
  vertical-align: middle;
  margin: 8px 0 16px 28px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
}

#togglePinBtn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ─────────── PSN INPUT (MODALE PSN+PIN) ─────────── */
#tmpPsnInput {
  display: block;
  width: calc(100% - 56px);
  margin: 0 28px 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 1px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

#tmpPsnInput:focus {
  border-color: #fbbf24;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(251, 191, 36, 0.1),
    0 0 25px rgba(251, 191, 36, 0.08);
}

#tmpPsnInput::placeholder {
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
}

/* ─────────── BOTTONI AZIONE ─────────── */
#confirmModal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 28px 28px;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}

#confirmYes,
#confirmNo {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* Bottone CONFERMA (primario - dorato) */
#confirmYes {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 25px rgba(245, 158, 11, 0.35),
    inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

#confirmYes::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

#confirmYes:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 35px rgba(245, 158, 11, 0.5),
    inset 0 1px 3px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

#confirmYes:hover::after {
  opacity: 1;
}

#confirmYes:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Bottone ANNULLA (secondario - glass) */
#confirmNo {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#confirmNo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#confirmNo:active {
  transform: translateY(0) scale(0.97);
}

/* Bottone DANGER (rosso - annulla partecipazione) */
#confirmYes.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 8px 25px rgba(239, 68, 68, 0.35),
    inset 0 1px 3px rgba(255, 255, 255, 0.15);
}

#confirmYes.btn-danger:hover {
  box-shadow:
    0 12px 35px rgba(239, 68, 68, 0.5),
    inset 0 1px 3px rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

#confirmYes.btn-danger::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

/* ─────────── STATI DISABILITATI ─────────── */
#confirmYes:disabled,
#confirmNo:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─────────── LOADING SPINNER SUL BOTTONE ─────────── */
#confirmYes.loading {
  color: transparent !important;
  pointer-events: none;
}

#confirmYes.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(26, 26, 26, 0.3);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

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

/* ─────────── MESSAGGIO DI ERRORE ─────────── */
.modal-error {
  color: #f87171;
  font-size: 0.8rem;
  text-align: center;
  margin: -4px 28px 12px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.15);
  animation: errorIn 0.3s ease;
}

@keyframes errorIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────── MESSAGGIO DI SUCCESSO ─────────── */
.modal-success {
  color: #10b981;
  font-size: 0.8rem;
  text-align: center;
  margin: -4px 28px 12px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ─────────── SCROLLBAR ─────────── */
#confirmModal .modal-content::-webkit-scrollbar {
  width: 4px;
}

#confirmModal .modal-content::-webkit-scrollbar-track {
  background: transparent;
}

#confirmModal .modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 520px) {
  #confirmModal,
  #psnModal {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #confirmModal .modal-content,
  #psnModal .modal-content {
    border-radius: 18px !important;
    max-height: 85vh;
    margin: 0 auto !important;
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #confirmModal .modal-header {
    padding: 18px 20px 16px;
  }

  #confirmText {
    padding: 20px 20px 16px;
    font-size: 0.9rem;
  }

  #pinInput,
  #tmpPsnInput {
    width: calc(100% - 40px);
    margin: 0 20px 8px;
    padding: 12px 16px;
    font-size: 1rem;
  }

  #confirmModal .modal-actions {
    padding: 16px 20px 20px;
    flex-direction: column;
    gap: 8px;
  }

  #confirmYes,
  #confirmNo {
    width: 100%;
    min-width: auto;
    padding: 12px 20px;
  }
}

@media (max-width: 380px) {
  #confirmModal {
    padding: 8px;
  }

  #confirmModal .modal-content {
    border-radius: 16px 16px 4px 4px;
  }

  #confirmModal .modal-header h2 {
    font-size: 1rem;
  }

  #confirmText {
    font-size: 0.85rem;
  }
}
/* VS reset on /profilo */
#confrontoCounter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.btn-reset-vs {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: #c8d0e0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .78rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-reset-vs:hover {
  border-color: #ffcc00;
  color: #ffcc00;
}


/* ===== SIDEBAR: scroll completo bottoni ===== */
#sidebar {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  max-height: 100dvh;
}
#sidebar .sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,204,0,.45) transparent;
}
#sidebar .sidebar-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
#sidebar .sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,204,0,.4);
  border-radius: 8px;
}
/* collapsed desktop: strip orizzontale in basso / bar */
#sidebar.collapsed .sidebar-scroll {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap;
  align-items: center;
}
@media (max-width: 768px) {
  #sidebar,
  #sidebar.open,
  #sidebar.expanded {
    max-height: 100vh;
    max-height: 100dvh;
  }
  #sidebar .sidebar-scroll {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100dvh - 80px);
  }
}

/* Home arrows: non far scrollare la pagina */
.home-race-arrow,
.banner-prev,
.banner-next {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.home-race-card,
.banner-slider {
  overflow: hidden;
  touch-action: pan-y;
}
.banner-prev,
.banner-next {
  opacity: 0.85 !important;
  pointer-events: auto !important;
}

/* Post adesione modal */
.gt7-post-adesione-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gt7-pa-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(5px);
}
.gt7-pa-box {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: linear-gradient(165deg, #1a1e28, #0c0e14);
  border: 1px solid rgba(255,204,0,.35);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.gt7-pa-box h2 { margin: 0 0 10px; color: #ffcc00; }
.gt7-pa-box p { color: #b8c0d0; font-size: .92rem; line-height: 1.45; margin: 0 0 18px; }
.gt7-pa-actions { display: flex; flex-direction: column; gap: 10px; }
.gt7-pa-actions button { width: 100%; padding: 12px 16px; border-radius: 12px; font-weight: 700; cursor: pointer; }
.gt7-pa-skip {
  margin-top: 12px;
  background: none;
  border: none;
  color: #8a94a8;
  cursor: pointer;
  font-size: .85rem;
  text-decoration: underline;
}

/* Edit profile */
.gt7-edit-profile { max-width: 640px; margin: 0 auto; padding: 12px; }
.gt7-edit-lead { color: #9aa6bd; font-size: .9rem; }
.gt7-edit-card { margin: 14px 0; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.gt7-edit-card h3 { margin: 0 0 12px; font-size: 1rem; color: #ffcc00; }
.gt7-edit-card label { display: block; margin: 10px 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #8a94a8; }
.gt7-edit-card input[type="text"],
.gt7-edit-card input[type="number"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #2a3140; background: #0a0c12; color: #e8eef8;
}
.gt7-edit-check { display: flex !important; align-items: center; gap: 8px; text-transform: none !important; font-size: .9rem !important; color: #c8d0e0 !important; letter-spacing: 0 !important; margin: 8px 0 !important; }
.gt7-edit-note { font-size: .78rem; color: #7a8499; margin-top: 10px; }
.gt7-edit-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gt7-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 40px; }

/* HOF professionale */
.hof-page { max-width: 1100px; margin: 0 auto; padding: 12px 14px 80px; }
.hof-hero {
  border-radius: 18px; padding: 22px 20px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255,204,0,.12), rgba(0,0,0,.4)), #12151c;
  border: 1px solid rgba(255,204,0,.25);
}
.hof-hero h1 { margin: 0 0 8px; font-size: 1.6rem; }
.hof-hero p { margin: 0; color: #b0b8c8; }
.hof-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.hof-tab {
  border: 1px solid #2a3140; background: #12151c; color: #c8d0e0;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem;
}
.hof-tab.on { background: #ffcc00; color: #111; border-color: transparent; }
.hof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hof-card-pro {
  border-radius: 14px; padding: 16px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px;
}
.hof-card-pro .rank { font-size: .75rem; color: #ffcc00; font-weight: 800; letter-spacing: .08em; }
.hof-card-pro .name { font-size: 1.1rem; font-weight: 800; }
.hof-card-pro .meta { font-size: .82rem; color: #9aa6bd; }
.hof-month {
  margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .95rem; color: #ffcc00; font-weight: 700;
}
.hof-race-row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.06); margin-bottom: 8px;
}
.hof-race-row .pos { font-weight: 900; color: #ffcc00; }


/* ===== Home race-actions: no page scroll jump ===== */
.home-race-card .race-actions {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}
.home-race-card .race-actions button {
  touch-action: manipulation;
  position: relative;
  z-index: 6;
}

/* ===== Sidebar collapsed optimized ===== */
#sidebar.collapsed {
  width: auto;
  max-width: 100%;
  min-height: 72px;
  padding: 6px 8px;
}
#sidebar.collapsed .sidebar-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 6px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,204,0,.5) transparent;
}
#sidebar.collapsed .sidebar-scroll::-webkit-scrollbar {
  display: block;
  height: 4px;
}
#sidebar.collapsed .sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,204,0,.45);
  border-radius: 4px;
}
#sidebar.collapsed .menu-item {
  scroll-snap-align: center;
  min-width: 64px !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 18px;
  flex-shrink: 0;
}
#sidebar.collapsed .menu-label {
  font-size: 9px !important;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#sidebar.collapsed .menu-icon,
#sidebar.collapsed .menu-icon img,
#sidebar.collapsed .icon-logo {
  width: 28px !important;
  height: 28px !important;
}



/* ===== F1 Bacheca Trofei ===== */
.f1-bacheca-trofei {
  margin: 16px 0 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(232,93,4,.22), transparent 42%),
    radial-gradient(ellipse at 85% 80%, rgba(6,214,160,.20), transparent 45%),
    linear-gradient(135deg, #1a0a08 0%, #0a1412 45%, #061a14 100%);
  border: 1px solid rgba(232,93,4,.28);
  box-shadow: inset 0 0 40px rgba(6,214,160,.06);
}
.f1-bacheca-head {
  letter-spacing: .06em;
  background: linear-gradient(90deg, rgba(255,204,0,.15), transparent 60%);
}
.f1-bacheca-level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,204,0,.14), rgba(255,204,0,.03));
  border: 1px solid rgba(255,204,0,.28);
  color: #ddd;
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.f1-bacheca-level b {
  color: #ffcc00;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.f1-bacheca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  padding: 12px 16px 20px;
}
.f1-trophy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px 16px;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(255,255,255,.07) 0%, rgba(0,0,0,.35) 100%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: hidden;
}
.f1-trophy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--f1-accent, #ffcc00) 12%, transparent));
  pointer-events: none;
}
.f1-trophy-card.is-on {
  border-color: color-mix(in srgb, var(--f1-accent, #ffcc00) 60%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--f1-accent, #ffcc00) 22%, transparent),
    0 14px 32px rgba(0,0,0,.5),
    0 0 24px color-mix(in srgb, var(--f1-accent, #ffcc00) 18%, transparent);
}
.f1-trophy-card.is-off {
  opacity: .5;
  filter: grayscale(.4) brightness(.85);
}
.f1-trophy-card:hover {
  transform: translateY(-4px) scale(1.02);
}
.f1-trophy-cup {
  width: 64px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.f1-cup-svg {
  width: 56px;
  height: 70px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.55));
}
.f1-trophy-body {
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 1;
}
.f1-trophy-name {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #f5f5f5;
  line-height: 1.2;
  min-height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.f1-trophy-rim {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: color-mix(in srgb, var(--f1-accent, #ffcc00) 80%, #fff);
  opacity: .85;
  margin-top: 2px;
}
.f1-trophy-val {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--f1-accent, #ffcc00);
  text-shadow: 0 0 14px color-mix(in srgb, var(--f1-accent, #ffcc00) 40%, transparent);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .f1-bacheca-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px 12px 16px;
  }
  .f1-trophy-cup { width: 52px; height: 66px; }
  .f1-cup-svg { width: 46px; height: 58px; }
  .f1-trophy-name { font-size: .62rem; }
}

.f1-trophy-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.55)) drop-shadow(0 0 10px color-mix(in srgb, var(--f1-accent, #ffcc00) 35%, transparent));
}
.f1-trophy-fallback {
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.f1-trophy-cup {
  min-height: 76px;
}


/* ===== Modali F1: sempre centrati (desktop + mobile) ===== */
.modal-overlay,
.modal,
.admin-modal,
.gt7-post-adesione-modal,
#confirmModal,
#psnModal {
  justify-content: center !important;
  align-items: center !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
}

/* Forza flex quando il modal è visibile (JS può impostare display:block) */
.modal[style*="display: block"],
.modal[style*="display:block"],
.modal[style*="display: flex"],
.modal[style*="display:flex"],
.modal.show,
.modal.open,
.modal.is-open,
.admin-modal:not(.hidden),
#confirmModal[style*="display: block"],
#confirmModal[style*="display:block"],
#confirmModal[style*="display: flex"],
#confirmModal[style*="display:flex"],
#psnModal[style*="display: block"],
#psnModal[style*="display:block"],
#psnModal[style*="display: flex"],
#psnModal[style*="display:flex"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modal-overlay {
  align-items: center !important;
}

.modal-box,
.modal-content,
.admin-modal-box,
#confirmModal .modal-content,
#psnModal .modal-content,
.gt7-pa-box {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 auto !important;
  max-width: min(480px, 94vw) !important;
  width: 100% !important;
  max-height: min(85vh, 720px) !important;
  overflow: auto !important;
  border-radius: 18px !important;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .modal-overlay,
  .modal,
  .admin-modal,
  .gt7-post-adesione-modal,
  #confirmModal,
  #psnModal {
    align-items: center !important;
    justify-content: center !important;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
  }
  .modal-box,
  .modal-content,
  .admin-modal-box,
  #confirmModal .modal-content,
  #psnModal .modal-content,
  .gt7-pa-box {
    width: 100% !important;
    max-width: min(440px, 94vw) !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    max-height: min(82vh, 640px) !important;
  }
}

.f1-trophy-img {
  width: 96px !important;
  height: 96px !important;
  object-fit: contain !important;
}
.f1-trophy-cup { min-height: 100px !important; }

/* ===== Filtri eventi: chip desktop, select mobile/tablet ===== */
.filtri-eventi {
  padding: 0 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filtri-eventi-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.filtri-eventi-btns .filtro-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.filtri-eventi-btns .filtro-btn.is-active {
  background: #fbbf24 !important;
  color: #000 !important;
  border-color: #fbbf24;
}
.filtri-eventi-select-wrap {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 6px;
}
.filtri-eventi-select-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a94a8;
  font-weight: 600;
}
.filtri-eventi-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #1a1e28
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23fbbf24' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: #fff;
  border: 1px solid rgba(255, 204, 0, 0.35);
  border-radius: 14px;
  padding: 14px 40px 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  min-height: 48px;
  box-sizing: border-box;
}
.filtri-eventi-select:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}

/* s, l, xl, tablet: solo selettore */
@media (max-width: 1024px) {
  .filtri-eventi-btns {
    display: none !important;
  }
  .filtri-eventi-select-wrap {
    display: flex !important;
  }
}

/* ===== Hall of Trophies: immagini grandi + layout 3+3 (2ª riga) ===== */
.f1-bacheca-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  padding: 16px 16px 24px !important;
}
.f1-trophy-card {
  padding: 22px 12px 18px !important;
  min-height: 200px !important;
}
.f1-trophy-cup {
  width: 120px !important;
  height: 140px !important;
  min-height: 140px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.f1-trophy-img {
  width: 112px !important;
  height: 112px !important;
  max-width: 112px !important;
  max-height: 112px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}
.f1-trophy-fallback {
  font-size: 3.2rem !important;
}
.f1-trophy-name {
  font-size: 0.78rem !important;
  text-align: center !important;
}
.f1-trophy-val {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
}

@media (max-width: 640px) {
  .f1-bacheca-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .f1-trophy-cup {
    width: 96px !important;
    height: 112px !important;
    min-height: 112px !important;
  }
  .f1-trophy-img {
    width: 88px !important;
    height: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
  }
  .f1-trophy-card {
    min-height: 170px !important;
  }
}

@media (min-width: 900px) {
  .f1-trophy-cup {
    width: 140px !important;
    height: 160px !important;
    min-height: 160px !important;
  }
  .f1-trophy-img {
    width: 128px !important;
    height: 128px !important;
    max-width: 128px !important;
    max-height: 128px !important;
  }
}


.filtri-eventi{padding:0 20px;margin-bottom:20px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.filtri-eventi-btns{display:flex;flex-wrap:wrap;gap:8px;width:100%}
.filtri-eventi-btns .filtro-btn{padding:8px 16px;border-radius:20px;border:1px solid #444;background:#222;color:#fff;cursor:pointer;font-weight:600;font-size:.85rem}
.filtri-eventi-btns .filtro-btn.is-active{background:#fbbf24!important;color:#000!important;border-color:#fbbf24}
.filtri-eventi-select-wrap{display:none;width:100%;flex-direction:column;gap:6px}
.filtri-eventi-select-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:#8a94a8;font-weight:600}
.filtri-eventi-select{width:100%;appearance:none;-webkit-appearance:none;background:#1a1e28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23fbbf24' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;color:#fff;border:1px solid rgba(255,204,0,.35);border-radius:14px;padding:14px 40px 14px 16px;font-size:1rem;font-weight:700;min-height:48px;box-sizing:border-box}
.filtri-eventi-select:focus{outline:none;border-color:#fbbf24;box-shadow:0 0 0 2px rgba(251,191,36,.25)}
@media (max-width:1024px){.filtri-eventi-btns{display:none!important}.filtri-eventi-select-wrap{display:flex!important}}
.nav-eventi-cup{width:86px;height:86px;object-fit:contain;transition:transform .35s ease;filter:drop-shadow(0 4px 12px rgba(255,204,0,.35))}
.nav-eventi-cup.is-swish{animation:cupSwish .55s ease}
@keyframes cupSwish{0%{transform:scale(.7) rotate(-12deg);opacity:.4}55%{transform:scale(1.12) rotate(6deg);opacity:1}100%{transform:scale(1) rotate(0)}}
.es2-sponsor-logos{display:flex;gap:10px;align-items:center;margin:8px 0 4px;flex-wrap:wrap}
.es2-sponsor-logo{height:28px;width:auto;max-width:72px;object-fit:contain;background:rgba(255,255,255,.06);border-radius:8px;padding:4px 6px}
.f1-bacheca-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;padding:16px!important}
@media (max-width:640px){.f1-bacheca-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.f1-trophy-card{text-align:center;padding:16px 10px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-top:2px solid var(--f1-accent,#ffcc00)}
.f1-trophy-card.is-off{opacity:.45;filter:grayscale(.85)}
.f1-trophy-img{width:64px;height:64px;object-fit:contain;margin:0 auto 8px;display:block}
.f1-trophy-name{font-size:.78rem;font-weight:700;color:#e8eef8}
.f1-trophy-val{font-size:1.1rem;font-weight:800;color:var(--f1-accent,#ffcc00);margin-top:4px}
.f1-bacheca-level{display:flex;justify-content:space-between;padding:8px 16px;color:#9aa6bd;font-size:.85rem;border-bottom:1px solid rgba(255,255,255,.06)}
.f1-bacheca-level b{color:#ffcc00}


/* =========================================================
   #confirmModal — sempre centrato (desktop + mobile)
   senza class .modal per evitare conflitti
========================================================= */
#confirmModal {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  background: rgba(0, 0, 0, 0.75) !important;
  display: none;
  justify-content: center !important;
  align-items: center !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
}

#confirmModal[style*="display: flex"],
#confirmModal[style*="display:flex"],
#confirmModal[style*="display: block"],
#confirmModal[style*="display:block"] {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

#confirmModal .modal-content {
  position: relative !important;
  margin: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: min(400px, 92vw) !important;
  max-width: 400px !important;
  background: #0a0a0a !important;
  border-radius: 14px !important;
  padding: 20px !important;
  text-align: center !important;
  border: 1px solid #222 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.55) !important;
  animation: fadeIn .25s ease;
}

@media (max-width: 600px) {
  #confirmModal {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #confirmModal .modal-content {
    width: min(400px, 94vw) !important;
    max-width: 94vw !important;
    border-radius: 14px !important;
    margin: auto !important;
    padding: 20px 16px !important;
  }
  #confirmModal .modal-content::before {
    display: none !important;
  }
}


/* ===== SPONSOR sidebar rimosso ===== */
.sidebar-sponsors,
#sidebarSponsors,
.sidebar-sponsors-label,
.sidebar-sponsors-row {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* immagine centrale quasi a riempire il bottone */
.nav-eventi-cup{width:86px!important;height:86px!important;max-width:90%!important;max-height:82%!important;object-fit:contain!important}
#sidebar.expanded .nav-eventi-cup,#sidebar.open .nav-eventi-cup{width:92px!important;height:92px!important;max-width:90%!important;max-height:84%!important}


/* =========================================================
   CONFIRM MODAL — sempre centrato (desktop + mobile)
   Niente allineamento a sinistra; non dipende da .modal
========================================================= */
#confirmModal {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  display: none;
  box-sizing: border-box !important;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.72) !important;
  /* flex centrato quando visibile */
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transform: none !important;
  float: none !important;
}
#confirmModal[style*="display: flex"],
#confirmModal[style*="display:flex"],
#confirmModal.is-open,
#confirmModal.show {
  display: flex !important;
}
#confirmModal .modal-content,
#confirmModal > div {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 auto !important;
  transform: none !important;
  float: none !important;
  width: min(400px, 92vw) !important;
  max-width: 400px !important;
  max-height: min(88vh, 640px) !important;
  overflow: auto !important;
  background: #0a0a0a !important;
  border-radius: 14px !important;
  padding: 20px !important;
  border: 1px solid #222 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.55) !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
/* se resta class="modal" su altri elementi, non spostare confirm */
.modal:not(#confirmModal) {
  /* lascia regole esistenti per altri modali */
}


/* ===== Gaming Zone Hub modal ===== */
.gmz-hub-modal {
  text-align: center;
  padding: 4px 2px 0;
}
.gmz-hub-modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffcc00;
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.2;
}
.gmz-hub-modal-img {
  display: block;
  width: min(280px, 72vw);
  max-width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
}
.gmz-hub-modal-lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #e8ecf4;
  text-align: center;
}
.gmz-hub-modal-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #b8c0d0;
  text-align: left;
}
.gmz-hub-modal-body b {
  color: #fff;
  font-weight: 700;
}
.gmz-hub-modal-lead b {
  color: #fff;
  font-weight: 700;
}
@media (max-width: 480px) {
  .gmz-hub-modal-title { font-size: 1.15rem; }
  .gmz-hub-modal-img { max-height: 130px; width: min(240px, 78vw); }
  .gmz-hub-modal-lead { font-size: 0.9rem; }
  .gmz-hub-modal-body { font-size: 0.85rem; }
}


/* =========================================================
   FIX ANTI-OVERLAP SIDEBAR (finale, vince su regole precedenti)
========================================================= */
:root {
  --gt7-sidebar-clearance: 200px;
}

#main,
#content {
  box-sizing: border-box !important;
}

#main {
  padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {
  :root {
    --gt7-sidebar-clearance: 210px;
  }
  #app {
    padding-bottom: 0 !important;
  }
  #main {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px)) !important;
  }
  #content {
    padding-bottom: 16px !important;
  }
  /* pagine eventi / hero: lascia spazio sotto */
  .es2-hero,
  #eventiPage,
  #campionatiSection,
  #calendarioSection,
  .hof-page,
  .classifiche-page,
  .profilo-layout,
  .sondaggio-page {
    padding-bottom: 12px !important;
  }
  #gareContainer,
  .pilot-grid,
  .hof-content {
    padding-bottom: 24px !important;
  }
}

@media (max-width: 480px) {
  :root {
    --gt7-sidebar-clearance: 205px;
  }
  #main {
    padding-bottom: calc(var(--gt7-sidebar-clearance) + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  :root {
    --gt7-sidebar-clearance: 150px;
  }
}


/* ===== Bottone Guarda Live (eventi) ===== */
.es2-action-btn.es2-btn-live,
.es2-btn-live {
  background: linear-gradient(135deg, #8B0000, #E10600) !important;
  color: #fff !important;
  border-color: rgba(255,80,80,.5) !important;
  font-weight: 800 !important;
}
.es2-btn-live .es2-dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  margin-right: 6px;
  box-shadow: 0 0 6px #fff;
  animation: gt7LiveDot 1.2s ease-in-out infinite;
}
@keyframes gt7LiveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.btn-live-event {
  background: linear-gradient(135deg, #8B0000, #E10600);
  color: #fff;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(225,6,0,.4);
}

.wizard-container { touch-action: pan-y; }
.wizard-container::after {
  content: "Scorri ← → per cambiare step";
  display: block;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.35);
  margin-top: 10px;
}
@media (min-width: 900px) {
  .wizard-container::after { display: none; }
}
