/* ═══════════════════════════════════════════════════════════════════
   AUTH.CSS - Stili unificati Login + Register
   
   Spostati da mobile.main.css + tablet.main.css + desktop.main.css
   Pattern: variabili CSS per breakpoint (come index.css, player.css)
   Mobile-first con media query progressive
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────── CSS Variables per breakpoint ─────────── */
:root {
  /* Card */
  --auth-card-max-w: 400px;
  --auth-card-radius: 20px;
  --auth-card-register-max-w: 420px;

  /* Header */
  --auth-header-pad: 32px 28px 20px;
  --auth-icon-size: 64px;
  --auth-icon-img: 40px;
  --auth-title-size: 18px;
  --auth-subtitle-size: 14px;

  /* Body */
  --auth-body-pad: 28px 28px 28px;

  /* Footer */
  --auth-footer-pad: 20px 28px;

  /* Input */
  --auth-input-pad: 14px 16px;
  --auth-input-font: 15px;
  --auth-input-radius: 10px;
  --auth-label-font: 13px;

  /* Button */
  --auth-btn-pad: 16px 24px;
  --auth-btn-font: 15px;
  --auth-btn-radius: 10px;

  /* Spacing */
  --auth-group-gap: 18px;
  --auth-group-last-gap: 24px;

  /* Colors (semantic) */
  --c-error: #ff6b6b;
  --c-error-soft: rgba(255, 107, 107, 0.1);
  --c-error-border: rgba(255, 107, 107, 0.25);
  --c-error-text: #ff8a8a;
  --c-success: #51cf66;
  --c-success-soft: rgba(82, 196, 126, 0.1);
  --c-success-border: rgba(82, 196, 126, 0.25);
  --c-success-text: #6fd08a;
  --c-warning: #ffa94d;
  --c-info-soft: rgba(255, 201, 50, 0.08);
  --c-info-border: rgba(255, 201, 50, 0.2);
  --c-info-text: #ffd76a;
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED - Elementi comuni Login + Register
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────── SVG Icon base ─────────── */
.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

/* ─────────── Auth Card ─────────── */
.auth-card {
  width: 100%;
  max-width: var(--auth-card-max-w);
  margin: 0 auto;
  background: linear-gradient(165deg, rgba(26, 40, 54, 0.95) 0%, rgba(16, 24, 32, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--auth-card-radius);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ─────────── Card Header ─────────── */
.auth-card__header {
  padding: var(--auth-header-pad);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 201, 50, 0.03) 0%, transparent 100%);
}

.auth-card__icon {
  width: var(--auth-icon-size);
  height: var(--auth-icon-size);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 201, 50, 0.15) 0%, rgba(255, 201, 50, 0.05) 100%);
  border: 1px solid rgba(255, 201, 50, 0.2);
  border-radius: 50%;
  animation: authIconPulse 3s ease-in-out infinite;
}

@keyframes authIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 50, 0.2); }
  50% { box-shadow: 0 0 0 12px rgba(255, 201, 50, 0); }
}

.auth-card__icon img {
  width: var(--auth-icon-img);
  height: var(--auth-icon-img);
  object-fit: contain;
}

.auth-card__title {
  margin: 0;
  font-size: var(--auth-title-size);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.auth-card__subtitle {
  margin: 6px 0 0;
  font-size: var(--auth-subtitle-size);
  color: var(--muted);
  font-weight: 400;
}

/* Body title variants */
.auth-card__title--body {
  margin-bottom: 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 16px;
}

.auth-card__title-link {
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-card__title-link:hover {
  color: #ffe066;
}

.auth-card__title--compact {
  font-size: 18px;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  text-align: center;
}

/* ─────────── Card Body ─────────── */
.auth-card__body {
  padding: var(--auth-body-pad);
}

/* ─────────── Form Groups ─────────── */
.auth-form-group {
  margin-bottom: var(--auth-group-gap);
}

.auth-form-group:last-of-type {
  margin-bottom: var(--auth-group-last-gap);
}

.auth-form-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: var(--auth-label-font);
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.auth-form-label .auth-icon,
.auth-quiz__legend .auth-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--c-accent);
}

