:root {
  --bg: #0b0f1a;
  --card: rgba(16, 22, 38, 0.92);
  --card-border: rgba(124, 159, 255, 0.18);
  --text: #e6edf7;
  --muted: #9aa8c7;
  --accent: #7a5cff;
  --accent-strong: #5b3df5;
  --danger: #ff6b6b;
  --shadow: 0 26px 60px rgba(6, 9, 18, 0.6);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Arial Nova", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(122, 92, 255, 0.24), transparent 40%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 40%),
    linear-gradient(160deg, #0b0f1a 0%, #0f1424 45%, #151a2e 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px 18px 36px;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.34;
}

.backdrop-left {
  top: -60px;
  left: -90px;
  background: #7a5cff;
}

.backdrop-right {
  right: -70px;
  bottom: 30px;
  background: #38bdf8;
}

.card {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.profile,
.actions,
.status-panel,
.result {
  margin-top: 22px;
}

.profile {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 21, 38, 0.8);
  border: 1px solid rgba(124, 159, 255, 0.16);
}

.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-label,
.status-title {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile h2,
.result h3 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-meta,
.hint,
.status-message,
.result-meta {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-button,
.ghost-button {
  appearance: none;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.primary-button {
  width: 100%;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(1px) scale(0.995);
}

.primary-button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.status-panel,
.result {
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 21, 38, 0.88);
  border: 1px solid rgba(124, 159, 255, 0.16);
}

.status-panel.error {
  border-color: rgba(255, 107, 107, 0.4);
}

.status-panel.success {
  border-color: rgba(99, 230, 190, 0.45);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.ghost-button {
  padding: 10px 14px;
  background: rgba(124, 159, 255, 0.12);
  color: var(--text);
}

textarea {
  width: 100%;
  min-height: 180px;
  margin-top: 16px;
  padding: 16px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(124, 159, 255, 0.2);
  background: rgba(10, 15, 28, 0.9);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.hidden {
  display: none;
}

@media (max-width: 540px) {
  .card {
    padding: 20px;
    border-radius: 24px;
  }

  .profile {
    grid-template-columns: 56px 1fr;
    gap: 14px;
  }

  .avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .result-header {
    flex-direction: column;
    align-items: stretch;
  }
}
