:root {
  --color-bg: #0b0b0b;
  --color-bg-soft: #161616;
  --color-card: rgba(16, 16, 16, 0.96);

  --color-primary: #f5c93b;
  --color-primary-dark: #d6a62d;
  --color-primary-soft: rgba(255, 211, 77, 0.12);

  --color-text: #f5f5f5;
  --color-text-muted: #c7cfdf;
  --color-text-soft: #9ea6b6;

  --color-border: #2c313c;
  --color-border-soft: rgba(255, 255, 255, 0.08);

  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--color-bg);
  min-height: 100vh;
  color: var(--color-text);
}

.register-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 193, 7, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 70% 50%, #161616 0%, #0b0b0b 72%);
}

.register-page::before,
.register-page::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  z-index: 0;
}

.register-page::before {
  top: -90px;
  left: -90px;
  background: linear-gradient(135deg, #d9b13b, #b8860b);
  opacity: 0.95;
}

.register-page::after {
  bottom: -100px;
  right: -100px;
  background: linear-gradient(135deg, #4f596f, #66718a);
  opacity: 0.9;
}

.register-wrapper {
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.register-card {
  display: flex;
  align-items: stretch;
  min-height: 680px;
}

.register-card-single {
  display: block;
  min-height: auto;
}

.register-left {
  width: 100%;
  max-width: 760px;
  background: var(--color-card);
  border-radius: 24px;
  padding: 38px 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.52);
  position: relative;
  z-index: 2;
  margin-top: 36px;
  border: 1px solid rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(10px);
}

.register-left-full {
  max-width: 100%;
  margin-top: 0;
}

.register-header {
  margin-bottom: 24px;
}

.register-header h1 {
  margin: 0 0 10px;
  font-size: 2.5rem;
  color: #ffd34d;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.8px;
  text-shadow: 0 0 8px rgba(255, 211, 77, 0.6);
}

.register-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.alerta {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.alerta-error {
  background: rgba(239, 68, 68, 0.14);
  color: #ffb4b4;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.alerta-ok {
  background: rgba(255, 211, 77, 0.12);
  color: #ffd34d;
  border: 1px solid rgba(255, 211, 77, 0.28);
}

.register-form {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group input[type="tel"] {
  width: 100%;
  border: 1px solid var(--color-border);
  border-left: 3px solid #ffd34d;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
  background: #181818;
  color: #ffffff;
}

.form-group input::placeholder {
  color: var(--color-text-soft);
}

.form-group input:focus {
  border-color: #ffd34d;
  box-shadow: 0 0 0 4px rgba(255, 211, 77, 0.12);
  background: #1c1c1c;
}

.form-group small {
  margin-top: 6px;
  color: var(--color-text-soft);
  font-size: 0.84rem;
}

.contacto-preferencia {
    margin-top: 15px;
}

.contacto-preferencia label {
    color:  var(--color-text-muted);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.opciones-contacto {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.opciones-contacto label {
    color: #ffffff;
    font-size: 13px;
    background: #1a1a1a;
    border: 1px solid #ffcc00;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.opciones-contacto label:hover {
    background: #333333;
}

.opciones-contacto input[type="radio"] {
    margin-right: 6px;
    accent-color: #ffcc00; /* color del radio */
}


.btn-register {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5c93b, #d6a62d);
  color: #101010;
  font-size: 1rem;
  font-weight: 900;
  padding: 15px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 0 20px rgba(255, 211, 77, 0.35);
  margin-top: 24px;
}

.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(255, 211, 77, 0.42);
  background: linear-gradient(135deg, #ffd85a, #ddb43e);
}

.login-link {
  margin-top: 16px;
  text-align: center;
}

.login-link a {
  color: #ffd34d;
  font-weight: 700;
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
  color: #ffe88b;
}

/* =========================
   AVATAR BUILDER
========================= */

.avatar-builder {
  margin-top: 10px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 211, 77, 0.08);
}

.avatar-preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.avatar-preview-box {
  width: 138px;
  height: 138px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 211, 77, 0.55);
  box-shadow: 0 0 24px rgba(255, 211, 77, 0.22);
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-name {
  text-align: center;
  color: #ffd34d;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.avatar-tab {
  border: 1px solid rgba(255, 211, 77, 0.35);
  background: transparent;
  color: #ffd34d;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-tab:hover,
.avatar-tab.active {
  background: rgba(255, 211, 77, 0.12);
  color: #ffffff;
  border-color: #ffd34d;
}

.avatar-panel {
  display: none;
}

.avatar-panel.active {
  display: block;
}

.avatar-help {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--color-text-soft);
}

/* =========================
   AVATAR CAROUSEL
========================= */

.avatar-carousel-wrapper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.avatar-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 211, 77, 0.28);
  background: #181818;
  color: #ffd34d;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.avatar-arrow:hover {
  background: rgba(255, 211, 77, 0.12);
  border-color: #ffd34d;
  transform: scale(1.04);
}

.avatar-arrow i {
  font-size: 1.15rem;
}

.avatar-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.avatar-carousel::-webkit-scrollbar {
  display: none;
}

.avatar-option {
  flex: 0 0 112px;
  width: 112px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #181818;
  border-radius: 18px;
  padding: 8px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.avatar-option:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 211, 77, 0.45);
}

.avatar-option.selected {
  border: 2px solid #ffd34d;
  box-shadow: 0 0 16px rgba(255, 211, 77, 0.18);
}

.avatar-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* =========================
   UPLOAD PANEL
========================= */

.upload-panel-box {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 211, 77, 0.22);
}

#avatar {
  width: 100%;
}

