/* ====================================
   TradIA Exchange - Modern CSS
   Dark Exchange Theme (Binance/Bybit Style)
   ==================================== */

/* ====================================
   EXCHANGE BODY & LAYOUT
   ==================================== */

.exchange-body {
  background: #0b0e11;
  color: #f0f3f7;
  font-family: var(--font-family);
  line-height: 1.5;
  min-height: 100vh;
}

/* ====================================
   EXCHANGE HEADER
   ==================================== */

.exchange-header {
  background: #1e2329;
  border-bottom: 1px solid #2b3139;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 50px;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, #f0b90b 0%, #f6465d 100%);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #f0b90b 0%, #f6465d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  color: #c7ccd0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: #f0b90b;
  background: rgba(240, 185, 11, 0.1);
}

.login-link {
  background: #f0b90b;
  color: #000;
  font-weight: 600;
}

.login-link:hover {
  background: #fbbf24;
  color: #000;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: #c7ccd0;
  transition: all 0.2s ease;
}

/* ====================================
   MAIN CONTENT
   ==================================== */

.main-content {
  padding-top: 50px;
  min-height: 100vh;
}

.register-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 50px);
}

/* ====================================
   FORM PANEL
   ==================================== */

.register-form-panel {
  background: #0b0e11;
  padding: 24px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
}

.form-header {
  text-align: center;
  margin-bottom: 20px;
}

.form-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f0f3f7;
}

.form-header p {
  font-size: 14px;
  color: #c7ccd0;
  margin: 0;
}

/* ====================================
   FORM ELEMENTS
   ==================================== */

.register-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: #c7ccd0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.optional {
  font-size: 12px;
  color: #848e9c;
  font-weight: 400;
}

.input-group input {
  background: #1e2329;
  border: 1px solid #2b3139;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: #f0f3f7;
  transition: all 0.2s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #f0b90b;
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1);
}

.input-group input::placeholder {
  color: #848e9c;
}

/* Password Field */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #848e9c;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #c7ccd0;
}

.eye-icon {
  width: 20px;
  height: 20px;
}

/* Password Strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.strength-meter {
  flex: 1;
  height: 4px;
  background: #2b3139;
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  width: 25%;
  background: #f84960;
}

.strength-fill.fair {
  width: 50%;
  background: #fbbf24;
}

.strength-fill.good {
  width: 75%;
  background: #3b82f6;
}

.strength-fill.strong {
  width: 100%;
  background: #02c076;
}

.strength-text {
  font-size: 12px;
  color: #848e9c;
  white-space: nowrap;
}

/* Referral Field */
.referral-field {
  position: relative;
}

.referral-info {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #848e9c;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.referral-info:hover {
  color: #f0b90b;
}

.referral-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e2329;
  border: 1px solid #f0b90b;
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.referral-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-content h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #f0b90b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tooltip-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tooltip-content li {
  font-size: 12px;
  color: #c7ccd0;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tooltip-content li::before {
  content: '•';
  color: #02c076;
  font-weight: bold;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

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

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #2b3139;
  border-radius: 4px;
  background: #1e2329;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.checkbox-label:hover .checkbox-custom {
  border-color: #f0b90b;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #f0b90b;
  border-color: #f0b90b;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 12px;
  font-weight: 700;
}

.checkbox-text {
  color: #c7ccd0;
}

.link {
  color: #f0b90b;
  text-decoration: none;
  font-weight: 500;
}

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