/* ─────────── Form Inputs ─────────── */
.auth-form-input {
  width: 100%;
  padding: var(--auth-input-pad);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--auth-input-radius);
  color: var(--c-text);
  font-size: var(--auth-input-font);
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-form-input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.auth-form-input:focus {
  outline: none;
  border-color: var(--c-accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 201, 50, 0.15);
}

/* Input states */
.auth-form-input[aria-invalid="true"] {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.auth-form-input.is-valid {
  border-color: var(--c-success);
  box-shadow: 0 0 0 3px rgba(82, 196, 126, 0.1);
}

/* Select styling */
select.auth-form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa6bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

select.auth-form-input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFC932' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

select.auth-form-input option {
  background: #1a2836;
  color: var(--c-text);
}

/* ─────────── Password Wrapper ─────────── */
.auth-password-wrapper {
  position: relative;
}

.auth-password-wrapper .auth-form-input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--c-accent);
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-password-toggle .auth-icon {
  width: 18px;
  height: 18px;
}

.auth-password-toggle:hover {
  color: var(--c-accent);
  opacity: 1;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Autofill: icona toggle scura su sfondo chiaro del browser */
.auth-password-wrapper .auth-form-input:-webkit-autofill ~ .auth-password-toggle,
.auth-password-wrapper .auth-form-input:autofill ~ .auth-password-toggle {
  color: #222;
  opacity: 0.7;
}

.auth-password-wrapper .auth-form-input:-webkit-autofill ~ .auth-password-toggle:hover,
.auth-password-wrapper .auth-form-input:autofill ~ .auth-password-toggle:hover {
  color: #000;
  opacity: 1;
}

/* Hide native password reveal (Edge/Chrome) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
}

/* ─────────── Submit Button ─────────── */
.auth-submit-btn {
  position: relative;
  width: 100%;
  padding: var(--auth-btn-pad);
  background: linear-gradient(135deg, #FFC932 0%, #e6b52e 100%);
  border: none;
  border-radius: var(--auth-btn-radius);
  color: #101820;
  font-size: var(--auth-btn-font);
  font-weight: 700;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-submit-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 201, 50, 0.35);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-submit-btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* Danger variant */
.auth-submit-btn--danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
}

.auth-submit-btn--danger:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
}

/* ─────────── Loading State (shared login + register) ─────────── */
.auth-submit-btn.is-loading {
  pointer-events: none;
}

.auth-submit-btn .btn-login__spinner,
.auth-submit-btn .btn-register__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(16, 24, 32, 0.2);
  border-top-color: #101820;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

.auth-submit-btn.is-loading .btn-login__text,
.auth-submit-btn.is-loading .btn-register__text {
  visibility: hidden;
}

.auth-submit-btn.is-loading .btn-login__spinner,
.auth-submit-btn.is-loading .btn-register__spinner {
  display: block;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* ─────────── Card Footer ─────────── */
.auth-card__footer {
  padding: var(--auth-footer-pad);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.1);
}

.auth-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--c-text);
}

.auth-link--accent {
  color: var(--c-accent);
  font-weight: 600;
}

.auth-link--accent:hover {
  color: #ffe066;
}

/* ─────────── Error Alert ─────────── */
.auth-alert {
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: authAlertIn 0.3s ease;
}

@keyframes authAlertIn {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.auth-alert--error {
  background: var(--c-error-soft);
  border: 1px solid var(--c-error-border);
  color: var(--c-error-text);
}

.auth-alert--success {
  background: var(--c-success-soft);
  border: 1px solid var(--c-success-border);
  color: var(--c-success-text);
}

.auth-alert--info {
  background: var(--c-info-soft);
  border: 1px solid var(--c-info-border);
  color: var(--c-info-text);
}

.auth-alert__icon {
  flex-shrink: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.auth-alert__text {
  line-height: 1.4;
  text-align: center;
  width: 100%;
}

/* ─────────── Field-level Errors ─────────── */
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-error-text);
  line-height: 1.4;
  animation: authAlertIn 0.2s ease;
}

