*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #020c1b;
  --surface:  rgba(5, 20, 45, 0.85);
  --border:   rgba(0, 210, 255, 0.12);
  --border-h: rgba(0, 210, 255, 0.35);
  --cyan:     #00d2ff;
  --cyan2:    #0077ff;
  --glow:     rgba(0, 210, 255, 0.18);
  --text:     #e8f4ff;
  --muted:    rgba(180, 215, 255, 0.45);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
}

#cv { position: fixed; inset: 0; z-index: 0; }

.scene {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.card::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,210,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.logo-ring {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,210,255,0.12), rgba(0,119,255,0.12));
  border: 1px solid rgba(0,210,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 20px rgba(0,210,255,0.12); }
  50%      { box-shadow: 0 0 36px rgba(0,210,255,0.32); }
}

.card-title {
  text-align: center;
  margin-bottom: 32px;
}

.card-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.card-title p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-wrap .ico {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--muted);
  transition: color 0.25s;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: rgba(0, 210, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 14px 13px 42px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.input-wrap input::placeholder { color: rgba(180,215,255,0.2); }

.input-wrap input:focus {
  border-color: var(--cyan);
  background: rgba(0, 210, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(0,210,255,0.1);
}

.input-wrap input:focus ~ .ico { color: var(--cyan); }

.eye-btn {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--muted);
  display: flex; align-items: center;
  transition: color 0.2s; padding: 0;
}
.eye-btn:hover { color: var(--cyan); }

.opts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

.remember {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; color: var(--muted); user-select: none;
}
.remember input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; }

.forgot { color: var(--cyan); text-decoration: none; transition: opacity 0.2s; }
.forgot:hover { opacity: 0.65; }

.btn-submit {
  width: 100%; padding: 14px;
  border-radius: 11px; border: none; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg); position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan2) 100%);
  box-shadow: 0 4px 28px rgba(0,210,255,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-submit::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--cyan2) 0%, var(--cyan) 100%);
  opacity: 0; transition: opacity 0.35s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(0,210,255,0.4); }
.btn-submit:hover::before { opacity: 1; }
.btn-submit:active { transform: translateY(0); }
.btn-submit .btn-text { position: relative; z-index: 1; }
.btn-submit .btn-loader {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.btn-submit.loading .btn-loader { opacity: 1; }
.btn-submit.loading .btn-text  { opacity: 0; }

.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(2,12,27,0.25);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(0,210,255,0.03);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-social:hover { border-color: var(--border-h); background: rgba(0,210,255,0.07); transform: translateY(-1px); }

.signup {
  margin-top: 22px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted);
}
.signup a { color: var(--cyan); text-decoration: none; font-weight: 500; transition: opacity 0.2s; cursor: pointer; }
.signup a:hover { opacity: 0.65; }

/* ── Panel slide system ── */
.panels {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.panel {
  width: 100%;
}

.panel.is-hidden {
  display: none;
}

/* ── Mobile responsive ── */
@media (max-width: 480px) {
  html, body { overflow-x: hidden; }

  .scene {
    min-height: 100vh;
    height: auto;
    align-items: flex-start;
    padding: 24px 16px 32px;
  }

  .card {
    width: 100%;
    max-width: 100%;
    padding: 30px 20px 26px;
    border-radius: 16px;
  }

  .logo { margin-bottom: 18px; }
  .logo-ring { width: 46px; height: 46px; border-radius: 12px; }

  .card-title { margin-bottom: 20px; }
  .card-title h1 { font-size: 1.4rem; }
  .card-title p  { font-size: 0.64rem; }

  .field { margin-bottom: 12px; }
  .field label { font-size: 0.62rem; margin-bottom: 5px; }

  .input-wrap input {
    padding: 11px 12px 11px 38px;
    font-size: 0.8rem;
    border-radius: 9px;
  }

  .field-row { grid-template-columns: 1fr; gap: 0; }

  .opts { font-size: 0.66rem; margin: 12px 0 16px; flex-wrap: wrap; gap: 8px; }

  .btn-submit { padding: 13px; font-size: 0.84rem; border-radius: 9px; }

  .divider { margin: 14px 0; font-size: 0.62rem; }

  .socials { gap: 8px; }
  .btn-social { padding: 10px 6px; font-size: 0.68rem; border-radius: 9px; }

  .signup { font-size: 0.68rem; margin-top: 14px; }

  .success-ring { width: 54px; height: 54px; }
  .success h3 { font-size: 1.1rem; }
}

@media (max-width: 360px) {
  .card { padding: 24px 14px 20px; }
  .card-title h1 { font-size: 1.25rem; }
}

/* register extra field */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.strength-bar {
  height: 3px; border-radius: 2px;
  background: var(--border);
  margin-top: 8px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 2px;
  width: 0%; transition: width 0.3s, background 0.3s;
}

.strength-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; color: var(--muted);
  margin-top: 4px; text-align: right;
}

.err { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: #ff6b8a; margin-top: 6px; display: none; }
.err.show { display: block; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake 0.35s ease; }

.success {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--surface); backdrop-filter: blur(28px);
  border-radius: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.success.show { opacity: 1; pointer-events: all; }
.success-ring {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan2));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 40px rgba(0,210,255,0.45);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.success h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.success p  { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted); }

@keyframes up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.field:nth-child(1) { animation: up 0.5s 0.25s both; }
.field:nth-child(2) { animation: up 0.5s 0.33s both; }
.opts   { animation: up 0.5s 0.40s both; }
.btn-submit { animation: up 0.5s 0.47s both; }
.divider    { animation: up 0.5s 0.54s both; }
.socials    { animation: up 0.5s 0.60s both; }
.signup     { animation: up 0.5s 0.66s both; }