/* Submit Button */
.submit-btn {
  background: linear-gradient(135deg, #f0b90b 0%, #fbbf24 100%);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

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

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
}

.btn-spinner.show {
  display: flex;
}

.btn-text.hidden {
  display: none;
}

.spinner {
  animation: spin 1s linear infinite;
}

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

/* Form Divider */
.form-divider {
  position: relative;
  text-align: center;
  margin: 16px 0;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #2b3139;
}

.form-divider span {
  background: #0b0e11;
  color: #848e9c;
  padding: 0 16px;
  font-size: 14px;
}

/* Social Buttons */
.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-btn {
  background: #1e2329;
  border: 1px solid #2b3139;
  border-radius: 6px;
  padding: 10px 14px;
  color: #c7ccd0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.social-btn:hover {
  border-color: #f0b90b;
  background: rgba(240, 185, 11, 0.05);
}

.social-icon {
  width: 20px;
  height: 20px;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #2b3139;
}

.form-footer p {
  margin: 0;
  font-size: 14px;
  color: #c7ccd0;
}

/* Error & Success Messages */
.error-msg,
.success-msg {
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.error-msg {
  color: #f84960;
}

.success-msg {
  color: #02c076;
}

/* ====================================
   INFO PANEL
   ==================================== */

.register-info-panel {
  background: #1e2329;
  padding: 32px;
  display: flex;
  align-items: center;
  border-left: 1px solid #2b3139;
}

.info-content {
  max-width: 500px;
  margin: 0 auto;
}

.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.hero-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #f0f3f7;
}

.hero-section p {
  font-size: 14px;
  color: #c7ccd0;
  line-height: 1.5;
  margin: 0;
}

/* Features Preview */
.features-preview {
  margin-bottom: 32px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.feature-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #f0f3f7;
}

.feature-text p {
  font-size: 13px;
  color: #c7ccd0;
  margin: 0;
  line-height: 1.4;
}

/* Market Preview */
.market-preview {
  background: #2b3139;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.market-preview h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #f0f3f7;
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.market-row .symbol {
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  color: #f0f3f7;
  font-size: 13px;
}

.market-row .price {
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  color: #f0f3f7;
  font-size: 13px;
}

.market-row .change {
  font-family: 'SF Mono', monospace;
  font-weight: 500;
  font-size: 11px;
}

.change.positive {
  color: #02c076;
}

.change.negative {
  color: #f84960;
}

/* Platform Stats */
.platform-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.stat-item {
  padding: 12px;
  background: #2b3139;
  border-radius: 6px;
}

.stat-number {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #f0b90b;
  font-family: 'SF Mono', monospace;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 11px;
  color: #848e9c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ====================================
   TOAST NOTIFICATIONS
   ==================================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: #1e2329;
  border: 1px solid #2b3139;
  border-radius: 8px;
  padding: 16px;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  border-color: #02c076;
}

.toast-error {
  border-color: #f84960;
}

.toast-warning {
  border-color: #fbbf24;
}

.toast-info {
  border-color: #3b82f6;
}

.toast-message {
  color: #c7ccd0;
  font-size: 14px;
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: #848e9c;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: #c7ccd0;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 1024px) {
  .register-container {
    grid-template-columns: 1fr;
  }

  .register-info-panel {
    border-left: none;
    border-top: 1px solid #2b3139;
  }

  .header-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 16px;
    height: 48px;
  }

  .main-content {
    padding-top: 48px;
  }

  .register-container {
    min-height: calc(100vh - 48px);
  }

  .register-form-panel,
  .register-info-panel {
    padding: 16px;
  }

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

  .hero-section h2 {
    font-size: 18px;
  }

  .social-buttons {
    grid-template-columns: 1fr;
  }

  .platform-stats {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .register-form-panel {
    padding: 12px;
  }

  .register-info-panel {
    padding: 16px 12px;
  }

  .form-header {
    margin-bottom: 16px;
  }

  .register-form {
    gap: 12px;
  }

  .input-group {
    gap: 4px;
  }

  .feature-item {
    margin-bottom: 12px;
  }

  .features-preview {
    margin-bottom: 24px;
  }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states for keyboard navigation */
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #f0b90b;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .exchange-body {
    background: #000;
  }

  .register-form-panel {
    background: #000;
  }

  .register-info-panel {
    background: #111;
  }

  input,
  .social-btn {
    border-color: #fff;
  }
}