:root {
  --bg-color: #faf8f5;
  --card-bg: #ffffff;
  --text-primary: #1f1e24;
  --text-secondary: #6b6975;
  --accent-pink: #f472b6;
  --accent-purple: #c084fc;
  --accent-lavender: #f3e8ff;
  --border-color: #e9e5df;
  --border-hover: #d1c9bd;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* Nav */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.logo-icon {
  color: var(--accent-purple);
  font-size: 20px;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.badge {
  background: var(--accent-lavender);
  color: #7e22ce;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  gap: 8px;
}
.nav-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: #fff;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Main Container */
.main-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 16px 60px 16px;
}

/* Ad Banners */
.ad-banner {
  margin: 16px auto;
  text-align: center;
}
.ad-slot-box {
  background: #f1ede8;
  border: 1px dashed #d5cec4;
  border-radius: 8px;
  padding: 18px;
  font-size: 12px;
  color: #8c8273;
  letter-spacing: 0.5px;
  max-width: 728px;
  margin: 0 auto;
}

/* Hero */
.hero-section {
  text-align: center;
  margin: 24px 0 28px 0;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #111;
  margin-bottom: 10px;
}
.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Input Card */
.input-card {
  background: var(--card-bg);
  border: 2px solid #e2dcd2;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: border-color 0.2s;
}
.input-card:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.15);
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.input-header label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.pill-action {
  background: #f5f2ed;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 6px;
}
.pill-action:hover {
  background: #e9e4dc;
  color: var(--text-primary);
}

textarea#textInput {
  width: 100%;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  color: var(--text-primary);
  outline: none;
  resize: none;
  line-height: 1.5;
  background: transparent;
}
textarea#textInput::placeholder {
  color: #a8a29e;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.tab-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab-btn.active {
  background: #1f1e24;
  color: #fff;
  border-color: #1f1e24;
}
.tab-btn:hover:not(.active) {
  background: #f4efe8;
  color: var(--text-primary);
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.style-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 110px;
}
.style-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.style-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9c9589;
}

.style-preview {
  font-size: 18px;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
  margin-bottom: 12px;
  user-select: all;
}

.copy-pill-btn {
  align-self: flex-end;
  background: #f6f3ee;
  border: 1px solid #e5ded4;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.copy-pill-btn:hover {
  background: #1f1e24;
  color: #fff;
  border-color: #1f1e24;
}
.copy-pill-btn:active {
  transform: scale(0.94);
}

/* SEO Guide Section */
.seo-guide-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px 24px;
  margin: 36px 0;
}
.seo-guide-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 18px;
  text-align: center;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.guide-card {
  background: #fbf9f6;
  border-radius: 12px;
  padding: 16px;
}
.guide-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.guide-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Toast */
.toast-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1f1e24;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: none;
}
.toast-popup.show {
  transform: translateX(-50%) translateY(0);
}
.toast-icon {
  color: #4ade80;
  font-weight: 800;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 30px 16px;
  font-size: 13px;
  color: #9c9589;
  border-top: 1px solid var(--border-color);
}
.footer-links {
  margin-top: 8px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 8px;
  font-size: 12px;
}
.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .hero-title { font-size: 30px; }
  .results-grid { grid-template-columns: 1fr; }
  .top-nav { padding: 12px 16px; }
  .nav-actions { display: none; }
}