/* =========================
   CAMERA PANEL
========================= */

.camera-box {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 14px;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 211, 77, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.camera-box video,
.camera-box canvas {
  width: 100%;
  display: block;
}

.camera-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn-secondary-panel {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: transparent;
  color: #ffd34d;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(255, 211, 77, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-panel:hover {
  background: rgba(255, 211, 77, 0.12);
  color: #ffffff;
  border-color: #ffd34d;
}

/* =========================
   TOKEN MODAL
========================= */

.token-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.token-modal-content {
  width: 100%;
  max-width: 460px;
  background: rgba(16, 16, 16, 0.98);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 211, 77, 0.12);
}

.token-modal-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #ffd34d;
  font-weight: 900;
}

.token-modal-content p {
  color: var(--color-text-muted);
  line-height: 1.5;
}

.token-modal-content label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.token-modal-content input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-left: 3px solid #ffd34d;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #181818;
  color: #ffffff;
}

.token-modal-content input:focus {
  outline: none;
  border-color: #ffd34d;
  box-shadow: 0 0 0 4px rgba(255, 211, 77, 0.12);
}

.token-modal-content button {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5c93b, #d6a62d);
  color: #101010;
  font-weight: 900;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 211, 77, 0.25);
}

/* =========================
   TABLET
========================= */

@media (max-width: 991.98px) {
  .register-wrapper {
    max-width: 760px;
  }

  .register-left {
    padding: 34px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .avatar-carousel-wrapper {
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
  }

  .avatar-option {
    flex: 0 0 98px;
    width: 98px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 575.98px) {
  .register-page {
    padding: 18px 12px;
  }

  .register-left {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .register-header h1 {
    font-size: 2rem;
  }

  .btn-register {
    font-size: 0.95rem;
  }

  .register-page::before,
  .register-page::after {
    width: 150px;
    height: 150px;
  }

  .avatar-builder {
    padding: 14px;
  }

  .avatar-preview-box {
    width: 116px;
    height: 116px;
  }

  .avatar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .avatar-tab {
    width: 100%;
    text-align: center;
  }

  .avatar-carousel-wrapper {
    grid-template-columns: 1fr;
  }

  .avatar-arrow {
    display: none;
  }

  .avatar-carousel {
    gap: 12px;
    padding-bottom: 6px;
  }

  .avatar-option {
    flex: 0 0 88px;
    width: 88px;
  }

  .camera-actions {
    flex-direction: column;
  }
}