/* ================== */
/* SFONDO ANIMATO TAB UNISCITI - SEZIONE CRITICA */
/* ================== */

/* Container principale tab unisciti */
#unisciti {
  position: relative !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important; /* Forza trasparenza */
}

/* Container sfondo */
.background-container {
  position: fixed !important; /* Cambiato da absolute a fixed */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: -1 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Immagine di sfondo */
.background-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-image: url('./immagini/sfondo2.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  
  /* Animazione di entrata */
  opacity: 0;
  transform: scale(1.1);
  animation: backgroundFadeIn 2s ease-out forwards;
}

/* Overlay scuro */
.background-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  ) !important;
  opacity: 0;
  animation: overlayFadeIn 2.5s ease-out 0.5s forwards;
}

/* Animazioni */
@keyframes backgroundFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes overlayFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Contenuto principale - NESSUN RIQUADRO */
#unisciti .other-tab {
  position: relative !important;
  z-index: 10 !important;
  background: transparent !important; /* Completamente trasparente */
  backdrop-filter: none !important; /* Nessun blur */
  border: none !important; /* Nessun bordo */
  border-radius: 0 !important;
  margin: 40px auto !important;
  padding: 30px !important;
  box-shadow: none !important; /* Nessuna ombra */
  
  /* DIMENSIONI CONTENUTO */
  max-width: 800px !important;
  width: 90% !important;
  min-height: auto !important;
  height: auto !important;
  
  /* Animazione del contenuto */
  opacity: 0;
  transform: translateY(30px);
  animation: contentSlideIn 1.5s ease-out 1s forwards;
}

@keyframes contentSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Testo ottimizzato per sfondo diretto */
#unisciti .other-tab h1 {
  color: #ffffff !important; /* Bianco puro */
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9) !important; /* Ombra nera forte */
  margin-bottom: 20px !important;
  font-weight: bold !important;
  font-size: 2.5rem !important;
  background: rgba(0, 0, 0, 0.6) !important; /* Sfondo nero semitrasparente */
  padding: 15px 25px !important;
  border-radius: 15px !important;
  border: 3px solid #fea500 !important; /* Bordo arancione */
  display: inline-block !important;
}

#unisciti .other-tab p {
  color: #ffffff !important; /* Bianco puro */
  font-weight: 600 !important;
  font-size: 1.2rem !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important; /* Ombra nera forte */
  background: rgba(0, 0, 0, 0.5) !important; /* Sfondo nero semitrasparente */
  padding: 12px 20px !important;
  border-radius: 10px !important;
  margin-bottom: 30px !important;
  border-left: 4px solid #fea500 !important; /* Accento arancione */
}

/* Form direttamente sullo sfondo */
#unisciti .registration-form {
  background: rgba(0, 0, 0, 0.75) !important; /* Sfondo nero semitrasparente */
  backdrop-filter: blur(10px) !important;
  border: 3px solid #fea500 !important; /* Bordo arancione acceso */
  border-radius: 20px !important;
  padding: 30px !important;
  max-width: 500px !important;
  margin: 20px auto !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6) !important; /* Ombra più forte */
}

/* Label per form - STILE GAMING */
#unisciti .form-group label {
  color: #fea500 !important; /* Arancione acceso */
  font-weight: bold !important;
  font-size: 1.1rem !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
  text-transform: uppercase !important; /* Maiuscolo */
  letter-spacing: 1px !important; /* Spaziatura lettere */
  margin-bottom: 10px !important;
}

/* Input e select con stile gaming */
#unisciti .platform-dropdown,
#unisciti .player-id-input {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid #fea500 !important;
  color: #333 !important;
  font-weight: 500 !important;
}

#unisciti .platform-dropdown:focus,
#unisciti .player-id-input:focus {
  border-color: #ff8c00 !important;
  box-shadow: 0 0 10px rgba(254, 165, 0, 0.5) !important;
  background: rgba(255, 255, 255, 1) !important;
}

/* Widget selezione ruoli con sfondo scuro */
#unisciti .role-selection {
  background: rgba(254, 165, 0, 0.9) !important;
  border: 3px solid #fea500 !important;
  color: #000 !important;
  font-weight: bold !important;
  box-shadow: 0 4px 20px rgba(254, 165, 0, 0.3) !important;
}

#unisciti .role-selection:hover {
  background: rgba(255, 140, 0, 0.9) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 25px rgba(254, 165, 0, 0.5) !important;
}

/* Debug: Bordo rosso per vedere se il container è posizionato */
/* 
.background-container {
  border: 3px solid red !important;
}
.background-image {
  border: 2px solid blue !important;
}
*/

/* Responsive */
@media (max-width: 768px) {
  #unisciti {
    padding: 0 !important;
    overflow-x: hidden !important;
  }
  
  #unisciti .other-tab {
    margin: 20px auto !important;
    padding: 20px 10px !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  
  #unisciti .registration-form {
    max-width: 100% !important;
    margin: 15px auto !important;
    padding: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ================== */
/* FINE SEZIONE CRITICA */
/* ================== */
/* Miglioramenti per il titolo */
.other-tab h1 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  color: #2c3e50;
  margin-bottom: 10px;
}

.other-tab p {
  color: #34495e;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
body {
  margin: 0;
  font-family: 'Montserrat';
  color: white;
  transition: background-color 0.5s ease;
}

/* ------------------ */
/* 2. ANIMAZIONI      */
/* ------------------ */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------ */
/* 3. NAVIGAZIONE     */
/* ------------------ */
nav {
  background-color: #fea500;
  display: flex;
  justify-content: center;
  padding: 1em 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  box-sizing: border-box;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 5px;
}

nav a:hover {
  background-color: #be2525;
}

/* --------------------------- */
/* 4. CONTENUTO TABS           */
/* --------------------------- */
.tab-content {
  display: none;
  padding-top: 70px;
  margin: 0;
  min-height: 100vh;
  background: transparent;
}

.tab-content.active {
  display: block;
}

/* --------------------------- */
/* 5. HERO SECTION             */
/* --------------------------- */
.hero-section {
  position: relative;
  min-height: 200vh;
  margin-top: -70px;
  padding-top: 70px;
  background-image: url('immagini/video-poster.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.3) 15%,
    rgba(0,0,0,0.5) 30%,
    rgba(0,0,0,0.6) 40%,
    rgba(0,0,0,0.7) 60%,
    rgba(0,0,0,0.85) 75%,
    rgba(0,0,0,1) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: calc(100vh - 70px);
  animation: fadeSlideIn 1.2s ease-out both;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  padding: 2em;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
}

.hero-text h2 {
  font-size: 2rem;
  margin-top: 0.5em;
  font-weight: 400;
}

/* --------------------------- */
/* 6. GRADIENT CONTENT         */
/* --------------------------- */
.gradient-content {
  position: relative;
  z-index: 2;
  padding: 2em 2em;
  text-align: center;
  color: white;
  min-height: 40vh;
}

.gradient-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1em;
  color: #fea500;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.9);
}

.gradient-content p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto 2em auto;
  line-height: 1.6;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5em;
  border-radius: 0px;
  backdrop-filter: blur(0px);
}

/* --------------------------- */
/* 7. PRESENTAZIONE / CONTENT */
/* --------------------------- */
.content-section {
  background-color: black;
  padding: 5em 0em;
  position: relative;
  z-index: 2;
}

