:root {
  --bg: #0b0f17;
  --panel: #0f1522;
  --panel-contrast: #121a2a;
  --text: #e8eefc;
  --muted: #9fb0cf;
  --accent: #7aa2ff;
  --accent-2: #54e1c2;
  --ring: #8bb3ff;
  --shadow: 0 20px 40px rgba(0, 0, 0, .35);
  --radius: 20px;
  --speed: 700ms;
  --outline: 2px solid var(--ring);
  --grid: rgba(255, 255, 255, .06);
  --gap: clamp(16px, 3vw, 32px);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #182038 0%, #0b0f17 55%);
  color: var(--text);
  line-height: 1.5;
  display: grid;
  place-content: center;
}

/* Main container based on your new design */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1000px, 90vw);
  min-height: 600px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}

.left-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 64px);
  isolation: isolate;
  background: radial-gradient(800px 400px at -20% -10%, #14203b 0%, transparent 40%), linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 20%), var(--panel);
}

.left-panel h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: .2px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(122, 162, 255, .5);
}

/* Art elements for the left panel */
.grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: radial-gradient(1000px 600px at 30% 20%, rgba(0, 0, 0, .75), transparent 70%);
}

.blob {
  position: absolute;
  filter: blur(40px);
  opacity: .8;
  mix-blend: screen;
  animation: float 12s ease-in-out infinite;
}

.b1 {
  width: 520px;
  height: 520px;
  left: -80px;
  top: -60px;
  background: radial-gradient(circle at 30% 30%, #5d93ff, transparent 60%), radial-gradient(circle at 70% 70%, #54e1c2, transparent 60%);
}

.b2 {
  width: 420px;
  height: 420px;
  right: -80px;
  bottom: -60px;
  background: radial-gradient(circle at 40% 40%, #b57bff, transparent 60%), radial-gradient(circle at 70% 70%, #7aa2ff, transparent 60%);
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) }
  50% { transform: translate3d(0, -12px, 0) }
}


.right-panel {
  display: grid;
  align-content: center;
  padding: clamp(24px, 5vw, 64px);
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-form h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 32px);
}

.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-group input {
  width: 100%;
  padding: 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #0e1422;
  color: var(--text);
  outline: none;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}

.input-group input::placeholder {
  color: transparent;
}

.input-group label {
  position: absolute;
  left: 12px;
  top: 16px;
  padding: 0 6px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s, color .2s, top .2s;
  background: #0f1522; /* Match right panel background */
}

.input-group input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(123, 164, 255, .15);
}

.input-group input:focus+label {
  color: var(--ring);
}

.input-group input:not(:placeholder-shown)+label,
.input-group input:focus+label {
  transform: translateY(-24px) scale(.86);
  top: 8px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--muted);
}
.password-toggle:hover {
    color: var(--accent);
}

.btn-login {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 16px;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08111a;
  cursor: pointer;
  transition: transform .08s ease, filter .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 18px rgba(84, 225, 194, .2), 0 8px 16px rgba(122, 162, 255, .15);
}

.btn-login:hover {
  filter: brightness(1.05);
}

.btn-login:active {
  transform: translateY(1px) scale(.99);
}

.btn-login:focus-visible {
  outline: var(--outline);
  outline-offset: 3px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .1);
}

.btn-register {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--accent-2);
  border-radius: 12px;
  padding: 16px;
  font-weight: 700;
  font-size: 16px;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.btn-register:hover {
  background: rgba(84, 225, 194, .1);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(84, 225, 194, .2);
}

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

.btn-register:focus-visible {
  outline: var(--outline);
  outline-offset: 3px;
}

.btn-register i {
  font-size: 18px;
}

.error-message {
    color: #ff7a7a;
    background-color: rgba(255, 122, 122, 0.1);
    border: 1px solid rgba(255, 122, 122, 0.3);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}


@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    width: min(500px, 90vw);
    min-height: auto;
  }
  .left-panel {
    display: none; /* Hide left panel on smaller screens for simplicity */
  }
  .right-panel {
     background:
        radial-gradient(800px 400px at 120% 10%, #14203b 0%, transparent 40%),
        linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 20%),
        var(--panel);
  }
}