* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  transition: background 0.3s ease, color 0.3s ease;
  overflow: hidden;
}

/* THEME */
.light-theme {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(99, 102, 241, 0.06), transparent 30%),
    linear-gradient(135deg, #f5f7fa 0%, #d8e0ef 100%);
  color: #1a202c;
}

.dark-theme {
  background:
    radial-gradient(circle at 16% 18%, rgba(99, 102, 241, 0.18), transparent 26%),
    radial-gradient(circle at 82% 76%, rgba(56, 189, 248, 0.12), transparent 28%),
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.08), transparent 35%),
    linear-gradient(135deg, #070b16 0%, #0b1220 52%, #10192d 100%);
  color: #f8fafc;
}

/* LAYOUT */
.register-container {
  margin-top: 72px;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  zoom: 0.78;
  overflow: hidden;
}

.register-card {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 26px 72px rgba(2, 6, 23, 0.7),
    0 0 42px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.light-theme .register-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(162, 154, 179, 0.18);
  box-shadow:
    0 20px 48px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(148, 163, 184, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dark-theme .register-card {
  background:
    linear-gradient(180deg, rgba(13, 18, 34, 0.94), rgba(10, 15, 28, 0.98));
  border: 1px solid rgba(79, 70, 229, 0.22);
}

/* LEFT */
.illustration-section {
  position: relative;
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.light-theme .illustration-section {
  background:
    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark-theme .illustration-section {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.98) 100%);
}

.illustration-bg {
  position: absolute;
  inset: 0;
  opacity: 0.16;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  animation: float 18s infinite ease-in-out;
}

.shape-4 {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  top: -50px;
  left: -50px;
}

.shape-5 {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.15);
  bottom: -30px;
  right: -30px;
  animation-delay: 3s;
}

.shape-6 {
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.12);
  top: 52%;
  right: 10%;
  animation-delay: 6s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-28px) scale(1.08);
  }
}

.illustration-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

.logo-section {
  margin-bottom: 36px;
}

.brand-logo-wrap {
  display: inline-flex;
  margin-bottom: 22px;
  text-decoration: none;
}

.brand-logo-side {
  width: 440px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.illustration-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 0 22px rgba(99, 102, 241, 0.18);
}

.illustration-subtitle {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.95;
}

.features-list {
  margin-top: 26px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(9, 14, 26, 0.88));
  border: 1px solid rgba(129, 140, 248, 0.18);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(2, 6, 23, 0.14);
}

.light-theme .feature-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 255, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 18px rgba(15, 23, 42, 0.08);
}

.light-theme .illustration-section .feature-item h4 {
  color: #0f172a;
}

.light-theme .illustration-section .feature-item p {
  color: #475569;
  opacity: 1;
}

.light-theme .illustration-section .feature-icon {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.16), rgba(56, 189, 248, 0.08));
  color: #312e81;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.1);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.26), rgba(56, 189, 248, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.14);
}

.feature-item h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}

/* RIGHT */
.form-section {
  padding: 52px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-box {
  width: 100%;
  max-width: 430px;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  text-decoration: none;
}

.logo-full {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.form-header {
  margin-bottom: 24px;
  text-align: left;
}

.form-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 0 18px rgba(99, 102, 241, 0.12);
}

.light-theme .form-header h1 {
  color: #111827;
}

.dark-theme .form-header h1 {
  color: #f8fafc;
}

.form-header p {
  font-size: 15px;
  margin: 0;
  opacity: 0.75;
}

/* TOP CONTROLS */
.page-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 999;
}

.back-home-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 999;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(circle at 35% 30%, rgba(129, 140, 248, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.98));
  color: #e2e8f0;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.22),
    0 0 18px rgba(99, 102, 241, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.back-home-btn:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(165, 180, 252, 0.52);
  box-shadow:
    0 16px 30px rgba(2, 6, 23, 0.28),
    0 0 28px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.back-home-btn i {
  font-size: 17px;
  line-height: 1;
  transform: translateX(-1px);
  text-decoration: none;
}

.light-theme .back-home-btn {
  background: #ffffff;
  color: #1a202c;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dark-theme .back-home-btn {
  background:
    radial-gradient(circle at 35% 30%, rgba(129, 140, 248, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.98));
  color: #e2e8f0;
}

.theme-toggle,
.language-toggle {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.22),
    0 0 18px rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 0;
}

.language-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle:hover {
  transform: rotate(180deg);
}

.language-toggle img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  filter: blur(0.25px) saturate(0.9) contrast(0.95);
}

.light-theme .theme-toggle,
.light-theme .language-toggle {
  background: #ffffff;
  color: #1a202c;
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.35);
}

.dark-theme .theme-toggle,
.dark-theme .language-toggle {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.98));
  color: #e2e8f0;
  border-color: rgba(99, 102, 241, 0.22);
}

/* FORM */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.light-theme .form-label {
  color: #374151;
}

.dark-theme .form-label {
  color: #e5e7eb;
}

.input-wrapper {
  position: relative;
  transition: transform 0.2s ease;
}

.input-wrapper.focused {
  transform: translateY(-2px);
}

.form-input {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
  padding: 14px 44px 14px 44px;
}

.light-theme .form-input {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

.light-theme .form-input:-webkit-autofill,
.light-theme .form-input:-webkit-autofill:hover,
.light-theme .form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1f2937;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
  box-shadow: 0 0 0px 1000px #ffffff inset;
  caret-color: #1f2937;
}

