/* --- Dark Theme Variables --- */
:root {
  --primary: #ff5a5f;
  --primary-dark: #e14e52;
  --accent: #00a699;
  --accent-dark: #008489;
  --dark-bg: #121212;
  --dark-surface: #1e1e1e;
  --dark-card: #252525;
  --dark-border: #333333;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #888888;
  --success: #00c853;
  --warning: #ffab00;
  --error: #cf6679;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Circular", -apple-system, BlinkMacSystemFont, Roboto,
    Helvetica Neue, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.header {
  text-align: center;
  padding: 0px 0px 1px;
}

.logo {
  margin-top: -25px;
  font-size: 2rem;
  font-weight: 800;
  color:#ffaa00d2;
  letter-spacing: 1.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
}
.spa {
  margin-top: -25px;
  font-size: 2rem;
  font-weight: 800;
  color:#ffefd5d2;
  letter-spacing: 1.5px;
}


.card {
  background-color: var(--dark-card);
  border-radius: 20px;
  padding: 10px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--dark-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#test2 {
  border-color: rgba(255, 140, 0, 0.454);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;

  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title1 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffaa00ce;
}

.video-container {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--dark-border);
}

video {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.auth-container {
  text-align: center;
}

.input-group {
  margin-bottom: 24px;
}

input[type="number"],
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--dark-border);
  background-color: rgba(87, 87, 87, 0.6);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.2);
  background-color: rgba(50, 50, 50, 0.8);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: white;
  transition: all 0.3s ease;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 90, 95, 0.4);
}

.btn:disabled {
  background: #3a3a3a;
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--dark-border);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.btn-whatsapp {
  background: var(--dark-border);
  box-shadow: var(--dark-bg);
}

.btn-whatsapp:hover {
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.control-panel {
  display: none;
}

.door-control {
  background: linear-gradient(
    to right,
    rgba(71, 71, 71, 0.432),
    rgba(59, 59, 59, 0.199)
  );
  padding: 24px;
  border-radius: 14px;
  margin: 20px 0;
  border: 1px solid var(--dark-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.door-control:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.door-control h3 {
  color: var(--text-primary);
  margin-bottom: 18px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

.warning-box {
  text-align: center;
  background: linear-gradient(
    to right,
    rgba(42, 26, 26, 0.8),
    rgba(42, 26, 26, 0.6)
  );
  border-left: 4px solid var(--primary);
  padding: 10px;
  border-radius: 12px;
  margin-top: 34px;
  border: 1px solid rgba(255, 90, 95, 0.2);
  animation: pulse-warning 2s infinite;
}

.warning-box h5 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 10px;
  align-items: center;
}

.warning-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.popup-content {
  background: linear-gradient(to bottom, var(--dark-card), var(--dark-surface));
  padding: 32px;
  border-radius: 18px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dark-border);
  position: relative;
  animation: popup-appear 0.3s ease-out;
}

@keyframes popup-appear {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup h2 {
  color: var(--primary);
  margin-bottom: 24px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.popup p {
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.contact-section {
  text-align: center;
  padding: 20px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  margin-top: 18px;
  font-size: 2rem;
  color: white;
  background: linear-gradient(to right, #25d366, #128c7e);
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}

.contact-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.important {
  background: linear-gradient(
    to right,
    rgba(42, 26, 26, 0.8),
    rgba(42, 26, 26, 0.6)
  );
  border: 1px solid rgba(0, 166, 153, 0.3);
  border-radius: 14px;
  padding: 28px;
  margin-top: 30px;
}

.important h3 {
  color: #cc5858;
  text-align: center;
  margin-bottom: 5px;
  font-size: 1.4rem;

  align-items: center;
  justify-content: center;
}

.important p {
  color: var(--text-primary);
  line-height: 1.9;
  text-align: center;
}

.session-expired {
  text-align: center;
  padding: 32px;
  background: linear-gradient(
    to right,
    rgba(70, 30, 30, 0.7),
    rgba(80, 35, 35, 0.7)
  );
  border: 1px solid rgba(255, 90, 95, 0.3);
  border-radius: 14px;
  margin: 24px 0;
}

.session-expired h3 {
  color: var(--primary);
  margin-bottom: 18px;
  font-size: 1.5rem;
}

.session-expired p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.footer {
  bottom: 0;
  margin-top: 40px;
  padding: 24px 24px 0px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--dark-border);
}

.admin-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 10px;
  transition: color 0.3s ease;
  opacity: 0.03;
}

.admin-toggle:hover {
  color: var(--text-primary);
}

.admin-area {
  display: none;
  background-color: var(--dark-card);
  border-radius: 14px;
  padding: 28px;
  margin-top: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--dark-border);
}

.admin-panel {
  margin-top: 24px;
}

.admin-section {
  padding: 10px;
  border-radius: 4px;
  border: 2px solid;
  border-color:rgba(63, 60, 55, 0.454);
  z-index: 9999;
  margin-top: 10px;
  margin-bottom: 28px;
  padding-bottom: 28px;
}

.admin-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-section h3 {
  font-size: 1.3rem;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: var(--primary);
  text-align: center;
  padding: 30px;
}

.expired-overlay h2 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.expired-overlay p {
  font-size: 1.2rem;
  margin-bottom: 32px;
  max-width: 600px;
  color: var(--text-secondary);
}

/* Confirmation popup styles */
.confirmation-popup {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.confirmation-content {
  background: linear-gradient(to bottom, var(--dark-card), var(--dark-surface));
  padding: 32px;
  border-radius: 18px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dark-border);
}

.confirmation-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.confirmation-buttons .btn {
  width: auto;
  min-width: 120px;
}

/* Wifi popup styles */
.wifi-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.wifi-popup:target {
  opacity: 1;
  visibility: visible;
}

.wifi-popup-content {
  background: linear-gradient(to bottom, var(--dark-card), var(--dark-surface));
  padding: 32px;
  border-radius: 18px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dark-border);
}

.wifi-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.wifi-popup-close:hover {
  color: var(--text-primary);
}

.wifi-info {
  margin-top: 20px;
  padding: 20px;
  background-color: rgba(40, 40, 40, 0.6);
  border-radius: 12px;
  border: 1px solid var(--dark-border);
}

.wifi-info strong {
  color: var(--text-primary);
  display: block;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .card {
    padding: 20px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .confirmation-buttons {
    flex-direction: column;
  }

  .door-control {
    padding: 20px;
  }
}

/* Aggiungi questi stili al tuo file CSS */
.admin-section .input-group a {
    color: var(--primary);
    text-decoration: none;
}

.admin-section .input-group a:hover {
    text-decoration: underline;
}

#recentLinksList {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

#recentLinksList div {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

#recentLinksList button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

#recentLinksList button:hover {
    text-decoration: underline;
}
/* .firebase-offline {
  opacity: 0.9;
}

.firebase-offline::before {
  content: "⚠️ Connessione persa";
  position: fixed;
  top: 10px;
  right: 10px;
  background: #ff9900;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  z-index: 10000;
  font-size: 12px;
} */
 