@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* =========================================
   1. RESET E BACKGROUND PRINCIPALE
   ========================================= */
* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* Sfondo base pulito */
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Proprietà background dinamico solo sul body */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  
  /* Nessuna immagine fissa qui: gestita da index.js */
  
  color: #1a1a1a;
  overflow-x: hidden;
}

/* =========================================
   2. OVERLAY DI CARICAMENTO (SPLASH)
   ========================================= */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.logo-loading {
  width: 200px;
  margin-bottom: 20px;
}

/* =========================================
   3. SCHERMATA DI ABBONAMENTO 
   ========================================= */
#subscription-ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100;
  overflow-y: auto;
  /* Overlay bianco semi-trasparente senza blur per massima nitidezza del fondo */
  background: rgba(255, 255, 255, 0.4);
}

.main-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  width: 90%;
  max-width: 460px;
  border-radius: 48px;
  padding: 40px 30px;
  text-align: center;
  /* Ombra più morbida e "pulita" */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .main-card {
    padding: 30px 20px;
    border-radius: 36px;
  }
}

.card-logo {
  width: 100%;
  max-width: 220px;
  margin-bottom: 25px;
}

.main-card h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  margin: 0 0 15px 0;
  color: #000000;
  letter-spacing: -0.5px;
}

#main-subtitle {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: clamp(0.85rem, 3vw, 0.95rem);
  color: #000000;
  line-height: 1.5;
  margin-bottom: 30px;
  max-width: 400px;
}

/* Testo Sotto Bottone */
.under-button-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 400; /* Regular */
  font-size: 11px;
  color: #666666;
  margin-top: 15px;
  margin-bottom: 0;
}

/* Bottone Rosa */
#subscribeButton {
  font-family: 'Poppins', sans-serif;
  background: #ff258c;
  color: #ffffff;
  border: none;
  width: 100%;
  max-width: 380px;
  padding: 16px;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(255, 37, 140, 0.2);
  transition: all 0.3s ease;
}

#subscribeButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(255, 37, 140, 0.4);
  background: #ff4d9f;
}

#subscribeButton:active {
  transform: translateY(0);
}

/* Info Footer */
.footer-text {
  margin-top: 30px;
  font-size: 0.75rem;
  color: #999;
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
}

/* =========================================
   4. UNITY GAME CONTAINER
   ========================================= */
#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: #000;
}

#unity-canvas {
  display: block;
}



/* =========================================
   5. CONSOLE VIRTUAL (DEBUG TEAMVIEWER)
   ========================================= */
#debug-console {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35vh;
  background: rgba(0, 0, 0, 0.95);
  border-top: 2px solid #ffcc00;
  z-index: 999999 !important; /* Sempre sopra a tutto */
  display: none; /* Attivata via JS con ?console=true */
  flex-direction: column;
  font-family: "Courier New", monospace;
}

.console-header {
  background: #222;
  color: #fff;
  padding: 8px 15px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.console-header button {
  background: #444;
  color: #fff;
  border: none;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
}

#debug-log-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 11px;
  color: #00ff00;
  white-space: pre-wrap;
  line-height: 1.4;
}

.log-error {
  color: #ff4444;
}
.log-warn {
  color: #ffcc00;
}

/* =========================================
   6. SPINNER E ANIMAZIONI
   ========================================= */
.spinner,
.mini-spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #ffcc00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 15px auto;
}

.spinner {
  width: 40px;
  height: 40px;
}
.mini-spinner {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =========================================
   MODAL
   ========================================= */

.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 24px 36px;
    border: none;
    width: max-content;
    max-width: 90%;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.modal-content p {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(13px, 3.5vw, 15px);
    color: #000000;
    margin-top: 5px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 480px) {
    .modal-content {
        border-radius: 40px;
        padding: 30px 15px;
    }
    .modal-buttons {
        flex-direction: column;
    }
}

.modal-buttons button {
    font-family: 'Poppins', sans-serif;
    padding: 12px 30px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 140px;
}

#confirm-subscription {
    background-color: #ff258c;
    color: white;
    box-shadow: 0 10px 20px rgba(255, 37, 140, 0.2);
}

#confirm-subscription:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 37, 140, 0.4);
    background-color: #ff4d9f;
}

#cancel-subscription {
    background-color: #0065f4;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 101, 244, 0.2);
}

#cancel-subscription:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 101, 244, 0.4);
    background-color: #1a7bff;
}
