:root {
  --bg-main: #0B0C10;
  --bg-card: #14161E;
  --bg-card-hover: #1A1D27;
  --border: #232736;
  --border-focus: #D4AF37;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --accent-gold: #E5B842;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-main: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F3F5;
  --border: #E5E7EB;
  --border-focus: #B8860B;
  --text-main: #111827;
  --text-muted: #4B5563;
  --accent-gold: #B8860B;
  --accent-emerald: #059669;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
}

/* Header */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-free {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--border-focus);
}

/* Layout */
.main-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-header {
  margin-bottom: 24px;
}

.panel-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.panel-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Form */
.copy-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-group.half {
  flex: 1;
}

label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
}

input, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, select:focus {
  border-color: var(--border-focus);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-primary {
  flex: 2;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #B8860B 100%);
  color: #0E0F13;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-ghost {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--border-focus);
}

/* Mockup Card */
.preview-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mockup-bar {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.mockup-url {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
}

.mockup-hero {
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  background: rgba(229, 184, 66, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(229, 184, 66, 0.2);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.18;
  max-width: 650px;
  letter-spacing: -0.02em;
}

.hero-subhead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.5;
}

.mockup-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.mockup-btn-primary {
  background: var(--accent-gold);
  color: #0B0C10;
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mockup-btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Results Grid */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.result-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.result-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.result-card-copy-hint {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.result-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.result-subhead {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.result-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tag-charcount {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent-emerald);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