.presentazione {
  padding: 2em;
  background: rgba(176, 6, 6, 0.962);
  border-radius: 12px;
  max-width: 500px;
  margin: auto;
  text-align: center;
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --------------------------- */
/* 8. SEZIONE COMPETIZIONI     */
/* --------------------------- */
.competitions-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 2.5em 2em;
  text-align: center;
  border-top: 3px solid #fea500;
  border-bottom: 3px solid #fea500;
  position: relative;
  overflow: hidden;
}

.competitions-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(254, 165, 0, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.competitions-section h2 {
  font-size: 2.2rem;
  margin-bottom: 1em;
  color: #fea500;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 2;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(254, 165, 0, 0.3); }
  to { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(254, 165, 0, 0.6); }
}

.competitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5em;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.competition-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 15px;
  padding: 1.8em 1.5em;
  border: 2px solid rgba(254, 165, 0, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: fadeInUp 0.8s ease-out both;
}

.competition-card:nth-child(1) { animation-delay: 0.1s; }
.competition-card:nth-child(2) { animation-delay: 0.3s; }
.competition-card:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.competition-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(254, 165, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.competition-card:hover::before {
  opacity: 1;
}

.competition-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: #fea500;
  box-shadow: 0 25px 50px rgba(254, 165, 0, 0.3);
}

.competition-logo {
  font-size: 3rem;
  margin-bottom: 0.8em;
  display: block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.competition-card:hover .competition-logo {
  animation: spin 0.6s ease-in-out;
}

@keyframes spin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  to { transform: rotate(360deg) scale(1); }
}

.competition-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fea500;
  margin-bottom: 0.3em;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.competition-series {
  font-size: 1.1rem;
  color: white;
  opacity: 0.9;
  font-weight: 400;
}

.competition-card:hover .competition-name {
  color: #fff;
  text-shadow: 0 0 10px rgba(254, 165, 0, 0.8);
}

.competition-card:hover .competition-series {
  color: #fea500;
}

/* Effetto particelle */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fea500;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float 4s infinite linear;
  opacity: 0;
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(100px) translateX(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) translateX(50px);
  }
}

/* --------------------------- */
/* 9. ALTRE SEZIONI NERE      */
/* --------------------------- */
/* .black-section,
.other-tab {
  
  color: white;
  min-height: calc(100vh - 70px);
  padding: 3em 2em;
  text-align: center;
} */

.black-section h2,
.other-tab h1 {
  font-size: 2.5rem;
  color: #fea500;
  margin-bottom: 1em;
}

.black-section p,
.other-tab p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2em auto;
  line-height: 1.6;
}

/* --------------------------- */
/* 10. SEZIONE SOCIAL          */
/* --------------------------- */
.social-section {
  background-color: black;
  padding: 2em 1.5em;
  text-align: center;
  border-top: 2px solid #fea500;
}

.social-section h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8em;
  color: #00fec7;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.social-section p {
  font-size: 1rem;
  margin: 0 auto 1.5em auto;
  max-width: 500px;
}

/* --------------------------- */
/* 11. BOTTONI SOCIAL          */
/* --------------------------- */
/* ================== */
/* FIX BOTTONI SOCIAL - SEMPRE VISIBILI */
/* ================== */

/* BOTTONI SOCIAL - STILI CORRETTI */
.social-btn {
  /* IMPORTANTE: Sempre visibili */
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
  
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  
  /* Stili base senza nascondere */
  background: linear-gradient(45deg, #333, #555);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Icone social */
.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* Colori specifici per ogni social - SEMPRE VISIBILI */
.x-btn {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
  border: 2px solid #333 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.ig-btn {
  background: linear-gradient(135deg, #e1306c 0%, #fd1d1d 50%, #f56040 100%) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.yt-btn {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.tiktok-btn {
  background: linear-gradient(135deg, #000000 0%, #ff0050 50%, #00f2ea 100%) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.join-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  animation: pulse 2s infinite !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Effetti hover - SOLO movimento e ombra, NON visibilità */
.social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  /* NON toccare opacity o visibility qui */
}

.x-btn:hover {
  border-color: #555;
  box-shadow: 0 8px 25px rgba(255,255,255,0.1);
}

.ig-btn:hover {
  box-shadow: 0 8px 25px rgba(228, 64, 95, 0.4);
}

.yt-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

.tiktok-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 0, 80, 0.4);
}

.join-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* Animazione per il bottone "Unisciti" */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255, 107, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* Container bottoni social */
.social-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.social-section {
  padding: 2em 1.5em;
  text-align: center;
  position: relative;
  z-index: 0;
  border-top: 2px solid #fea500;
  background: transparent; /* <-- oppure puoi anche non scriverlo, default */
}

.social-section p {
  position: relative;
  z-index: 0;
}

.social-section p {
  font-size: 1rem;
  margin: 0 auto 1.5em auto;
  max-width: 500px;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 350px;
    margin: 0 auto;
  }

  .social-btn {
    min-width: auto;
    padding: 12px 15px;
    font-size: 0.8rem;
  }

  .social-icon {
    width: 16px;
    height: 16px;
  }

  .join-btn {
    grid-column: 1 / -1;
    margin-top: 10px;
  }
}

@media (max-width: 1024px) {
  .social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
  }

  .join-btn {
    grid-column: 1 / -1;
  }
}

/* OVERRIDE per eventuali regole che nascondono i bottoni */
/* .social-btn,
.x-btn,
.ig-btn,
.yt-btn,
.tiktok-btn,
.join-btn {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
} */

/* Debug - Rimuovi dopo aver verificato che funziona */
/*
.social-btn {
  border: 2px solid red !important;
}
*/
/* Reset e stili base */

/* Navigazione */
nav {
  background-color: #fea500;
  display: flex;
  justify-content: center;
  padding: 1em 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  box-sizing: border-box;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 5px;
  cursor: pointer;
}

nav a:hover, nav a.active {
  background-color: #555;
}

/* Tab content */
.tab-content {
  display: none;
  padding-top: 70px;
  margin: 0;
  min-height: 100vh;
  background: black;
}

.tab-content.active {
  display: block;
}

.other-tab {
  background-color: black;
  color: white;
  min-height: calc(100vh - 70px);
  padding: 3em 2em;
  text-align: center;
}

.other-tab h1 {
  font-size: 2.5rem;
  color: #fea500;
  margin-bottom: 1em;
}

.other-tab p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2em auto;
  line-height: 1.6;
}

