/* ===== APP NAV ===== */
.app-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-email {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0a0b;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 16px 32px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 5px 10px;
}

/* ===== SPINNER ===== */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10,10,11,0.3);
  border-top-color: #0a0a0b;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.hidden {
  display: none !important;
}

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

.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 70px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 340px;
}

.toast-success {
  background: rgba(232,255,71,0.12);
  border: 1px solid rgba(232,255,71,0.3);
  color: var(--accent);
}

.toast-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  margin-left: auto;
  opacity: 0.6;
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== AUTH ===== */
.auth-main {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.auth-sub a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-error {
  background: rgba(255,77,77,0.1);
  border: 1px solid rgba(255,77,77,0.3);
  color: var(--negative);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.auth-footer-note {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
}

.auth-footer-note a {
  color: var(--fg-muted);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.15s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--fg-muted);
  opacity: 0.6;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
  opacity: 0.7;
}

/* ===== APP MAIN ===== */
.app-main {
  padding: 40px 24px;
  min-height: calc(100vh - 56px);
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== PAYWALL ===== */
.paywall-card {
  max-width: 540px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
}

.paywall-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(232,255,71,0.2);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.paywall-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.paywall-card > p {
  color: var(--fg-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.paywall-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 20px;
}

.paywall-feature {
  font-size: 0.9rem;
  color: var(--fg);
}

.paywall-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* ===== GENERATOR ===== */
.generator-layout {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 32px;
  align-items: flex-start;
}

.generator-form-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: sticky;
  top: 72px;
}

.generator-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.generator-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn-generate {
  margin-top: 4px;
  justify-content: center;
}

.results-panel {
  min-height: 300px;
}

.results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 12px;
  color: var(--fg-muted);
  font-size: 0.95rem;
  text-align: center;
}

.placeholder-icon {
  font-size: 2.4rem;
  opacity: 0.4;
}

.error-msg {
  color: var(--negative);
  font-size: 0.9rem;
}

/* ===== EMAIL VARIANTS ===== */
.email-variants {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.email-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s;
}

.email-card:hover {
  border-color: rgba(232,255,71,0.2);
}

.email-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.email-style-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(232,255,71,0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-copy {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-copy:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

.btn-copy.copied {
  color: var(--accent);
  border-color: rgba(232,255,71,0.4);
}

.email-subject {
  font-size: 0.88rem;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.subject-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  white-space: nowrap;
  margin-top: 2px;
}

.subject-text {
  color: var(--fg);
  font-weight: 500;
}

.email-body {
  font-size: 0.92rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }

  .generator-form-panel {
    position: static;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .nav-email {
    display: none;
  }

  .paywall-card {
    padding: 32px 24px;
  }
}
