/* ==========================================================================
   bTitan Pro - Login & Registration Portal Stylesheet
   Luxury Cyberpunk / Glassmorphic Aesthetics
   ========================================================================== */

:root {
  --portal-bg: #090b10;
  --gold-primary: #ffcd52;
  --gold-glow: rgba(255, 205, 82, 0.4);
  --gold-border: rgba(255, 205, 82, 0.22);
  --cyan-accent: #00e5ff;
  --purple-accent: #9d4edd;
  --purple-glow: rgba(157, 78, 221, 0.35);
  --green-success: #00e676;
  --red-error: #ff5252;
  --text-main: #f0f3f8;
  --text-muted: #9aa4b2;
  --text-dim: #616e7f;
  --card-glass: rgba(15, 18, 26, 0.75);
  --card-glass-hover: rgba(22, 27, 38, 0.85);
  --card-border: rgba(255, 205, 82, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--portal-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmosphere */
.portal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow-1 {
  position: absolute;
  top: -15%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.15) 0%, transparent 70%);
  filter: blur(80px);
}

.ambient-glow-2 {
  position: absolute;
  bottom: -15%;
  right: 15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(255, 205, 82, 0.12) 0%, transparent 70%);
  filter: blur(90px);
}

.portal-grid-floor {
  position: absolute;
  bottom: 0;
  left: -50%;
  width: 200%;
  height: 50vh;
  background-image: 
    linear-gradient(rgba(255, 205, 82, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 205, 82, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg);
  opacity: 0.7;
}

/* Floating Particles */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -20px;
  width: 3px;
  height: 3px;
  background: var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-primary);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

/* Header & Top Bar */
.portal-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(255, 205, 82, 0.45));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-badge-btn {
  background: rgba(255, 205, 82, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.network-badge-btn:hover {
  background: rgba(255, 205, 82, 0.18);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(255, 205, 82, 0.25);
}

.wallet-btn {
  background: linear-gradient(135deg, rgba(255, 205, 82, 0.18), rgba(157, 78, 221, 0.25));
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.wallet-btn:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 18px rgba(255, 205, 82, 0.35);
  transform: translateY(-1px);
}

.wallet-btn.connected {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.4);
  color: #00e676;
}

/* Main Container */
.portal-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px 60px;
}

/* Glowing Portal Card */
.portal-card {
  width: 100%;
  max-width: 520px;
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(255, 205, 82, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s ease;
}

.portal-card:hover {
  border-color: rgba(255, 205, 82, 0.35);
}

/* Card Header */
.portal-card-header {
  padding: 32px 32px 20px;
  text-align: center;
  position: relative;
}

.portal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(157, 78, 221, 0.15);
  border: 1px solid rgba(157, 78, 221, 0.35);
  color: #c77dff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.portal-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.portal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tab Switcher */
.tab-nav {
  display: flex;
  margin: 10px 24px 20px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-btn {
  flex: 1;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 205, 82, 0.22), rgba(157, 78, 221, 0.22));
  color: #fff;
  border: 1px solid rgba(255, 205, 82, 0.35);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Tab Panes */
.tab-content {
  padding: 0 28px 32px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dim, #cda757);
  margin-bottom: 8px;
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(8, 10, 15, 0.7);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-family: monospace;
  outline: none;
  transition: all 0.25s ease;
}

.form-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(255, 205, 82, 0.2);
  background: rgba(12, 16, 24, 0.85);
}

.input-feedback {
  font-size: 11px;
  margin-top: 6px;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.feedback-success { color: var(--green-success); }
.feedback-error { color: var(--red-error); }
.feedback-loading { color: var(--cyan-accent); }

/* Details & Cost Info Box */
.info-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 205, 82, 0.15);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.info-row:not(:last-child) {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  color: #fff;
  font-weight: 600;
}

.info-val-gold {
  color: var(--gold-primary);
  font-weight: 700;
}

/* Action Buttons */
.btn-cta {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--gold-border);
  background: linear-gradient(135deg, #ffcd52, #ffa000);
  color: #120e03;
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 20px rgba(255, 205, 82, 0.25);
}

.btn-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 205, 82, 0.45);
}

.btn-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
  transform: none;
  box-shadow: none;
}

.btn-secondary-action {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 10px;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.divider span {
  padding: 0 10px;
}

/* Steps for Registration */
.steps-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.step-card {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-dim);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-card.active {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(255, 205, 82, 0.08);
}

.step-card.completed {
  border-color: var(--green-success);
  color: var(--green-success);
  background: rgba(0, 230, 118, 0.08);
}

/* Footer */
.portal-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* Toast Notifications */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid rgba(255, 205, 82, 0.3);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: slideIn 0.3s ease;
  pointer-events: auto;
  max-width: 380px;
}

.toast.toast-error { border-color: rgba(255, 82, 82, 0.5); color: #ff8a80; }
.toast.toast-success { border-color: rgba(0, 230, 118, 0.5); color: #b9f6ca; }
.toast.toast-warning { border-color: rgba(255, 205, 82, 0.6); color: #ffd34e; background: rgba(28, 22, 9, 0.96); }

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 580px) {
  .portal-header { padding: 14px 18px; }
  .portal-card { border-radius: 20px; }
  .portal-card-header { padding: 24px 20px 14px; }
  .tab-content { padding: 0 18px 24px; }
  .portal-title { font-size: 20px; }
}