/* ─────────── Form Hints ─────────── */
.auth-form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ─────────── Info Display (per mostrare dati informativi) ─────────── */
.info-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-display__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-display__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
}

.info-display__value--accent {
  color: var(--c-accent);
}

.info-display__value--link {
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-display__value--link:hover {
  color: #ffe066;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-highlight {
  text-align: center;
  padding: 16px;
  background: rgba(255, 201, 50, 0.12);
  border: 1px solid rgba(255, 201, 50, 0.2);
  border-radius: 10px;
  margin-bottom: 20px;
}

.info-highlight__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.info-highlight__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1.2;
}

.info-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════
   LOGIN SPECIFIC
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────── Remember Me Checkbox ─────────── */
.auth-form-group--inline {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.auth-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-left: -30px;
}

.auth-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-checkbox__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.auth-checkbox__box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #101820;
  border-bottom: 2px solid #101820;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s ease;
}

.auth-checkbox input:checked + .auth-checkbox__box {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.auth-checkbox input:checked + .auth-checkbox__box::after {
  transform: rotate(-45deg) scale(1);
}

.auth-checkbox input:focus-visible + .auth-checkbox__box {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.auth-checkbox__label {
  font-size: 14px;
  color: var(--muted);
}

.auth-checkbox:hover .auth-checkbox__box {
  border-color: rgba(255, 255, 255, 0.4);
}

.auth-checkbox:hover .auth-checkbox__label {
  color: var(--c-text);
}

/* Remember hint tooltip */
.auth-checkbox__hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  margin-top: 2px;
}

/* ─────────── Forgot Password ─────────── */
.auth-forgot-link {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  transition: color 0.2s ease;
}

.auth-forgot-link:hover {
  color: var(--c-text);
}

.auth-forgot-link .auth-icon {
  vertical-align: -2px;
  margin-right: 4px;
}

/* ─────────── Character Counter ─────────── */
.auth-form-hint--counter {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  transition: color 0.2s ease;
}

.auth-form-hint--counter.auth-form-hint--limit {
  color: var(--c-accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   REGISTER SPECIFIC
   ═══════════════════════════════════════════════════════════════════ */

/* Register card wider */
.auth-card--register {
  max-width: var(--auth-card-register-max-w);
}

/* ─────────── Password Strength Bar (5 segments) ─────────── */
.auth-password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
}

.auth-password-strength__segments {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.auth-password-strength__segment {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: background 0.3s ease;
}

/* Strength levels */
.auth-password-strength[data-strength="weak"] .auth-password-strength__segment:nth-child(1) {
  background: var(--c-error);
}

.auth-password-strength[data-strength="medium"] .auth-password-strength__segment:nth-child(1),
.auth-password-strength[data-strength="medium"] .auth-password-strength__segment:nth-child(2) {
  background: var(--c-warning);
}

.auth-password-strength[data-strength="good"] .auth-password-strength__segment:nth-child(1),
.auth-password-strength[data-strength="good"] .auth-password-strength__segment:nth-child(2),
.auth-password-strength[data-strength="good"] .auth-password-strength__segment:nth-child(3) {
  background: var(--c-accent);
}

.auth-password-strength[data-strength="strong"] .auth-password-strength__segment:nth-child(1),
.auth-password-strength[data-strength="strong"] .auth-password-strength__segment:nth-child(2),
.auth-password-strength[data-strength="strong"] .auth-password-strength__segment:nth-child(3),
.auth-password-strength[data-strength="strong"] .auth-password-strength__segment:nth-child(4) {
  background: var(--c-success);
}

.auth-password-strength[data-strength="very-strong"] .auth-password-strength__segment {
  background: #06d6a0;
}

.auth-password-strength__text {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  transition: color 0.3s ease;
}

/* Testo nascosto quando vuoto, visibile solo con contenuto */
.auth-password-strength__text:empty {
  display: none;
}

.auth-password-strength[data-strength="weak"] .auth-password-strength__text {
  color: var(--c-error);
}

.auth-password-strength[data-strength="medium"] .auth-password-strength__text {
  color: var(--c-warning);
}

.auth-password-strength[data-strength="good"] .auth-password-strength__text {
  color: var(--c-accent);
}

.auth-password-strength[data-strength="strong"] .auth-password-strength__text {
  color: var(--c-success);
}

.auth-password-strength[data-strength="very-strong"] .auth-password-strength__text {
  color: #06d6a0;
}

/* ─────────── Quiz Anti-Bot ─────────── */
.auth-quiz {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.auth-quiz__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.auth-quiz__question {
  margin: 12px 0 16px;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.5;
}

.auth-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-quiz__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-quiz__option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-quiz__option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-quiz__option input[type="radio"]:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.auth-quiz__option input[type="radio"]:checked + .auth-quiz__option-text {
  color: var(--c-accent);
  font-weight: 500;
}

.auth-quiz__option-text {
  flex: 1;
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════
   MICRO-ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────── Shake Animation (errore) ─────────── */
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.auth-card--shake {
  animation: authShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ─────────── Success Checkmark ─────────── */
@keyframes authCheckmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.auth-success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-success-soft);
  border: 2px solid var(--c-success);
  animation: authCheckmark 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-success-check .auth-icon {
  color: var(--c-success);
}

/* ─────────── Confetti (celebrazione) ─────────── */
@keyframes authConfettiDrop {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.auth-confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.auth-confetti__piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: authConfettiDrop 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH FOOTER (layout)
   ═══════════════════════════════════════════════════════════════════ */

.auth-footer {
  position: relative;
  z-index: 10;
  padding: 24px 20px;
  text-align: center;
  background: rgba(16, 24, 32, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-footer__social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.auth-social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.auth-social-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.auth-social-link:hover .auth-social-icon {
  opacity: 1;
}

.auth-footer__copy {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.auth-footer__legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.auth-footer__legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer__legal a:hover {
  color: var(--c-accent);
}

.auth-footer__legal span {
  color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-alert,
  .auth-success-check,
  .auth-confetti__piece {
    animation: none;
  }

  .auth-card--shake {
    animation: none;
  }

  .auth-form-input,
  .auth-submit-btn,
  .auth-password-toggle,
  .auth-checkbox__box,
  .auth-password-strength__segment {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE - Tablet (>=700px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 700px) {
  .auth-card--register {
    max-width: 480px;
  }

  .auth-quiz__options {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .auth-quiz__option {
    flex: 1 1 calc(50% - 5px);
  }

  .auth-footer--with-dock {
    padding-bottom: 24px;
  }
}

@media (max-width: 799px) {
  .auth-footer--with-dock {
    padding-bottom: calc(24px + 80px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE - Desktop (>=1280px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  :root {
    --auth-card-max-w: 460px;
    --auth-card-radius: 24px;
    --auth-header-pad: 40px 36px 24px;
    --auth-icon-size: 72px;
    --auth-icon-img: 44px;
    --auth-title-size: 26px;
    --auth-body-pad: 28px 36px 32px;
    --auth-footer-pad: 24px 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   XS - Schermi molto piccoli (<=344px)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 344px) {
  :root {
    --auth-card-max-w: 100%;
    --auth-header-pad: 24px 16px 16px;
    --auth-body-pad: 20px 16px 20px;
    --auth-footer-pad: 16px;
    --auth-title-size: 16px;
    --auth-input-pad: 12px 14px;
    --auth-input-font: 14px;
    --auth-btn-pad: 14px 20px;
  }

  .auth-card {
    border-radius: 16px;
  }

  .auth-quiz__option {
    padding: 10px 12px;
  }
}