/* Form di registrazione */
.registration-form {
  max-width: 350px;
  margin: 0 auto;
  background: rgb(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2em;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(254, 165, 0, 0.3);
}

.form-group {
  margin-bottom: 2em;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5em;
  color: #fea500;
  font-weight: bold;
  font-size: 1.1rem;
}

.role-selection {
  background: rgba(254, 165, 0, 0.2);
  border: 2px solid #fea500;
  border-radius: 10px;
  padding: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.role-selection:hover {
  background: rgba(254, 165, 0, 0.3);
  transform: translateY(-2px);
}

.selected-roles {
  margin-top: 1em;
  padding: 1em;
  background: rgba(0, 255, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.selected-roles h4 {
  margin: 0 0 0.5em 0;
  color: #4CAF50;
}

/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

/* Popup Content - ridimensionato */
.popup-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 3px solid #fea500;
  border-radius: 20px;
  padding: 0.5em;
  max-width: 100vw;
  max-height: 80vh;
  width: 500px;
  overflow-y: auto;
  position: relative;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.popup-header {
  text-align: center;
  margin-bottom: 2em;
}

.popup-header h2 {
  color: #fea500;
  font-size: 1.8rem;
  margin-bottom: 0.5em;
}

.popup-header p {
  color: #ccc;
  font-size: 1rem;
  margin: 0;
}

/* Campo da calcio - ora verticale */
.football-field {
  background: linear-gradient(180deg, #2d5016 0%, #4a7c23 50%, #2d5016 100%);
  border: 3px solid white;
  border-radius: 10px;
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 500px;
  margin: 0 auto 2em auto;
  background-image: 
    /* Linea centrale orizzontale */
    linear-gradient(to bottom, white 0%, white 0.5px, transparent 2px),
    /* Cerchio centrale */
    radial-gradient(circle at center, transparent 38px, white 40px, white 42px, transparent 44px),
    /* Area di rigore superiore */
    linear-gradient(to bottom, white 0%,   transparent 0px),
    /* Area di rigore inferiore */
    linear-gradient(to top, rgb(6, 6, 6) 0%, rgb(0, 0, 0) 2px, transparent 2px, transparent 78px,  transparent 80px),
    /* Area piccola superiore */
    linear-gradient(to bottom, white 0%, white 0px, transparent 0px, transparent 0px, white 0px, white 0px, transparent 0px);
    /* Area piccola inferiore */
    /*linear-gradient(to top, white 0%, white 2px, transparent 2px, transparent 38px, white 38px, white 40px, transparent 40px);*/
  background-position: 
    0% 50%,
    center center,
    25% 0%,
    25% 100%,
    35% 0%,
    35% 100%;
  background-size: 
    100% 2px,
    80px 80px,
    50% 80px,
    50% 80px,
    30% 40px,
    30% 40px;
  background-repeat: no-repeat;
}

/* Posizioni giocatori */
.player-position {
  position: absolute;
  width: 40px;
  height: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.player-shirt {
  width: 35px;
  height: 40px;
  background: #fea500;
  border: 0px solid rgb(255, 255, 255);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.7rem;
  color: rgb(255, 255, 255);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
}

.player-shirt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 0px;
  background: white;
  transform: translateX(-50%);
}

.player-label {
  font-size: 0.6rem;
  color: white;
  margin-top: 2px;
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.player-position:hover {
  transform: scale(1.1);
}

.player-position.selected .player-shirt {
  background: #4CAF50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 15px rgba(76, 175, 80, 0.6); }
  50% { box-shadow: 0 0 25px rgba(76, 175, 80, 0.9); }
}

/* Posizionamento formazione 3-4-1-2 verticale */
/* Portiere */
.por { bottom: 15px; left: 42%; transform: translateX(10%); }

/* Difensori centrali (3) */
.dc1 { bottom: 80px; left: 16%; transform: translateX(10%); }
.dc2 { bottom: 80px; left: 42%; transform: translateX(10%); }
.dc3 { bottom: 80px; right: 18%;transform: translateX(10%); }

/* Centrocampisti (4) - CDC CDC ED */
.cdc1 { bottom: 180px; left: 30%; }
.cdc2 { bottom: 180px; right: 30%; }
.ed1 { bottom: 210px; right: 3%; transform: translateX(10%); }
.es1 { bottom: 210px; left: 1%; transform: translateX(10%); }
/* Centrocampista offensivo (1) */
.coc { bottom: 290px; left: 43%; transform: translateX(10%); }

/* Attaccanti (2) */
.att1 { bottom: 380px; left: 30%; }
.att2 { bottom: 380px; right: 30%; }

/* Contatore selezioni */
.selection-counter {
  text-align: center;
  margin-bottom: 1.5em;
  padding: 1em;
  background: rgba(254, 165, 0, 0.1);
  border-radius: 5px;
  border: 1px solid rgba(254, 165, 0, 0.3);
}

.selection-counter h3 {
  margin: 0 0 0.5em 0;
  color: #fea500;
}

.selected-positions {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.selected-position {
  background: #4CAF50;
  color: white;
  padding: 0.3em 0.8em;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Bottoni popup */
.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 2em;
}

.btn {
  padding: 0.8em 1.0em;
  border: none;
  border-radius: 15px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-confirm {
  background: linear-gradient(45deg, #4CAF50, #45a049);
  color: white;
}

.btn-confirm:hover {
  background: linear-gradient(45deg, #45a049, #4CAF50);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-confirm:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-cancel {
  background: linear-gradient(45deg, #f44336, #d32f2f);
  color: white;
}

.btn-cancel:hover {
  background: linear-gradient(45deg, #d32f2f, #f44336);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

/* Close button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fea500;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  color: white;
  transform: rotate(90deg);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #f3a60d;
}

/* Dropdown piattaforma */
.platform-dropdown {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

.platform-dropdown:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.platform-dropdown:hover {
  border-color: #4CAF50;
}

/* Input ID Player */
.player-id-input {
  width: 93%;
  padding: 12px 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  transition: all 0.3s ease;
}

.player-id-input:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.player-id-input::placeholder {
  color: #999;
  font-style: italic;
}

/* Hint per l'input */
.input-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* Animazione per mostrare/nascondere l'input ID */
#playerIdGroup {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

#playerIdGroup.show {
  opacity: 1;
  max-height: 100px;
  display: block !important;
}

/* Stili per la selezione ruoli */
.role-selection {
  padding: 4px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #d38d0a;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-selection:hover {
  border-color: #4CAF50;
  background-color: #f8f8f0;
}

.role-selection.has-selection {
  border: 2px solid #4CAF50;
  background-color: #e8f5e8;
}

.role-selection.has-selection:hover {
  background-color: #d4edda;
}

#roleSelectionContent h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
}

#roleSelectionContent p {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

/* Widget per ruoli selezionati */
.selected-roles-widget {
  width: 100%;
}

.selected-roles-widget h4 {
  margin: 0 0 15px 0;
  color: #2e7d32;
  font-size: 16px;
}

#selectedRolesWidgetList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.role-badge-widget {
  background-color: #4CAF50;
  color: white;
  padding: 8px 8px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.change-roles-hint {
  margin: 0;
  color: #666;
  font-size: 12px;
  font-style: italic;
}

/* Stili per il popup (mantieni gli esistenti e aggiungi questi) */
.selected-role-tag {
  background-color: #4CAF50;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  margin: 0 5px;
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  .background-image {
    background-attachment: scroll; /* Fix per mobile */
  }
  
  .other-tab {
    margin: 10px;
    padding: 20px;
  }

  .popup-content {
    padding: 1em;
    margin: 1em;
    width: 90vw;
  }
  
  .football-field {
    height: 400px;
    max-width: 280px;
  }
  
  .player-position {
    width: 28px;
    height: 38px;
  }
  
  .player-shirt {
    width: 26px;
    height: 30px;
    font-size: 0.55rem;
  }
  
  .player-label {
    font-size: 0.45rem;
  }
  
  .popup-buttons {
    flex-direction: column;
  }
  
  .btn {
    padding: 1em;
  }
  
  .registration-form {
    padding: 15px;
  }
  
  .platform-dropdown,
  .player-id-input {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .form-group label {
    font-size: 14px;
  }
}
/* ================== */
/* CORREZIONI SFONDO UNISCITI */
/* ================== */

/* Container principale tab unisciti - Z-INDEX CORRETTO */
#unisciti {
  position: relative !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
  z-index: 1 !important; /* Z-index basso per stare sotto la nav */
}

/* Container sfondo */
.background-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: -1 !important; /* Sempre dietro a tutto */
  width: 100vw !important;
  height: 100vh !important;
}

/* Immagine di sfondo */
.background-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-image: url('./immagini/sfondo2.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  
  /* Animazione di entrata */
  opacity: 0;
  transform: scale(1.1);
  animation: backgroundFadeIn 2s ease-out forwards;
}

/* Overlay scuro */
.background-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  ) !important;
  opacity: 0;
  animation: overlayFadeIn 2.5s ease-out 0.5s forwards;
}

/* Animazioni */
@keyframes backgroundFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes overlayFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Contenuto principale - Z-INDEX CORRETTO */
#unisciti .other-tab {
  position: relative !important;
  z-index: 2 !important; /* Sopra lo sfondo ma sotto la nav */
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 40px auto !important;
  padding: 30px !important;
  box-shadow: none !important;
  
  /* DIMENSIONI CONTENUTO */
  max-width: 800px !important;
  width: 90% !important;
  min-height: auto !important;
  height: auto !important;
  
  /* Animazione del contenuto */
  opacity: 0;
  transform: translateY(30px);
  animation: contentSlideIn 1.5s ease-out 1s forwards;
}

@keyframes contentSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Testo ottimizzato - COLORI CAMBIATI */
#unisciti .other-tab h1 {
  color: #ffffff !important; /* Arancione invece di bianco */
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9) !important;
  margin-bottom: 20px !important;
  font-weight: bold !important;
  font-size: 2.5rem !important;
  background: rgba(0, 0, 0, 0.86) !important; /* Sfondo più scuro */
  padding: 15px 25px !important;
  border-radius: 15px !important;
  border: 3px solid #fea500 !important;
  display: inline-block !important;
}

#unisciti .other-tab p {
  color: #ffffff !important; /* Arancione più chiaro */
  font-weight: 600 !important;
  font-size: 1.2rem !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
  background: rgba(0, 0, 0, 0.86) !important; /* Sfondo più scuro */
  padding: 12px 20px !important;
  border-radius: 10px !important;
  margin-bottom: 30px !important;
  border-left: 4px solid #fea500 !important;
}

/* Form direttamente sullo sfondo - PIÙ SCURO */
#unisciti .registration-form {
  background: rgba(0, 0, 0,0.86) !important; /* Molto più scuro (era 0.75) */
  backdrop-filter: blur(15px) !important; /* Più blur */
  border: 3px solid #fea500 !important;
  border-radius: 20px !important;
  padding: 30px !important;
  max-width: 500px !important;
  margin: 20px auto !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8) !important; /* Ombra più forte */
}

/* Label per form - STILE GAMING */
#unisciti .form-group label {
  color: #fea500 !important; /* Arancione acceso */
  font-weight: bold !important;
  font-size: 1.1rem !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
  text-transform: uppercase !important; /* Maiuscolo */
  letter-spacing: 1px !important; /* Spaziatura lettere */
  margin-bottom: 10px !important;
}

/* Input e select con stile gaming */
#unisciti .platform-dropdown,
#unisciti .player-id-input {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid #fea500 !important;
  color: #333 !important;
  font-weight: 500 !important;
}

#unisciti .platform-dropdown:focus,
#unisciti .player-id-input:focus {
  border-color: #ff8c00 !important;
  box-shadow: 0 0 10px rgba(254, 165, 0, 0.5) !important;
  background: rgba(255, 255, 255, 1) !important;
}

