/* 🔧 Reset e impostazioni generali */
* {
  box-sizing: border-box;
}
body {
  background-color: #fff5f5;
  font-family: Arial, sans-serif;
  color: #a00000;
  text-align: center;
  margin: 0;
}

/* 🔴 Header ciliegia a 3 colonne */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background-color: #a00000;
  padding: 12px 24px;
  border-radius: 0 0 20px 20px;
}

/* 🔵 Logo a sinistra */
.nav-left {
  flex: 0 0 auto;
}
.nav-left .logo {
  width: 100px;
  height: auto;
}

/* 🔴 Titolo al centro */
.nav-center {
  flex: 1 1 auto;
  text-align: center;
}
.nav-center .site-title {
  font-size: 48px;
  color: white;
  margin: 0;
}

/* ⚪ Link utente a destra */
.nav-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-right a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 10px;
}
.nav-right a:hover {
  background-color: #c73232;
  border-radius: 6px;
}

/* 📱 Responsive mobile */
@media (max-width: 600px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .nav-left .logo {
    width: 80px;
  }
  .nav-center .site-title {
    font-size: 32px;
  }
  .nav-right {
    justify-content: flex-end;
    font-size: 13px;
    gap: 10px;
  }
}
/* ✅ Input principale */
.link-input {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  margin: 8px auto;
  display: block;
}

/* ✅ Form per accorciare */
.shorten-form {
  display: flex;
  justify-content: center;
  margin: 20px auto;
}

.input-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 50px;
  background-color: white;
  box-shadow: 0 0 0 1px #ccc;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.input-wrapper input {
  flex: 1;
  border: none;
  padding: 14px 60px 14px 20px;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.input-wrapper button {
  background-color: red;
  color: white;
  padding: 0 25px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 0 50px 50px 0;
  transition: background-color 0.3s ease;
}
.input-wrapper button:hover {
  background-color: darkred;
}

.short-result {
  margin-top: 20px;
  font-size: 18px;
}

.copy-button {
  background-color: #a00000;
  color: white;
  border: none;
  padding: 8px 12px;
  margin-left: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

/* 🎯 Bottoni ciliegia */
.short-btn,
.short-button {
  padding: 10px 24px;
  font-size: 16px;
  background-color: #e83e3e;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: block;
  margin: 16px auto;
  transition: background-color 0.3s ease;
}
.short-btn:hover,
.short-button:hover {
  background-color: #c73333;
}

/* 📦 Form a pillola */
.pill-form {
  max-width: 600px;
  margin: 60px auto;
}
.pill-bar {
  display: flex;
  flex-direction: column;
  background-color: #f2f2f2;
  border-radius: 50px;
  padding: 20px 24px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  gap: 10px;
}
.pill-bar input {
  width: 100%;
  border: 2px solid #e83e3e;
  padding: 14px 20px;
  font-size: 16px;
  background: transparent;
  outline: none;
  border-radius: 30px;
  color: #a00000;
}
.pill-bar input::placeholder {
  font-size: 15px;
  color: #a00000;
}
.pill-bar button {
  background-color: #e83e3e;
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 17px;
  cursor: pointer;
  border-radius: 30px;
  transition: background-color 0.3s ease;
}
.pill-bar button:hover {
  background-color: #c73333;
}

/* 🧾 Dashboard layout */
.dashboard-container {
  display: flex;
  max-width: 1000px;
  margin: 40px auto;
}
.sidebar {
  width: 300px;
  background-color: #bf2f2f;
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.link-list li {
  padding: 10px;
  border-bottom: 1px solid #ffffff33;
  cursor: pointer;
  color: white;
  transition: background-color 0.2s ease;
}
.link-list li:hover {
  background-color: #ffe5e5;
}
.editor-panel {
  flex: 1;
  padding: 20px 40px;
}

/* 🧼 Banner */
.banner {
  margin: 20px 0;
  background-color: #ffe5e5;
  padding: 10px;
}

/* 🍪 Cookie */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background-color: #a00000;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cookie-banner button {
  background-color: white;
  color: #a00000;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.nav-center a {
  text-decoration: none;
  color: inherit;
}
.nav-center a:visited {
  color: inherit;
}

@media screen and (max-width: 768px) {
  .dashboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
  }

  .sidebar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .editor-panel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .pill-bar input[type="url"],
  .pill-bar input[type="text"],
  .pill-bar button {
    font-size: 15px;
    padding: 8px 10px;
    width: 100%;
    margin-top: 0.5rem;
    box-sizing: border-box;
  }

  .button-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

button,
input[type="submit"] {
  padding: 10px 24px;
  font-size: 16px;
  background-color: #e83e3e;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease;
}

button:hover,
input[type="submit"]:hover {
  background-color: #c73333;
}
