* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-strong: rgba(15, 23, 42, 0.96);
  --surface-muted: rgba(30, 41, 59, 0.7);
  --line: rgba(51, 65, 85, 0.9);
  --line-soft: rgba(71, 85, 105, 0.35);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-strong: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28%),
    radial-gradient(circle at left center, rgba(34, 197, 94, 0.1), transparent 20%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(18px);
}

.site-header__inner,
.app-shell,
.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-link span:last-child {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a,
.site-footer a,
.back-link,
.quick-links a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-footer a:hover,
.back-link:hover,
.quick-links a:hover,
.footer-links a:hover,
.cta-link:hover {
  color: var(--text);
}

.app-shell {
  position: relative;
  padding: 32px 0 56px;
}

.hero-card,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card::before,
.card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-card::before {
  inset: -20% -5% auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 70%);
}

.card::after {
  inset: auto -12% -34% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 68%);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 24px;
  padding: 32px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.card > * {
  position: relative;
  z-index: 1;
}

.hero-copy h1,
.card-header h2 {
  margin: 0;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.4rem, 5vw, 4.75rem);
}

.hero-text,
.card-header p,
.panel-list,
.field span,
.field small,
.status-message,
.status-text,
.tip,
.quick-links a,
.footer-links a,
.result,
.section-text,
.summary-copy,
.preview-meta,
.placeholder p,
.article-post p,
.hint-box p,
th,
td,
pre {
  color: var(--muted);
}

.hero-text,
.card-header p,
.section-text,
.summary-copy,
.article-post p {
  line-height: 1.7;
}

.hero-text {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.eyebrow,
.panel-label,
.card-kicker,
.list-title,
.generated-label,
.summary-label,
.article-kicker {
  margin: 0 0 10px;
  color: #67e8f9;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-panel,
.summary-card,
.money-card,
.result-box,
.article-post,
.password-output-wrap,
.list-card,
.control-box,
.viewer-box,
.generated,
.hint-box {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.24), rgba(15, 23, 42, 0.84));
}

.hero-panel {
  padding: 28px;
}

.panel-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

.app-grid,
.grid {
  display: grid;
  gap: 24px;
}

.app-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.card {
  padding: 28px;
}

.promo-card,
.articles-card,
.card-wide {
  margin-top: 24px;
}

.card-header {
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

form,
.settings-grid,
.result-panel,
.dynamic-fields,
.option-list,
.summary-grid,
.article-grid {
  display: grid;
  gap: 16px;
}

.settings-grid,
.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
}

input[type="color"] {
  min-height: 52px;
  padding: 6px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.button,
button,
.cta-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button:hover,
button:hover,
.cta-link:hover {
  transform: translateY(-1px);
}

.button-primary,
.btn-primary,
.cta-link {
  color: #082f49;
  background: linear-gradient(180deg, #67e8f9, #22d3ee);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.22);
}

.button-secondary,
.btn-secondary {
  color: #67e8f9;
  background: rgba(8, 47, 73, 0.2);
  border-color: rgba(34, 211, 238, 0.2);
}

.btn-danger {
  color: #fecdd3;
  background: rgba(159, 18, 57, 0.24);
  border-color: rgba(244, 63, 94, 0.28);
}

.actions,
.button-row,
.upload,
.buttons,
.preview-actions,
.quick-links,
.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.upload {
  align-items: end;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  background: rgba(8, 47, 73, 0.14);
  color: var(--text);
  cursor: pointer;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.preview-card,
.status,
.strength-row {
  display: grid;
  gap: 16px;
}

.preview-meta,
.status-line,
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.qr-stage,
.viewer {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed rgba(34, 211, 238, 0.24);
  background: rgba(2, 6, 23, 0.82);
}

#qr-image {
  width: min(100%, 340px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 22px;
  background: white;
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.32);
}

.placeholder {
  display: grid;
  gap: 8px;
  text-align: center;
}

.placeholder strong,
.generated-value,
.money-card strong {
  color: var(--text);
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.password-output-wrap,
.list-card,
.control-box,
.viewer-box,
.generated,
.hint-box,
.summary-card,
.money-card,
.result-box {
  padding: 18px;
}

#password-output {
  min-height: 122px;
  resize: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.05rem;
  line-height: 1.6;
}

.strength-meter,
.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

#strength-bar,
.progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--danger);
  transition: width 0.2s ease, background 0.2s ease;
}

.password-list {
  display: grid;
  gap: 10px;
}

.password-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  background: rgba(8, 47, 73, 0.14);
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.generated {
  margin-top: 20px;
}

.generated-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.result {
  min-height: 28px;
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.result[data-state="valid"],
.success {
  color: var(--success);
}

.result[data-state="invalid"] {
  color: var(--danger);
}

.warning {
  color: var(--warning);
}

.result[data-state="info"] {
  color: #67e8f9;
}

.table-wrap {
  margin-top: 20px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

pre {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
}

.viewer {
  min-height: 260px;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #67e8f9;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.32);
  word-break: break-word;
}

.money-card strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  margin-bottom: 10px;
  color: #67e8f9;
}

.article-post h3,
.result-box h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.article-post p:last-child,
.result-box p:last-child {
  margin-bottom: 0;
}

.quick-links a,
.footer-links a {
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.cta-link {
  margin-top: 14px;
  width: fit-content;
}

.field-file {
  flex: 1 1 320px;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.9);
}

.site-footer__inner {
  padding: 28px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.site-footer__inner p {
  margin: 0;
}

@media (max-width: 960px) {
  .hero-card,
  .app-grid,
  .grid,
  .settings-grid,
  .summary-grid,
  .option-list,
  .article-grid,
  .inline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .app-shell,
  .site-footer__inner {
    width: min(100% - 20px, 100%);
  }

  .site-header__inner {
    padding: 14px 0;
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.95rem;
  }

  .app-shell {
    padding-top: 20px;
  }

  .card,
  .hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .button,
  button,
  .quick-links a,
  .footer-links a,
  .cta-link {
    width: 100%;
  }

  .site-footer__inner {
    padding-bottom: 28px;
  }
}