/* Widget selezione ruoli con sfondo scuro */
#unisciti .role-selection {
  background: rgba(254, 165, 0, 0.9) !important;
  border: 3px solid #fea500 !important;
  color: #000 !important;
  font-weight: bold !important;
  box-shadow: 0 4px 20px rgba(254, 165, 0, 0.3) !important;
}

#unisciti .role-selection:hover {
  background: rgba(255, 140, 0, 0.9) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 25px rgba(254, 165, 0, 0.5) !important;
}

/* CORREZIONE Z-INDEX PER NAVIGAZIONE */
/* Assicurati che la nav sia sempre sopra tutto */
nav {
  z-index: 1000 !important; /* Z-index altissimo per la navigazione */
}

/* Tab content deve stare sotto la nav */
.tab-content {
  z-index: 1 !important;
}

/* Popup deve essere sopra tutto tranne la nav */
.popup-overlay {
  z-index: 999 !important; /* Sotto la nav ma sopra tutto il resto */
}

/* Responsive */
@media (max-width: 768px) {
  .background-image {
    background-attachment: scroll !important;
  }
  
  #unisciti .other-tab {
    margin: 20px auto !important;
    padding: 20px !important;
    width: 95% !important; /* Più stretto su mobile */
    max-width: none !important;
  }
  
  #unisciti .registration-form {
    max-width: none !important;
    margin: 15px auto !important;
    padding: 20px !important;
  }
}
/* Stili per il dropdown competizioni espandibile */

/* DROPDOWNCOMPETIZIONI */
.competitions-dropdown-container {
  width: 100%;
  margin-top: 10px;
}

.dropdown-wrapper {
  position: relative;
  width: 100%;
}

.dropdown-header {
  background: linear-gradient(135deg, #fea500, #ff8c00);
  color: white;
  border: 2px solid #fea500;
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(254, 165, 0, 0.3);
  user-select: none;
}

.dropdown-header:hover {
  background: linear-gradient(135deg, #ff8c00, #fea500);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 165, 0, 0.5);
}

.dropdown-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.dropdown-header.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #fea500;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 100;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dropdown-content.open {
  max-height: 350px;
  overflow-y: auto;
}

.competition-group {
  border-bottom: 1px solid #eee;
}

.competition-group:last-child {
  border-bottom: none;
}

.competition-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  color: #333;
  transition: all 0.3s ease;
  border-bottom: 1px solid #dee2e6;
}

.competition-header:hover {
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
  color: #fea500;
}

.competition-icon {
  font-size: 1.3rem;
}

.competition-name {
  flex: 1;
  font-size: 1.1rem;
}

.expand-arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
  color: #fea500;
}

.expand-arrow.expanded {
  transform: rotate(90deg);
}

.divisions-list {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
}

.divisions-list.expanded {
  max-height: 100px;
  padding: 10px 0;
  overflow-y: auto;
}

.division-option {
  display: flex;
  align-items: center;
  padding: 2px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 12px;
  user-select: none;
}

