/* ======= BASE RESET ======= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f6f8fa;
  color: #212529;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* ======= DARK MODE ======= */
@media (prefers-color-scheme: dark) {
  body {
    background: #161a20;
    color: #e4e7ec;
  }
  header, footer {
    background: #1a1d22 !important;
    color: #fff !important;
  }
}

/* ======= HEADER & FOOTER ======= */
header {
  background: #222;
  color: #fff;
  padding: 18px 0;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: 2em;
}
header nav a {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.04em;
  transition: color 0.18s;
}
header nav a:hover, header nav a:focus {
  color: #4b9efc;
  text-decoration: underline;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 18px 0;
  font-size: 0.95em;
  letter-spacing: 0.01em;
}

/* ======= BUTTONS ======= */
.action-button {
  background: linear-gradient(90deg, #3e74ec 30%, #53a0fd 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 0;
  font-size: 1.13em;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  margin-top: 5px;
  box-shadow: 0 2px 8px #1862e666;
  letter-spacing: 0.01em;
  transition: background .18s, box-shadow .18s, transform .11s;
  display: block;
  text-align: center;
  text-decoration: none;
}
.action-button:hover,
.action-button:focus {
  background: linear-gradient(90deg, #2958be 30%, #4181d7 100%);
  box-shadow: 0 2px 14px #3887ff50;
  transform: translateY(-2px) scale(1.015);
}

/* ======= MAIN ======= */
main {
  min-height: 70vh;
  background: none;
}

/* ======= FORMS: GENERAL ======= */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1em;
  outline: none;
}
/* ======= CREATE PALETTE: CONTAINER & FORM ======= */
.cp-container {
  max-width: 520px;
  margin: 32px auto 48px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px #0001;
  padding: 30px 24px;
  color: #212529;
  transition: background 0.2s, color 0.2s;
}

/* Spaziatura tra gli elementi del form */
.cp-container form > * {
  margin-bottom: 22px;
}

/* ======= DARK MODE ======= */
@media (prefers-color-scheme: dark) {
  .cp-container {
    background: #232733 !important;
    color: #e4e7ec !important;
    box-shadow: 0 4px 32px #000b;
  }
  .cp-label,
  .cp-container label,
  .cp-container input,
  .cp-container textarea,
  .cp-container select {
    color: #e4e7ec !important;
    background: #151924 !important;
    border-color: #404452 !important;
    opacity: 1 !important;
  }
  .cp-container input:focus,
  .cp-container textarea:focus,
  .cp-container select:focus {
    border-color: #84b7f7 !important;
    background: #212533 !important;
  }
  .cp-container *:not(:disabled) {
    opacity: 1 !important;
  }
}




