/* Variabili Moderne */
:root {
  --primary-color: #007bff;
  --secondary-color: #4a9fff;
  --accent-color: #0069d9;
  --background-dark: #2d3436;
  --text-dark: #2d3436;
  --text-light: #dfe6e9;
  --card-bg-light: white;
  --card-bg-dark: #2d3436;
  --success-color: #00b894;
  --error-color: #d63031;
  --warning-color: #fdcb6e;
  --border-radius: 12px;
  --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
  --transition-speed: 0.3s;
}

/* Modalità Scura */
body.dark-theme {
  --primary-color: #4a9fff;
  --secondary-color: #007bff;
  --background-dark: #1e272e;
  --card-bg-light: #2d3436;
  --text-dark: #dfe6e9;
  --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Stili Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: var(--text-dark);
  transition: background-color var(--transition-speed), color var(--transition-speed);
  line-height: 1.6;
  min-height: 100vh;
}

body.dark-theme {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Stili Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #007bff, #4a9fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg-light);
  box-shadow: var(--shadow-light);
  transition: background-color var(--transition-speed), transform 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Stili Contenuto Principale */
main {
  flex: 1;
}

section {
  display: none;
}

section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sezione Registrazione */
.register-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 40px;
  background-color: var(--card-bg-light);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
}

.register-container h2 {
  margin-bottom: 30px;
  font-size: 1.8rem;
  color: #007bff;
}

.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #b2bec3;
  font-size: 1.2rem;
}

.input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: none;
  background-color: #f1f2f6;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: box-shadow var(--transition-speed);
}

.input-group input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #007bff;
}

.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.register-btn {
  background: linear-gradient(45deg, #007bff, #4a9fff);
  color: white;
  width: 100%;
}

.register-btn:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3); */
}

.register-btn:active {
  transform: translateY(0);
}

.register-status {
  margin-top: 20px;
  min-height: 24px;
  font-weight: 500;
}

.register-status.error {
  color: var(--error-color);
}

.register-status.success {
  color: var(--success-color);
}

/* Stili Footer */
footer {
  text-align: center;
  padding: 20px 0 10px;
  font-size: 0.9rem;
  color: #b2bec3;
}

/* Animazione di successo */
.success-animation {
  position: relative;
  width: 25px;
  height: 25px;
  display: inline-block;
  margin-left: 10px;
  margin-bottom: -7px
}

.success-animation::before, .success-animation::after {
  content: '';
  position: absolute;
  background-color: var(--success-color);
}

.success-animation::before {
  width: 8px;
  height: 2px;
  left: 5px;
  top: 12px;
  transform: rotate(45deg);
  animation: success-animation-before 0.3s forwards;
}

.success-animation::after {
  width: 15px;
  height: 2px;
  left: 8px;
  top: 10px;
  transform: rotate(-45deg);
  animation: success-animation-after 0.3s forwards;
}

@keyframes success-animation-before {
  0% { width: 0; opacity: 0; }
  100% { width: 8px; opacity: 1; }
}

@keyframes success-animation-after {
  0% { width: 0; opacity: 0; }
  100% { width: 15px; opacity: 1; }
}

/* Link styles */
.mt-3 {
  margin-top: 15px;
}

.mt-3 a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s;
}

.mt-3 a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .register-container {
    padding: 30px 20px;
  }
}