@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg-deep: #06090f;
  --bg-card: rgba(15, 33, 46, 0.7);
  --primary: #00e701;
  --primary-glow: rgba(0, 231, 1, 0.4);
  --primary-hover: #1fff20;
  --txt: #ffffff;
  --muted: #8a9bb7;
  --border: rgba(255, 255, 255, 0.1);
  --accent-blue: #3d5afe;
  --accent-purple: #7c4dff;
}

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

body {
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  color: var(--txt);
  background-color: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Elements */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 30%, rgba(61, 90, 254, 0.15), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(124, 77, 255, 0.15), transparent 40%),
              #06090f;
}

.bg-sphere {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  animation: float 20s infinite alternate ease-in-out;
}

.sphere-1 {
  background: var(--accent-blue);
  top: -100px;
  left: -100px;
}

.sphere-2 {
  background: var(--accent-purple);
  bottom: -150px;
  right: -150px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 50px) scale(1.1); }
}

.wrap {
  width: 100%;
  max-width: 480px;
  padding: 20px;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.top {
  text-align: center;
  margin-bottom: 30px;
}

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

.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px var(--primary-glow);
  border: 2px solid var(--primary);
}

.title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(to right, #fff, #b1bad3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent-blue), var(--primary), var(--accent-purple));
}

h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.muted {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.field span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

input {
  width: 100%;
  height: 54px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--txt);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  background: rgba(0, 0, 0, 0.4);
}

.btn {
  height: 54px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 10px 20px rgba(0, 231, 1, 0.2);
}

.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(0, 231, 1, 0.3);
}

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

.btn:disabled {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
  transform: none !important;
}

.step2 {
  margin-top: 20px;
  animation: slideIn 0.4s ease-out;
}

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

.status {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
}

.status.info { background: rgba(61, 90, 254, 0.1); color: #8c9eff; }
.status.err { background: rgba(255, 73, 73, 0.1); color: #ff8a80; }
.status.ok { background: rgba(0, 231, 1, 0.1); color: #b9f6ca; }

.logged {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ok {
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
}

.row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--txt);
  font-size: 14px;
  height: 44px;
  padding: 0 20px;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn.danger {
  color: #ff8a80;
}

.me {
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 12px;
  font-size: 12px;
  text-align: left;
  border: 1px solid var(--border);
}

.foot {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.8;
}

.hidden { display: none; }

@media (max-width: 480px) {
  .card { padding: 30px 20px; }
  .title { font-size: 24px; }
}
