:root {
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --surface-card: rgba(15, 23, 42, 0.9);
  --text-primary: #f8fafc;
  --text-secondary: rgba(226, 232, 240, 0.78);
  --text-muted: rgba(148, 163, 184, 0.8);
  --border-glow: rgba(56, 189, 248, 0.24);
  --shadow-soft: 0 20px 80px rgba(15, 23, 42, 0.45);
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.35);
  --glass-border: rgba(148, 163, 184, 0.2);
  --danger-soft: rgba(248, 113, 113, 0.18);
  --success-soft: rgba(34, 197, 94, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: radial-gradient(circle at top left, #1e293b, #0b1222 55%, #050910 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  flex: 1;
  width: min(1100px, 90vw);
  margin: 0 auto;
  padding-bottom: 4rem;
}

.main--centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  width: min(1100px, 90vw);
  margin: 2.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2.25rem;
  border-radius: 18px;
  backdrop-filter: blur(24px);
  background: linear-gradient(120deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.nav__brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.nav__accent {
  width: 12px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

.nav__title {
  font-size: clamp(1.45rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav__links {
  display: flex;
  gap: 1.1rem;
}

.nav__link {
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
  color: var(--text-secondary);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.14);
}

.section-header {
  margin: 4.5rem 0 2rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.section-header h2::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cards__grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

input,
textarea,
button {
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 2.75rem;
  height: 2.75rem;
}

input:focus,
textarea:focus,
button:focus {
  outline: 2px solid rgba(56, 189, 248, 0.4);
  outline-offset: 2px;
}

.line-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.line-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: stretch;
}

.line-row input,
.line-row textarea {
  background: rgba(15, 23, 42, 0.8);
}

.line-row textarea {
  min-height: 2.75rem;
  height: 2.75rem;
}

button {
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04111f;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

button.line-add {
  margin-right: auto;
}

button.line-remove {
  background: rgba(239, 68, 68, 0.85);
  color: var(--text-primary);
}

button.line-remove:hover {
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.35);
}

.card {
  position: relative;
  background: var(--surface-card);
  border-radius: 20px;
  padding: 2.1rem 2rem 2rem;
  border: 1px solid rgba(56, 189, 248, 0.12);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: var(--text-primary);
}

.card:before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid var(--border-glow);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover:before {
  opacity: 1;
}

.card__body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.composer form.card__body {
  display: grid;
  gap: 0.9rem;
}

.card input,
.card textarea {
  background: rgba(15, 23, 42, 0.78);
}

.card textarea {
  min-height: 2.75rem;
  height: 2.75rem;
}

.card__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.card__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card__codeword {
  flex: 1 1 160px;
  min-width: 160px;
  background: rgba(15, 23, 42, 0.85);
}

.notice {
  padding: 1rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-primary);
  box-shadow: 0 12px 40px rgba(8, 47, 73, 0.28);
}

.notice[hidden] {
  display: none;
}

.notice--error {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.32);
  color: #fee2e2;
}

.notice--success {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.32);
  color: #dcfce7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04111f;
  box-shadow: 0 10px 40px rgba(56, 189, 248, 0.45);
}

.button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 50px rgba(56, 189, 248, 0.55);
}

.status {
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  box-shadow: var(--shadow-card);
  max-width: 460px;
}

.status__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.status__title {
  margin: 1rem 0;
  font-size: 2rem;
}

.status__message {
  margin: 0 0 2rem;
  color: var(--text-secondary);
}

.status__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer {
  margin-top: auto;
  padding: 2.5rem 0 3rem;
}

.footer__content {
  width: min(1100px, 90vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer__copy {
  margin: 0;
}

.footer__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
}

.footer__link {
  color: var(--text-secondary);
  font-weight: 500;
}
