/* Color Match Finder Standalone Styles */
:root {
  --background: hsl(42, 85%, 96%);
  --foreground: hsl(0, 0%, 0%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(0, 0%, 0%);
  --muted: hsl(42, 50%, 92%);
  --muted-foreground: hsl(0, 0%, 40%);
  --primary: hsl(40, 100%, 71%);
  --primary-foreground: hsl(0, 0%, 0%);
  --secondary: hsl(0, 0%, 0%);
  --border: hsl(42, 30%, 88%);
  --shadow-glow: 0 8px 32px hsla(40, 100%, 71%, 0.2);
  --gradient-hero: linear-gradient(180deg, hsl(42, 85%, 96%), hsl(0, 0%, 100%));
  --radius: 16px;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--gradient-hero);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.page {
  min-height: 100vh;
}

section {
  margin-top: 16px;
}

.section {
  padding: 4rem 1.5rem;
}

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

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-glow);
}

.hero {
  padding: 4rem 1.5rem 2rem;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow-glow);
}

.hero-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(248, 244, 235, 0.95), rgba(248, 244, 235, 0.75));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
}

.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted-foreground);
  max-width: 560px;
  margin: 0 auto;
}

#keyword-generate {
  display: flex;
}

.tabs-card {
  padding: 2.5rem;
  margin: 0 auto;
  max-width: 680px;
}

.tabs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  background: var(--muted);
  border-radius: 999px;
  padding: 0.5rem;
  margin-bottom: 2rem;
}

.tab-button {
  border-radius: 999px;
  padding: 0.85rem 1.25rem !important;
  font-weight: 600;
  background: transparent;
  transition: all 0.2s ease;
  color: #FFF;
}

.tab-button.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.field-label {
  font-size: 1.125rem;
  font-weight: 600;
}

.color-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.color-picker {
  position: relative;
}

#hex-input {
  padding-left: 24px;
}

.color-picker input[type="color"] {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
  background: transparent;
}

.color-picker input[type="color"]:hover {
  transform: scale(1.05);
}

.color-picker .icon {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.text-input {
  flex: 1 1 220px;
  position: relative;
}

.text-input span {
  position: absolute;
  inset: 50% auto auto 14px;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-weight: 600;
}

.text-input input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem 0.9rem 2.5rem;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 201, 107, 0.35);
}

.primary-button {
  background: #ffc96b;
  color: #000;
  padding: 0.9rem 1.75rem;
  border-radius: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, filter 0.2s ease;
  flex: 0 0 auto;
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.1);
}

.primary-button .icon {
  margin-right: 0.5rem;
}

.preview {
  display: none;
  gap: 0.75rem;
  align-items: center;
  background: #f5efe0;
  border-radius: 16px;
  padding: 0.75rem 1rem;
}

.preview.show {
  display: flex;
}

.preview-swatch {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-meta span:first-child {
  font-size: 0.95rem;
  font-weight: 600;
}

.preview-meta span:last-child {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.helper-text {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.keyword-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.keyword-row input {
  flex: 1 1 240px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.keyword-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 201, 107, 0.35);
}

.keyword-error {
  color: #d64545;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 16px;
}

.keyword-tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.95rem !important;
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: capitalize;
  font-size: 0.9rem;
}

.keyword-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.keyword-result {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted-foreground);
}

.keyword-result span {
  font-weight: 600;
  color: var(--foreground);
}

.hidden {
  display: none !important;
}

.palettes {
  padding: 0 1.5rem 4rem;
}

.palette-block {
  margin-bottom: 2.5rem;
}

.palette-block:last-child {
  margin-bottom: 0;
}

.palette-header h3 {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}

.palette-header p {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  margin: 0;
}

.palette-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .palette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .palette-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.palette-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.palette-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.palette-swatch {
  height: 110px;
  cursor: pointer;
}

.palette-meta {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  text-align: center;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.copy-button:hover {
  color: var(--foreground);
}

.copy-button.copied {
  color: #2d7a46;
}

.secondary-section {
  background: rgba(255, 255, 255, 0.8);
}

.section-muted {
  background: rgba(248, 244, 235, 0.7);
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), hsl(40, 100%, 80%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto 3rem;
}

.benefits-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.benefit-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.benefit-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-glow);
}

.benefit-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-foreground);
}

.benefit-content h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.benefit-content p {
  margin: 0;
  color: var(--muted-foreground);
}

.steps-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
  background: var(--card);
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.step-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-glow);
}

.step-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.step-index {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffc96b;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffc96b;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}

.step-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.step-content p {
  margin: 0;
  color: var(--muted-foreground);
}

.step-arrow {
  display: none;
}

@media (min-width: 992px) {
  .step-card {
    margin-bottom: 0;
  }

  .step-arrow {
    display: block;
    position: absolute;
    top: 50%;
    right: -28px;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.2);
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  padding: 0 1.5rem;
  transition: box-shadow 0.2s ease;
}

.faq-item.open {
  box-shadow: var(--shadow-glow);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.faq-trigger .icon {
  transition: transform 0.2s ease;
}

.faq-item.open .faq-trigger .icon {
  transform: rotate(90deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--muted-foreground);
}

.faq-content-inner {
  padding-bottom: 1.25rem;
  padding-right: 1rem;
}

.quotesnap-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .quotesnap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quotesnap-image {
  border-radius: 24px;
  overflow: hidden;
  border: 6px solid rgba(255, 201, 107, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.quotesnap-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quotesnap-point {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 1.05rem;
}

.quotesnap-point .icon {
  width: 24px;
  height: 24px;
  color: #ffc96b;
  flex-shrink: 0;
}

.quotesnap-note {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  color: var(--muted-foreground);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.quotesnap-cta {
  margin-top: 2.5rem;
  text-align: center;
  background: #ffc96b;
  border-radius: 24px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
}

.quotesnap-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  background: #fff;
  color: #000;
  padding: 1rem 2.5rem;
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quotesnap-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.quotesnap-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  background: rgba(255, 255, 255, 0.7);
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #1f2937;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

svg.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

svg.icon.icon-small {
  width: 18px;
  height: 18px;
}

@media (max-width: 600px) {
  .tabs-card {
    padding: 1.75rem;
  }

  .color-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button {
    width: 100%;
  }

  .keyword-row {
    flex-direction: column;
  }

  .keyword-row input {
    width: 100%;
  }

  .hero-image {
    height: 280px;
  }
}