.division-option:hover {
  background: linear-gradient(135deg, #fff3e0, #ffe0b3);
}

.division-option input[type="radio"] {
  width: 10px;
  height: 10px;
  accent-color: #fea500;
  cursor: pointer;
}

.division-text {
  font-weight: 500;
  color: #333;
  font-size: 1rem;
}

.division-option:hover .division-text {
  color: #fea500;
  font-weight: bold;
}

/* Area competizioni selezionate */
.selected-competitions {
  margin-top: 20px;
  background: rgba(254, 165, 0, 0.1);
  border: 2px solid #fea500;
  border-radius: 12px;
  padding: 20px;
  animation: slideInSelected 0.3s ease-out;
}

@keyframes slideInSelected {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.selected-competitions h4 {
  color: #fea500;
  margin: 0 0 15px 0;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selected-item {
  background: linear-gradient(135deg, #fea500, #ff8c00);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(254, 165, 0, 0.3);
  animation: bounceIn 0.4s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.remove-selected {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-selected:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* Scrollbar personalizzata per il dropdown */
.dropdown-content::-webkit-scrollbar {
  width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
  background: #fea500;
  border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
  background: #ff8c00;
}

/* Responsive */
@media (max-width: 768px) {
  .dropdown-header {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .dropdown-content.open {
    max-height: 280px;
  }
  
  .competition-header {
    padding: 12px 15px;
  }
  
  .division-option {
    padding: 10px 30px;
  }
  
  .selected-competitions {
    padding: 15px;
  }
  
  .selected-item {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}
/* Stili per il campo input dei club */
.clubs-input-container {
  width: 100%;
  margin-top: 10px;
}

.input-wrapper {
  display: flex;
  gap: 0;
  border: 2px solid #fea500;
  border-radius: 12px;
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(254, 165, 0, 0.2);
}

.input-wrapper:focus-within {
  border-color: #ff8c00;
  box-shadow: 0 0 0 4px rgba(254, 165, 0, 0.3);
  transform: translateY(-2px);
}

.clubs-text-input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #333;
  background: transparent;
  font-weight: 500;
}

.clubs-text-input::placeholder {
  color: #999;
  font-style: italic;
}

.add-club-btn {
  background: linear-gradient(135deg, #fea500, #ff8c00);
  color: white;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.add-club-btn:hover {
  background: linear-gradient(135deg, #ff8c00, #e67e00);
  transform: scale(1.05);
}

.add-club-btn:active {
  transform: scale(0.95);
}

.add-icon {
  font-size: 1.4rem;
  font-weight: bold;
}

.input-help {
  display: block;
  margin-top: 8px;
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

/* Lista dei club aggiunti */
.added-clubs-list {
  margin-top: 20px;
  background: rgba(254, 165, 0, 0.08);
  border: 2px solid #fea500;
  border-radius: 12px;
  padding: 20px;
  animation: slideInClubsList 0.4s ease-out;
}

@keyframes slideInClubsList {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.added-clubs-list h4 {
  color: #fea500;
  margin: 0 0 15px 0;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
}

.clubs-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.club-tag {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 10px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
  transition: all 0.3s ease;
  animation: bounceInClub 0.5s ease-out;
  border: 2px solid transparent;
}

@keyframes bounceInClub {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
  }
  70% {
    transform: scale(0.9) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.club-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(44, 62, 80, 0.4);
  border-color: #fea500;
}

.club-name {
  font-weight: bold;
}

.remove-club-btn {
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-club-btn:hover {
  background: #e74c3c;
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
}

/* Animazione di rimozione */
.club-tag.removing {
  animation: bounceOutClub 0.4s ease-in forwards;
}

@keyframes bounceOutClub {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
}

/* Stati di validazione */
.clubs-text-input.error {
  background: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
}

.input-wrapper.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2);
}

.error-message {
  display: block;
  margin-top: 8px;
  color: #e74c3c;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .clubs-text-input {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .add-club-btn {
    padding: 12px 15px;
    min-width: 50px;
  }
  
  .add-icon {
    font-size: 1.2rem;
  }
  
  .added-clubs-list {
    padding: 15px;
  }
  
  .club-tag {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .clubs-tags-container {
    gap: 8px;
  }
  
  .input-help {
    font-size: 0.8rem;
  }
}
/* CALENDARIO */
/* Calendario disponibilità */
.weekly-calendar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 15px 0;
}

.day-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
}

.day-container:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.3);
}

.day-container.selected {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.8), rgba(255, 193, 7, 0.6));
  border-color: #FFD700;
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.day-container.selected .day-name {
  color: #1a1a1a;
  font-weight: bold;
}

.day-container.selected .day-checkbox {
  color: #1a1a1a;
}

.day-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #FFD700;
  transition: color 0.3s ease;
}

.day-checkbox {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.day-container.selected .day-checkbox {
  animation: checkboxPulse 0.6s ease;
}

@keyframes checkboxPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.availability-summary {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 10px;
  border-left: 4px solid #FFD700;
  display: none;
}

.availability-summary.show {
  display: block;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.availability-summary h4 {
  color: #FFD700;
  margin: 0 0 10px 0;
  font-size: 1rem;
}

.selected-days-list {
  color: #fff;
  font-weight: 500;
}

@media (max-width: 768px) {
  .weekly-calendar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .day-container {
    padding: 12px;
  }
  
  .day-name {
    font-size: 0.9rem;
  }
}
/* INPUT TELEFONO E INFO AGGIUNTIVE */
.phone-input {
  width: 100%;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.phone-input:focus {
  outline: none;
  border-color: #FFD700;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.phone-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.phone-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #FFD700;
  border-radius: 8px;
}

.warning-icon {
  font-size: 1.1rem;
  margin-top: 2px;
}

.warning-text {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  font-size: 0.85rem;
}

.additional-info-textarea {
  width: 100%;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  resize: vertical;
  min-height: 100px;
  transition: all 0.3s ease;
}

.additional-info-textarea:focus {
  outline: none;
  border-color: #FFD700;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.additional-info-textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .phone-warning {
    padding: 10px;
  }
  
  .warning-text {
    font-size: 0.8rem;
  }
  
  .additional-info-textarea {
    min-height: 80px;
  }
}
/* BOTTONE CONFERMA */
.submit-section {
  margin-top: 30px;
  text-align: center;
}

.submit-btn {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a;
  border: none;
  border-radius: 15px;
  padding: 18px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #FFA500, #FFD700);
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.submit-btn:hover .submit-icon {
  transform: scale(1.2);
}

.submit-loader {
  width: 20px;
  height: 20px;
  border: 2px solid #1a1a1a;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.submit-message {
  margin-top: 15px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  animation: slideIn 0.5s ease;
}

.submit-message.success {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.3);
  color: #00ff00;
}

.submit-message.error {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #ff6b6b;
}

/* Responsive */
@media (max-width: 768px) {
  .submit-btn {
    padding: 10px 20px;
    font-size: 1rem;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .competition-header {
    padding: 8px 10px;
    min-height: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  .dropdown-header {
    padding: 15px 20px;
    min-height: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  .division-option {
    padding: 7px 10px;
    min-height: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}
/* ================== */
/* SFONDO ANIMATO TAB TROFEI */
/* ================== */

#trofei {
  position: relative !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
  z-index: 1 !important;
}

.background-container-trofei {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: -1 !important;
  width: 100vw !important;
  height: 100vh !important;
}

.background-image-trofei {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-image: url('./immagini/sfondo3.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  
  opacity: 0;
  transform: scale(1.1);
  animation: backgroundFadeIn 2s ease-out forwards;
}

.background-overlay-trofei {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  ) !important;
  opacity: 0;
  animation: overlayFadeIn 2.5s ease-out 0.5s forwards;
}

/* Contenuto tab trofei */
#trofei .other-tab {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  margin: 40px auto !important;
  padding: 30px !important;
  box-shadow: none !important;
  max-width: 800px !important;
  width: 90% !important;
  
  opacity: 0;
  transform: translateY(30px);
  animation: contentSlideIn 1.5s ease-out 1s forwards;
}

#trofei .other-tab h1 {
  color: #ffffff !important;
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9) !important;
  margin-bottom: 20px !important;
  font-weight: bold !important;
  font-size: 2.5rem !important;
  background: rgba(0, 0, 0, 0.86) !important;
  padding: 15px 25px !important;
  border-radius: 15px !important;
  border: 3px solid #fea500 !important;
  display: inline-block !important;
}

#trofei .other-tab p {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
  background: rgba(0, 0, 0, 0.86) !important;
  padding: 12px 20px !important;
  border-radius: 10px !important;
  margin-bottom: 30px !important;
  border-left: 4px solid #fea500 !important;
}

/* Responsive per trofei */
@media (max-width: 768px) {
  .background-image-trofei {
    background-attachment: scroll !important;
  }
  
  #trofei .other-tab {
    margin: 20px auto !important;
    padding: 20px !important;
    width: 95% !important;
  }
}
.trophies-showcase {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

.trophy-category {
  margin-bottom: 50px;
}

.trophy-category h2 {
  color: #FFD700 !important;
  font-size: 1.8rem !important;
  text-align: center !important;
  margin-bottom: 30px !important;
  background: rgba(0, 0, 0, 0.8) !important;
  padding: 15px 30px !important;
  border-radius: 15px !important;
  border: 2px solid #FFD700 !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
}

.trophies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 20px;
}

/* Card Trofei Base */
.trophy-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 3px solid #FFD700;
  border-radius: 20px;
  padding: 25px 20px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.trophy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  transition: left 0.5s ease;
}

.trophy-card:hover::before {
  left: 100%;
}

.trophy-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
  border-color: #FFA500;
}

/* Icone Trofei */
.trophy-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  animation: trophy-glow 3s ease-in-out infinite alternate;
}

@keyframes trophy-glow {
  0% { 
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    transform: scale(1);
  }
  100% { 
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    transform: scale(1.1);
  }
}

.trophy-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trophy-count {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
}

.trophy-record {
  font-size: 0.9rem;
  color: #FFA500;
  margin-bottom: 15px;
  font-style: italic;
}

.trophy-badge {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #000;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Varianti Card */
.trophy-card.championship {
  border-color: #FF6B35;
  background: linear-gradient(145deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.1));
}

.trophy-card.championship .trophy-badge {
  background: linear-gradient(45deg, #FF6B35, #FF8E53);
  color: white;
}

.trophy-card.gold {
  border-color: #FFD700;
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
}

.trophy-card.bronze {
  border-color: #CD7F32;
  background: linear-gradient(145deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1));
}

.trophy-card.bronze .trophy-badge {
  background: linear-gradient(45deg, #CD7F32, #D2691E);
  color: white;
}

.trophy-card.special {
  border-color: #9D4EDD;
  background: linear-gradient(145deg, rgba(157, 78, 221, 0.2), rgba(157, 78, 221, 0.1));
}

.trophy-card.special .trophy-badge {
  background: linear-gradient(45deg, #9D4EDD, #C77DFF);
  color: white;
}

/* Statistiche Finali */
.stats-summary {
  margin-top: 60px;
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid #FFD700;
  border-radius: 20px;
  padding: 40px 30px;
}

.stats-summary h2 {
  color: #FFD700 !important;
  text-align: center !important;
  margin-bottom: 40px !important;
  font-size: 2rem !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.stat-label {
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
  #trofei .other-tab {
    margin: 20px auto !important;
    padding: 15px !important;
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  .trophies-showcase {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
    margin: 0 !important;
  }
  
  .trophy-category {
    width: 100% !important;
    margin-bottom: 40px !important;
  }
  
  .trophy-category h2 {
    width: 95% !important;
    margin: 0 auto 25px auto !important;
    padding: 12px 15px !important;
    font-size: 1.4rem !important;
    box-sizing: border-box !important;
  }
  
  .trophies-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    width: 100% !important;
    padding: 0 10px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  
  .trophy-card {
    padding: 20px 15px !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 320px !important;
    box-sizing: border-box !important;
  }
  
  .trophy-icon {
    font-size: 2.8rem !important;
    margin-bottom: 12px !important;
  }
  
  .trophy-name {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }
  
  .trophy-count {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }
  
  .trophy-record {
    font-size: 0.85rem !important;
    margin-bottom: 12px !important;
  }
  
  .trophy-badge {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
  
  /* Statistiche finali mobile */
  .stats-summary {
    margin: 40px auto 20px auto !important;
    padding: 25px 15px !important;
    width: 95% !important;
    max-width: 350px !important;
    box-sizing: border-box !important;
  }
  
  .stats-summary h2 {
    font-size: 1.5rem !important;
    margin-bottom: 25px !important;
    padding: 10px !important;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
  }
  
  .stat-item {
    padding: 15px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .stat-number {
    font-size: 2.2rem !important;
    margin-bottom: 8px !important;
  }
  
  .stat-label {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
  }
  
  /* Centratura assoluta per dispositivi molto piccoli */
  @media (max-width: 480px) {
    #trofei .other-tab {
      padding: 10px !important;
      margin: 10px auto !important;
    }
    
    .trophies-showcase {
      padding: 5px !important;
    }
    
    .trophy-card {
      max-width: 280px !important;
      padding: 15px 10px !important;
    }
    
    .trophy-category h2 {
      font-size: 1.2rem !important;
      padding: 10px 12px !important;
    }
    
    .stats-summary {
      max-width: 300px !important;
      padding: 20px 10px !important;
    }
  }
}
@media (max-width: 768px) {
  #trofei * {
    box-sizing: border-box !important;
  }
  
  /* Rimuovi eventuali margini laterali nascosti */
  #trofei .other-tab,
  #trofei .trophies-showcase,
  #trofei .trophy-category,
  #trofei .trophies-grid {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Centratura flex per container principali */
  #trofei .trophies-showcase {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #trofei .trophy-category {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
}
/* NOI */
:root {
    --primary-gradient: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    --secondary-gradient: linear-gradient(135deg, #ff8c00 0%, #ff6b35 50%, #ff9500 100%);
    --dark-gradient: linear-gradient(135deg, #0a0a0a 0%, #1f1f1f 100%);
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 140, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-orange: #ff8c00;
    --accent-dark-orange: #ff6b35;
    --accent-light-orange: #ff9500;
    --accent-black: #000000;
    --accent-dark: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    padding: 40px 0;
    position: relative;
    overflow-x: hidden;
    font-weight: 400;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 140, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

header h1 {
    color: white;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 50%, #ff9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', serif;
}

.subtitle {
    color: rgba(255, 140, 0, 0.8);
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 8px;
    font-family: 'Lora', serif;
    font-style: italic;
}

.section {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 140, 0, 0.2);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section:hover {
    border-color: rgba(255, 140, 0, 0.4);
}

.section-header {
    padding: 32px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.3);
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
    font-family: 'Playfair Display', serif;
}

.section[data-section="portieri"] .section-icon {
    background: linear-gradient(135deg, #ff8c00 0%, #ff7043 100%);
}

.section[data-section="difensori"] .section-icon {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b35 100%);
}

.section[data-section="centrocampisti"] .section-icon {
    background: linear-gradient(135deg, #ff7043 0%, #ff8c00 100%);
}

.section[data-section="attaccanti"] .section-icon {
    background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
}

.section[data-section="icons"] .section-icon {
    background: linear-gradient(135deg, #ff8c00 0%, #ff9500 100%);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ff8c00;
    letter-spacing: -0.01em;
    font-family: 'Playfair Display', serif;
}

.toggle-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff8c00;
    font-weight: 300;
    transition: all 0.2s ease;
}

.section.active .toggle-icon {
    transform: rotate(45deg);
    background: rgba(255, 140, 0, 0.2);
    border-color: rgba(255, 140, 0, 0.5);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.section.active .section-content {
    max-height: 3000px;
}

.group-photo {
    padding: 40px;
    text-align: center;
    position: relative;
}

.group-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,140,0,0.3) 50%, transparent 100%);
}

.group-photo img {
    width: 100%;
    max-width: 700px;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.group-caption {
    margin-top: 24px;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 140, 0, 0.9);
    letter-spacing: -0.01em;
    font-family: 'Lora', serif;
    font-style: italic;
}

.players-grid {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.player-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 140, 0, 0.2);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.player-image {
    position: relative;
    margin-bottom: 24px;
}

.player-card img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.player-card h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    font-family: 'Playfair Display', serif;
}

.player-card p {
    color: rgba(255, 140, 0, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: 'Lora', serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .section-header {
        padding: 24px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .players-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 24px;
        padding: 24px;
    }

    .group-photo {
        padding: 24px;
    }

    .group-photo img {
        height: 250px;
    }

    .player-card {
        padding: 24px;
    }

    .player-card img {
        width: 120px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .section-title {
        gap: 12px;
    }

    .section-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .players-grid {
        grid-template-columns: 1fr;
    }

    .toggle-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
/* CSS DA AGGIUNGERE - Competizioni cliccabili */

/* Link competizioni - mantiene tutti gli stili esistenti */
.competition-link {
  /* Eredita tutti gli stili da .competition-card */
  text-decoration: none !important;
  color: inherit !important;
  display: block !important;
  position: relative !important;
  
  /* Effetto cursor pointer */
  cursor: pointer !important;
  
  /* Transizione più evidente al hover per indicare che è cliccabile */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Stato hover più pronunciato per i link */
.competition-link:hover {
  /* Mantiene gli effetti esistenti ma li amplifica leggermente */
  transform: translateY(-12px) scale(1.03) !important;
  box-shadow: 0 30px 60px rgba(254, 165, 0, 0.4) !important;
  border-color: #fea500 !important;
  
  /* Effetto glow più intenso */
  filter: drop-shadow(0 0 20px rgba(254, 165, 0, 0.3)) !important;
}

/* Indicatore di link (visibile solo al hover) */
.link-indicator {
  position: absolute !important;
  bottom: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(10px) !important;
  background: linear-gradient(135deg, #fea500, #ff8c00) !important;
  color: #000 !important;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: bold !important;
  opacity: 0 !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

/* Mostra l'indicatore al hover */
.competition-link:hover .link-indicator {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Effetto click/active */
.competition-link:active {
  transform: translateY(-8px) scale(1.01) !important;
  transition: all 0.1s ease !important;
}

/* Assicurati che il logo non interferisca con il click */
.competition-link .competition-logo {
  pointer-events: none !important;
}

/* Focus accessibile per tastiera */
.competition-link:focus {
  outline: 3px solid #fea500 !important;
  outline-offset: 4px !important;
  border-radius: 15px !important;
}

/* Rimuovi underline se presente */
.competition-link:visited,
.competition-link:link {
  text-decoration: none !important;
}

/* Animazione extra per feedback visivo */
@keyframes competition-click {
  0% { transform: translateY(-10px) scale(1.02); }
  50% { transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(-10px) scale(1.02); }
}

.competition-link:active {
  animation: competition-click 0.2s ease !important;
}

/* Responsive - adatta l'indicatore per mobile */
@media (max-width: 768px) {
  .link-indicator {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    bottom: 10px !important;
  }
  
  /* Su mobile mostra sempre l'indicatore (dato che non c'è hover) */
  .competition-link .link-indicator {
    opacity: 0.8 !important;
    transform: translateX(-50%) translateY(0) !important;
  }
  
  .competition-link:hover .link-indicator {
    opacity: 1 !important;
  }
}

/* Assicurati che tutti gli elementi interni siano non-cliccabili */
.competition-link * {
  pointer-events: none !important;
}

/* Ma il link principale deve essere cliccabile */
.competition-link {
  pointer-events: auto !important;
}
/* ========================================== */
/* MENU MOBILE - AGGIUNGERE ALLA FINE DEL CSS */
/* ========================================== */

/* Logo nella navigazione */
.nav-logo {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: auto;
    display: none; /* Nascosto su desktop */
}

/* Contenitore per i link desktop */
.nav-links {
    display: flex;
    align-items: center;
}

/* Hamburger menu - nascosto su desktop */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1001;
    background: #fea500;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animazione hamburger quando attivo */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Dropdown mobile */
.mobile-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.mobile-dropdown.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fea500, #ff8c00);
    min-width: 200px;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(254, 165, 0, 0.3);
}

.mobile-nav-links a:hover {
    background: linear-gradient(135deg, #ff8c00, #be2525);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(254, 165, 0, 0.5);
}

/* RESPONSIVE - Modifica la nav esistente per mobile */
@media (max-width: 768px) {
    nav {
        justify-content: space-between !important;
        padding-left: 20px !important;
    }

    /* Nascondi i link desktop su mobile */
    nav a {
        display: none !important;
    }

    /* Mostra il logo su mobile */
    .nav-logo {
        display: block !important;
    }

    /* Mostra hamburger menu su mobile */
    .hamburger-menu {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .mobile-nav-links a {
        font-size: 1.2rem;
        padding: 12px 25px;
        min-width: 180px;
    }
}
/* ================== */
/* STILI PAGINA NEWS - AGGIUNGERE ALLA FINE DEL CSS */
/* ================== */

/* Sfondo animato per News */
#news {
    position: relative !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    background: transparent !important;
    z-index: 1 !important;
}

.background-container-news {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: -1 !important;
    width: 100vw !important;
    height: 100vh !important;
}

.background-image-news {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('./immagini/sfondo4.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    
    opacity: 0;
    transform: scale(1.1);
    animation: backgroundFadeIn 2s ease-out forwards;
}

.background-overlay-news {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.5) 100%
    ) !important;
    opacity: 0;
    animation: overlayFadeIn 2.5s ease-out 0.5s forwards;
}

/* Contenuto principale News */
#news .other-tab {
    position: relative !important;
    z-index: 2 !important;
    background: transparent !important;
    margin: 40px auto !important;
    padding: 30px !important;
    max-width: 1000px !important;
    width: 90% !important;
    
    opacity: 0;
    transform: translateY(30px);
    animation: contentSlideIn 1.5s ease-out 1s forwards;
}

/* Header News */
.news-header {
    text-align: center;
    margin-bottom: 40px;
}

#news .news-header h1 {
    color: #ffffff !important;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9) !important;
    margin-bottom: 20px !important;
    font-weight: bold !important;
    font-size: 2.5rem !important;
    background: rgba(0, 0, 0, 0.86) !important;
    padding: 15px 25px !important;
    border-radius: 15px !important;
    border: 3px solid #fea500 !important;
    display: inline-block !important;
}

#news .news-header p {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1.2rem !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
    background: rgba(0, 0, 0, 0.86) !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    margin-bottom: 30px !important;
    border-left: 4px solid #fea500 !important;
}

/* Container Twitter */
.twitter-container {
    background: rgba(0, 0, 0, 0.86) !important;
    backdrop-filter: blur(15px) !important;
    border: 3px solid #fea500 !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin: 20px auto !important;
    max-width: 600px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8) !important;
}

.twitter-container h2 {
    color: #fea500 !important;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline Twitter */
.twitter-timeline {
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    width: 100% !important;
    max-height: 600px !important;
}

/* Loading placeholder */

.loading-placeholder h3 {
    color: #fea500;
    margin-bottom: 15px;
    font-size: 1.3rem;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fallback Twitter */
.twitter-fallback {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid #e74c3c;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: #ffffff;
    margin-top: 20px;
    display: none;
}

.twitter-fallback h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.social-link-btn {
    display: inline-block;
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.social-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
    background: linear-gradient(135deg, #0d8bd9, #1da1f2);
}

/* Container Social CTA */
.social-cta-container {
    background: rgba(0, 0, 0, 0.86) !important;
    backdrop-filter: blur(15px) !important;
    border: 3px solid #fea500 !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin: 30px auto !important;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8) !important;
}

.social-cta-container h2 {
    color: #fea500 !important;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Griglia piattaforme social */
.social-platforms-news {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.social-platform-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(254, 165, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.social-platform-card:hover {
    transform: translateY(-5px);
    border-color: #fea500;
    box-shadow: 0 10px 25px rgba(254, 165, 0, 0.4);
}

.platform-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.platform-name {
    color: #fea500;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.platform-desc {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Responsive News */
@media (max-width: 768px) {
    .background-image-news {
        background-attachment: scroll !important;
    }
    
    #news .other-tab {
        margin: 20px auto !important;
        padding: 20px !important;
        width: 95% !important;
    }

    .twitter-container,
    .social-cta-container {
        padding: 20px !important;
        margin: 15px auto !important;
    }

    #news .news-header h1 {
        font-size: 1.8rem !important;
        padding: 12px 20px !important;
    }

    #news .news-header p {
        font-size: 1rem !important;
        padding: 10px 15px !important;
    }

    .social-platforms-news {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .platform-icon {
        font-size: 2rem;
    }

    .twitter-timeline {
        max-height: 500px !important;
    }
}
.twitter-embed-container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 15px !important;
    overflow: hidden !important;
}

.twitter-embed-container iframe {
    border-radius: 15px !important;
    width: 100% !important;
}
.nav-links a {
  font-family: 'Montserrat', sans-serif; /* scegli il font */
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  padding: 8px 12px;
}

/* Link attivo */
.nav-links a.active {
  color: #fea500;
  border-bottom: 2px solid #fea500;
}
/* di default */
.mobile-tab-title {
  display: none; /* nascosto su desktop */
}

/* su mobile */
@media (max-width: 768px) {
  .nav-logo {
    display: none; /* nasconde logo desktop */
  }
  .mobile-tab-title {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    padding: 8px 12px;
  }
}
/* ================== */
/* VIDEO PLAYER SECTION */
/* ================== */

.video-player-section {
    background-color: black;
    padding: 3em 2em;
    position: relative;
    z-index: 2;
}

.video-player-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 30, 0.8));
    border: 3px solid #fea500;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    overflow: hidden;
    animation: containerPulse 3s ease-in-out infinite alternate;
}

@keyframes containerPulse {
    0% { 
        box-shadow: 
            0 15px 50px rgba(0, 0, 0, 0.6),
            0 0 30px rgba(254, 165, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    100% { 
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 50px rgba(254, 165, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.video-player-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #fea500, #ff8c00, #fea500, #be2525, #fea500);
    background-size: 400% 400%;
    border-radius: 23px;
    z-index: -1;
    animation: glowBorder 4s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes glowBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.video-header {
    text-align: center;
    margin-bottom: 25px;
}

.video-header h3 {
    color: #fea500;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(254, 165, 0, 0.4); }
    100% { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 40px rgba(254, 165, 0, 0.8); }
}

.video-header p {
    color: #cccccc;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Video wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* Overlay iniziale */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(254, 165, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transition: all 0.5s ease;
    cursor: pointer;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Pulsante play centrale */
.play-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: playButtonFloat 3s ease-in-out infinite;
}

@keyframes playButtonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.play-button {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #fea500, #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(254, 165, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: playButtonShine 2s ease-in-out infinite;
}

@keyframes playButtonShine {
    0% { transform: rotate(0deg) translate(-100%, -100%); }
    100% { transform: rotate(360deg) translate(-100%, -100%); }
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 
        0 15px 40px rgba(254, 165, 0, 0.6),
        inset 0 2px 10px rgba(255, 255, 255, 0.4);
}

.play-button:active {
    transform: scale(0.95);
}

.play-icon {
    color: #000;
    font-size: 2.5rem;
    margin-left: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.play-text {
    color: #fea500;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: playTextPulse 2s ease-in-out infinite alternate;
}

@keyframes playTextPulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* Particelle animate */
.video-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fea500;
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
    opacity: 0;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 40%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    left: 60%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    left: 80%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    left: 10%;
    animation-delay: 1s;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(90%) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(0%) scale(0);
    }
}

/* Controlli personalizzati */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 15px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover .custom-controls,
.custom-controls.visible {
    opacity: 1;
}

.progress-container {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fea500, #ff8c00);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fea500;
    border-radius: 50%;
    left: 0%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(254, 165, 0, 0.3);
    color: #fea500;
}

.time-display {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .video-player-section {
        padding: 2em 1em;
    }
    
    .video-player-container {
        padding: 20px 15px;
    }
    
    .video-header h3 {
        font-size: 1.4rem;
    }
    
    .play-button {
        width: 80px;
        height: 80px;
    }
    
    .play-icon {
        font-size: 2rem;
    }
    
    .play-text {
        font-size: 0.9rem;
    }
    
    .custom-controls {
        padding: 10px 15px;
    }
    
    .control-buttons {
        gap: 10px;
    }
    
    .control-btn {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-header h3 {
        font-size: 1.2rem;
    }
    
    .video-header p {
        font-size: 0.9rem;
    }
    
    .play-button {
        width: 70px;
        height: 70px;
    }
    
    .play-icon {
        font-size: 1.8rem;
    }
    
    .play-text {
        font-size: 0.8rem;
    }
}
#youtubeVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Nascondi i controlli nativi di YouTube */
.video-wrapper iframe {
    pointer-events: auto;
}

.video-overlay.hidden + * {
    pointer-events: auto;
}

/* Mobile ottimizzazioni per YouTube */
@media (max-width: 768px) {
    #youtubeVideo {
        border-radius: 15px;
    }
    
    /* Assicura che l'overlay funzioni su mobile */
    .video-overlay {
        z-index: 10;
        -webkit-tap-highlight-color: transparent;
    }
    
    .play-button-container {
        -webkit-tap-highlight-color: transparent;
    }
}


