:root {
  --primary-color: #0099cc; /* Azzurro */
  --secondary-color: #005a9c;
  --accent-color: #ffc107;
  --light-bg: #f4f4f4;
  --white: #fff;
  --text-color: #333;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --border-radius: 10px;
}

/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-bg);
  background: linear-gradient(to bottom, #005a9c, #ffffff);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px;
}

/* Link e transizione uniforme */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--accent-color);
}

/* Header moderno e sticky */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header-content {
  position: relative;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}
nav ul li {
  margin: 0 20px;
}
nav ul li a {
  font-weight: 600;
  font-size: 18px;
  color: var(--white);
  transition: color 0.3s ease; /* unificazione transizione */
}
nav ul li a:hover {
  color: var(--accent-color);
}
#menu-toggle {
  display: none;
}
.hamburger {
  display: none;
}

/* Main Content */
main {
  max-width: 800px;
  margin: 40px auto;
}

/* Box principale IP */
.ip-main {
  position: relative;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin: 0 auto 40px;
  text-align: center;
  transition: transform 0.3s ease;
}
.ip-main:hover {
  transform: translateY(-5px);
}

/* Titoli e testi */
h1, h2, h3 {
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.extra-box h3 {
  margin-top: 1em; /* Aggiunge spazio sopra l'h3 */
}

#ip-address,
#host {
  display: block;
  width: 100%;
  white-space: nowrap;
  text-align: center;
  color: #2c3e50;
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
}

p {
  margin-bottom: 0;
  font-size: 16px;
}

/* Box extra (Dettagli IP) */
.extra-box {
  border-left: 5px solid var(--primary-color);
  background-color: #e9f7fd;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 40px;
}

/* Dettagli IP in Grid */
.ip-details-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 20px;
  row-gap: 0;
}
.ip-details-list dt {
  text-align: right;
  font-weight: bold;
}
.ip-details-list dd {
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

footer {
  background-color: var(--white);
  padding: 20px;
  text-align: center;
  border-top: 1px solid #ddd;
}
footer p {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-color);
}
.social-icons {
  margin-top: 10px;
}
.social-icons a {
  margin: 0 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}
.social-icons a:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    margin: 0;
    padding: 20px 0;
    z-index: 9999;
  }
  nav ul li {
    margin: 10px 0;
  }
  #menu-toggle:checked ~ nav ul {
    display: block;
  }
  .hamburger {
    display: block;
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 26px;
    color: #fff;
    cursor: pointer;
  }
  nav ul li a {
    font-size: 16px;
  }
  .ip-main,
  .extra-box,
  footer {
    padding: 10px;
  }
  .tab {
    bottom: 100.5% !important;
  }
  body {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  header {
    padding: 27px;
  }
}

/*media query <620*/
@media (max-width: 620px) {
 .ip-main h1 {
    margin-bottom: 33px; /* regola a piacere */
  }
}


/* Caratteristiche del #ip-address */
#ip-address {
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.7),
               2px 2px 2px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, letter-spacing 0.3s ease;
}

/* Caratteristiche del #host */
#host {
  font-family: "Rajdhani", sans-serif;
}

/* Effetto evidenziato cURL */
.highlight-anim {
  background: linear-gradient(90deg, rgba(255,223,88,0.1) 0%, #ffc107 50%, rgba(255,223,88,0.1) 100%);
  background-size: 200% 100%;
  animation: highlight 2s infinite alternate;
  padding: 2px 5px;
  border-radius: 5px;
}
@keyframes highlight {
  from { background-position: 100% 0; }
  to   { background-position: 0 0; }
}

#php-details h2 {
  text-align: center;
}
.api-curl {
  text-align: center;
}

/* SEZIONE GUIDA: struttura per il tasto e il box con la guida */
.toggle-buttons {
  text-align: center;
  margin: 20px 0; /* spazio uguale sopra e sotto il tasto */
}
details.guide-container {
  display: inline-block; /* per mantenere il blocco centrato */
  text-align: center;
}
details.guide-container summary {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px;
  font-size: 16px;
  border-radius: 5px;
  min-width: 120px;
  cursor: pointer;
  background-color: var(--secondary-color);
  color: var(--white);
  text-align: center;
  outline: none;
  transition: background-color 0.3s ease;
}
details.guide-container summary::-webkit-details-marker {
  display: none;
}
details.guide-container[open] summary {
  background-color: var(--accent-color);
}
details.guide-container .extra-box {
  margin-top: 37px;
  margin-bottom: 20px;
  border-left: 5px solid var(--primary-color);
  background-color: #e9f7fd;
  border-radius: 10px; /* arrotonda solo la parte inferiore */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 30px;
  text-align: left;
}
@media (max-width: 768px) {
  details.guide-container summary {
    padding: 8px 15px;
    font-size: 14px;
    margin: 10px auto;
    min-width: 100px;
  }
}
/* Stile per l'etichetta IP posizionata in basso a sinistra */
.tab {
  text-shadow: none;
  position: absolute;
  bottom: 100.5%;  /* Posiziona il badge subito sopra il contenitore #ip-address */
  right: 25px;   /* Regola a destra secondo necessità */
  border-radius: 5px 5px 0 0; /* Arrotonda solo il bordo superiore */
  border: 2px solid var(--secondary-color);
  border-bottom: none;        /* Rimuove il bordo inferiore per non duplicarlo */
  background: #fff;
  color: #333;
  padding: 3px 3px;
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  line-height: 0.8;
}

.switch-link {
  margin-left: 4px;
  /*font-size: 10px;*/
  /*line-height: 1;*/
  text-decoration: none;
  background: var(--secondary-color);
  color: white;
  padding: 5px 5px;
  border-radius: 5px;
  cursor: pointer;
}

#ip-label {
  font-weight: bold;
  font-size: 15px; /* Leggermente più grande rispetto al tasto */
}
