/* The Cook — matches trythecook.com landing (warm paper, ink, coral/teal/lime) */

:root {
  --ink: #1a1333;
  --ink-soft: #4f4672;
  --paper: rgba(255, 252, 244, 0.88);
  --white: #fffdf7;
  --coral: #ff6b57;
  --gold: #ffbf3c;
  --teal: #1fc7b8;
  --berry: #ff4fa3;
  --lime: #d6ff49;
  --line: rgba(26, 19, 51, 0.12);
  --shadow: 0 24px 80px rgba(51, 26, 92, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 79, 163, 0.32), transparent 25%),
    radial-gradient(circle at 85% 15%, rgba(31, 199, 184, 0.34), transparent 18%),
    radial-gradient(circle at 20% 80%, rgba(214, 255, 73, 0.35), transparent 18%),
    linear-gradient(135deg, #fff8e6 0%, #ffe9cf 45%, #fff3d6 100%);
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

body::before {
  width: 320px;
  height: 320px;
  top: 110px;
  right: -90px;
  background: rgba(255, 107, 87, 0.22);
}

body::after {
  width: 260px;
  height: 260px;
  bottom: 40px;
  left: -70px;
  background: rgba(31, 199, 184, 0.18);
}

a {
  color: inherit;
}

#app {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-external-nav {
  width: 100%;
  margin-bottom: 6px;
  text-align: right;
}

.app-home-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.app-home-link:hover {
  text-decoration: underline;
}

/* Brand header (landing topbar pattern) */
.brand-block {
  text-align: center;
  margin-bottom: 28px;
}

.brand-lockup-inline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(26, 19, 51, 0.12);
}

.brand-text {
  display: grid;
  gap: 4px;
  text-align: left;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff8ef;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Cards = landing page-card */
.page-card,
.card {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 28px 26px;
  margin-bottom: 20px;
}

.card h2,
.page-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--ink);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--teal);
}

.form-group input::placeholder {
  color: rgba(79, 70, 114, 0.45);
}

/* Buttons = landing cta */
.btn {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  font-size: 0.98rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 19, 51, 0.12);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: #fff;
}

.link-row {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.link-row a {
  color: var(--coral);
  font-weight: 800;
  text-decoration: none;
}

.link-row a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
  border: 2px solid var(--line);
}

.alert-error {
  background: rgba(255, 107, 87, 0.12);
  color: #c43d2e;
  border-color: rgba(255, 107, 87, 0.25);
}

.alert-success {
  background: rgba(31, 199, 184, 0.15);
  color: #0d7a70;
  border-color: rgba(31, 199, 184, 0.3);
}

.license-key {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  background: var(--white);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 12px 0;
  word-break: break-all;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.license-key code {
  flex: 1;
  color: var(--ink);
}

.copy-btn {
  background: var(--lime);
  border: 2px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
}

.copy-btn:hover {
  filter: brightness(1.05);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-pro {
  background: rgba(31, 199, 184, 0.22);
  color: #0a5c54;
  border: 2px solid rgba(31, 199, 184, 0.35);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 12px;
  font-weight: 600;
}

.success-icon {
  text-align: center;
  font-size: 52px;
  margin-bottom: 16px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.features li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(26, 19, 51, 0.15);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 600;
}

.features li:last-child {
  border-bottom: none;
}

.features li .check {
  color: var(--teal);
  font-weight: 900;
}

.price-tag {
  text-align: center;
  margin: 22px 0;
}

.price-tag .amount {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
}

.price-tag .period {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.price-tag .offer-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.35;
}

.price-tag .price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px 14px;
}

.price-tag .price-original {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.price-tag .offer-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--ink);
}

.price-tag .currency-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.currency-pill {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px dashed var(--line);
  background: rgba(255, 253, 247, 0.6);
  color: var(--ink);
}

.currency-pill:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.currency-pill-active {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff8ef;
  cursor: default;
}

.top-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.top-bar-home-link {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.top-bar-home-link:hover {
  text-decoration: underline;
}

.top-bar .user-email {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: var(--white);
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.logout-btn:hover {
  background: var(--lime);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.footer a {
  color: var(--coral);
  font-weight: 800;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.text-center {
  text-align: center;
}

.card-subtle {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
  font-weight: 600;
}

.card-subtle strong {
  color: var(--ink);
}

.license-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.license-card-head h2 {
  margin: 0;
}
