:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #111827;
  --muted: #667085;
  --line: #d6dce8;
  --panel: #ffffff;
  --green: #0f766e;
  --green-dark: #115e59;
  --amber: #f59e0b;
  --red: #be123c;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 34rem),
    linear-gradient(135deg, #ffffff 0%, var(--bg) 100%);
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.creator-view,
.secret-view {
  width: 100%;
}

.brand {
  width: max-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  max-width: 780px;
  margin: 0 0 24px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.secret-subtitle {
  max-width: 640px;
  margin: -8px 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.secret-form,
.unlock-box {
  display: grid;
  gap: 18px;
  align-items: start;
}

.secret-form label,
.unlock-box label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.secret-form textarea,
.secret-form input,
.unlock-box input,
.result-actions input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  font-weight: 400;
}

.secret-form textarea {
  min-height: 230px;
  resize: vertical;
  font-size: 20px;
  line-height: 1.45;
}

.secret-form input,
.unlock-box input,
.result-actions input {
  min-height: 50px;
}

.secret-form textarea:focus,
.secret-form input:focus,
.unlock-box input:focus,
.result-actions input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  border-color: var(--green);
}

.secret-form button,
.primary-action,
.unlock-box button,
.secondary-action,
.secret-card-header button,
.result-actions button,
.result-actions a {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.secret-form button,
.primary-action,
.unlock-box button,
.secondary-action {
  width: max-content;
}

.secret-form button:hover,
.primary-action:hover,
.unlock-box button:hover,
.secondary-action:hover,
.secret-card-header button:hover,
.result-actions button:hover,
.result-actions a:hover {
  background: var(--green-dark);
}

button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.result-box,
.secret-card,
.unlock-box {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.result-box > span,
.secret-card-header span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.secret-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.secret-card-header button {
  min-height: 40px;
  padding: 0 14px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

.secondary-action {
  margin-top: 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.secondary-action:hover {
  color: white;
  border-color: var(--green-dark);
}

.secret-card {
  border-color: rgba(15, 118, 110, 0.28);
}

.secret-card pre {
  min-height: 180px;
  max-height: 52vh;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
}

.status {
  min-height: 26px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 700;
}

.status.is-error {
  color: var(--red);
}

.new-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 760px) {
  .app-shell {
    align-items: start;
  }

  h1 {
    font-size: 42px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

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

  .secret-form button,
  .primary-action,
  .unlock-box button,
  .secondary-action {
    width: 100%;
  }
}