.light-theme .form-input:focus {
  background: #ffffff;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.dark-theme .form-input {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark-theme .form-input:-webkit-autofill,
.dark-theme .form-input:-webkit-autofill:hover,
.dark-theme .form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc;
  -webkit-box-shadow: 0 0 0px 1000px #0f172a inset;
  box-shadow: 0 0 0px 1000px #0f172a inset;
  caret-color: #f8fafc;
}

.dark-theme .form-input:focus {
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.98), rgba(7, 12, 24, 1));
  border-color: rgba(129, 140, 248, 0.72);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.12),
    0 0 26px rgba(56, 189, 248, 0.12);
}

.form-input::placeholder {
  opacity: 0.72;
}

.dark-theme .form-input::placeholder {
  color: rgba(226, 232, 240, 0.72);
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0.9;
  pointer-events: none;
  color: #64748b;
}

.dark-theme .input-icon {
  color: #cbd5e1;
}

.light-theme .input-icon {
  color: #475569;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.password-toggle:hover {
  opacity: 0.9;
}

/* CHECKBOX */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #667eea;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-text {
  font-size: 14px;
  line-height: 1.5;
}

.link-text {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.link-text:hover {
  text-decoration: underline;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(79, 70, 229, 0.98));
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow:
    0 16px 34px rgba(79, 70, 229, 0.26),
    0 0 24px rgba(124, 58, 237, 0.14);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 42px rgba(79, 70, 229, 0.34),
    0 0 28px rgba(124, 58, 237, 0.2);
}

.btn-primary:disabled {
  cursor: not-allowed;
}

.social-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-secondary {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: rgba(129, 140, 248, 0.28);
  box-shadow:
    0 14px 28px rgba(2, 6, 23, 0.22),
    0 0 18px rgba(99, 102, 241, 0.08);
}

.light-theme .btn-secondary {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.light-theme .btn-secondary:hover {
  background: #f8fafc;
}

.light-theme .btn-primary {
  box-shadow:
    0 12px 24px rgba(79, 70, 229, 0.18),
    0 0 18px rgba(124, 58, 237, 0.08);
}

.light-theme .btn-primary:hover {
  box-shadow:
    0 16px 28px rgba(79, 70, 229, 0.22),
    0 0 22px rgba(124, 58, 237, 0.12);
}

.dark-theme .btn-secondary {
  background: #111827;
  border: 1px solid #334155;
  color: #e5e7eb;
}

.dark-theme .btn-secondary:hover {
  background: #1e293b;
}

/* DIVIDER */
.dividerRegistrationPage {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
}

.dividerRegistrationPage::before,
.dividerRegistrationPage::after {
  content: "";
  flex: 1;
  height: 1px;
}

.light-theme .dividerRegistrationPage::before,
.light-theme .dividerRegistrationPage::after {
  background: #e5e7eb;
}

.dark-theme .dividerRegistrationPage::before,
.dark-theme .dividerRegistrationPage::after {
  background: #334155;
}

.dividerRegistrationPage span {
  padding: 0 14px;
  font-size: 13px;
  opacity: 0.7;
}

/* FOOTER */
.footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.footer-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 700;
}

.footer-link a:hover {
  text-decoration: underline;
}

/* ALERTS */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}

.alert.show {
  display: flex;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.dark-theme .alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.dark-theme .alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* VALIDATION */
.form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.form-input.error {
  border-color: #ef4444 !important;
}

.form-input.error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* PASSWORD STRENGTH */
.password-strength {
  margin-top: 8px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: #e5e7eb;
}

.dark-theme .password-strength {
  background: #334155;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
}

.strength-weak {
  background: #ef4444;
  width: 33%;
}

.strength-medium {
  background: #f59e0b;
  width: 66%;
}

.strength-strong {
  background: #10b981;
  width: 100%;
}

.password-strength-text {
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.8;
}

/* LOADING */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.6s linear infinite;
}

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

/* RESPONSIVE */
@media (max-width: 968px) {
  .register-card {
    grid-template-columns: 1fr;
  }

  .illustration-section {
    display: none;
  }

  .form-section {
    padding: 38px 28px;
  }

  .form-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 520px) {
  .back-home-btn {
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
  }

  body {
    overflow-y: auto;
  }

  .register-container {
    padding: 16px;
    margin-top: 88px;
    min-height: auto;
    zoom: 1;
  }

  .form-section {
    padding: 28px 20px;
  }

  .page-controls {
    top: 16px;
    right: 16px;
    gap: 10px;
  }

  .theme-toggle,
  .language-toggle {
    width: 44px;
    height: 44px;
  }

  .logo-full,
  .brand-logo-side {
    width: 190px;
  }
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.light-theme .modal-box {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.dark-theme .modal-box {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.light-theme .modal-close {
  background: #f3f4f6;
  color: #374151;
}

.dark-theme .modal-close {
  background: #1e293b;
  color: #e5e7eb;
}

.modal-close:hover {
  transform: scale(1.05);
}

.modal-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 18px;
  padding-right: 44px;
}

.modal-content {
  font-size: 14px;
  line-height: 1.75;
}

.modal-content p {
  margin: 0 0 16px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .modal-box {
    padding: 24px 18px 20px;
    border-radius: 16px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-content {
    font-size: 13px;
  }
}

body {
  position: relative;
  overflow-x: hidden;
}

.trading-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
  
  overflow: hidden;
}

.page-controls {
  position: fixed;
  z-index: 20;
}

.register-container {
  position: relative;
  z-index: 2;
}

