:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: rgba(15, 20, 28, 0.82);
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent-2: #a855f7;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.2), transparent 34%),
    radial-gradient(circle at right, rgba(59, 130, 246, 0.14), transparent 28%),
    var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

.shell {
  position: relative;
  width: 100%;
  height: 100vh;
}

.user-panel {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 280px;
  max-height: calc(100vh - 48px);
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.panel-title {
  margin-bottom: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 6px;
}

.user-list::-webkit-scrollbar {
  width: 8px;
}

.user-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.user-item:hover {
  transform: translateX(2px);
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(30, 41, 59, 0.88);
}

.user-item.active {
  border-color: rgba(168, 85, 247, 0.7);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(15, 23, 42, 0.82));
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.26);
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

.user-name {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 24px;
  text-align: center;
}

.hero-card {
  max-width: 540px;
  padding: 34px 36px;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.hero-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.login-area {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 1;
}

.hidden {
  display: none;
}

.login-card {
  width: min(92vw, 430px);
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(8, 12, 20, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.selected-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.label {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.name {
  font-size: 1.5rem;
  font-weight: 700;
}

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

.field span,
.remember span {
  font-size: 0.92rem;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  outline: none;
  font-size: 1rem;
}

.field input:focus {
  border-color: rgba(167, 139, 250, 0.9);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22);
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  user-select: none;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

#loginButton {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#loginButton:hover {
  transform: translateY(-1px);
}

#loginButton:disabled {
  opacity: 0.75;
  cursor: wait;
}

.message {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.message.error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .user-panel {
    width: calc(100vw - 32px);
    max-height: 31vh;
    left: 16px;
    top: 16px;
  }

  .hero-card {
    margin-top: 250px;
  }
}
