/* ============================================
   AI Prompt Playbook — Booooooom-inspired Style
   Clean, content-first, art-blog aesthetic.
   Fonts: Montserrat (≈ Brandon Grotesque) + JetBrains Mono (≈ Pitch)
   Colors: Black #000, White #fff, Gray #F2F2F2, Muted #939393
   ============================================ */

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

:root {
  --black: #000000;
  --white: #FFFFFF;
  --gray: #F2F2F2;
  --muted: #939393;
  --border: #000000;
  --border-light: #E0E0E0;
  --font-body: 'Montserrat', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.1;
  color: var(--black);
}

a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--black);
  transition: border-color 0.2s ease;
}
a:hover, a:focus {
  border-color: transparent;
}

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

/* --- Utility --- */
.hidden { display: none !important; }

/* --- Buttons (Booooooom style) --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 400;
  line-height: 30px;
  padding: 0.5625em 2.625em 0.25em;
  text-align: center;
  color: var(--black);
  background-color: transparent;
  border: 2px solid var(--black);
  border-radius: 0;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  -webkit-appearance: none;
  text-decoration: none;
}
.btn:hover, .btn:active, .btn:focus {
  background-color: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}
.btn-sm {
  font-size: 0.8125em;
  padding: 0.375em 1.5em 0.2em;
}
.btn-full {
  width: 100%;
  margin-top: 16px;
  padding: 0.75em 2em 0.5em;
  font-size: 1em;
  font-weight: 600;
}
.btn[disabled] {
  border-color: var(--muted);
  color: var(--muted);
  cursor: default;
}
.btn[disabled]:hover {
  background-color: transparent;
  color: var(--muted);
  border-color: var(--muted);
}

/* --- Header --- */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}
.boom-logo {
  font-family: var(--font-mono);
  font-size: 1em;
  font-weight: 700;
  color: var(--black);
  border-bottom: none;
  letter-spacing: 0;
}
.boom-logo:hover {
  border-bottom: none;
}
.header-nav {
  display: flex;
  gap: 28px;
}
.header-nav a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  border-bottom: 2px solid var(--black);
  padding-bottom: 0;
}
.header-nav a:hover {
  border-bottom-color: transparent;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
}

/* --- Hero --- */
#hero {
  border-bottom: 1px solid var(--border-light);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 20px 60px;
}
.hero-title {
  font-size: 3.375em;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 800px;
}
.hero-desc {
  font-size: 1.3em;
  line-height: 1.65;
  color: var(--black);
  margin-bottom: 36px;
  max-width: 640px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-meta {
  border-top: 1px solid var(--border-light);
  padding-top: 28px;
  max-width: 480px;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}
.meta-list {
  list-style: none;
  padding: 0;
}
.meta-list li {
  font-size: 0.95em;
  line-height: 1.8;
  color: var(--black);
  padding: 2px 0;
}
.meta-list li::before {
  content: '—';
  margin-right: 8px;
  color: var(--muted);
}

/* --- Sections --- */
section {
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 49px;
}
.section-gray {
  background: var(--gray);
}
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 20px;
}
.section-title {
  font-size: 2.25em;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 1.3em;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 560px;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.col-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Form --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group > label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
}
.label-muted {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
textarea, input[type="text"], input[type="email"] {
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 400;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
  line-height: 1.6;
}
textarea:focus, input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--black);
}
textarea::placeholder, input[type="text"]::placeholder, input[type="email"]::placeholder {
  color: var(--muted);
}

/* --- Pill / Radio Group --- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: var(--white);
  color: var(--black);
  transition: all 0.2s ease;
}
.pill input[type="radio"] {
  display: none;
}
.pill:hover {
  border-color: var(--black);
}
.pill:has(input:checked) {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Style tag buttons */
.pill-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}
.pill-btn:hover {
  border-color: var(--black);
  color: var(--black);
}
.pill-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* --- Output --- */
.col-output {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.output-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 2px dashed rgba(0, 0, 0, 0.15);
  padding: 40px;
  text-align: center;
}
.output-empty p {
  font-size: 0.95em;
  color: var(--muted);
  line-height: 1.8;
}

/* --- Result Cards --- */
.result-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 24px;
  transition: border-color 0.2s ease;
}
.result-card:hover {
  background: var(--gray);
}
.result-card-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.result-card-text {
  font-size: 1em;
  line-height: 1.8;
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 18px;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}
.copy-btn:hover {
  background: var(--black);
  color: var(--white);
}
.copy-btn.copied {
  background: var(--black);
  color: var(--white);
}

/* --- Upload Area --- */
.upload-area {
  border: 2px dashed var(--black);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease;
  background: var(--white);
}
.section-gray .upload-area {
  background: var(--white);
}
.upload-area:hover {
  border-color: var(--black);
}
.upload-placeholder {
  text-align: center;
  color: var(--muted);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.upload-placeholder svg {
  color: var(--black);
  opacity: 0.3;
}
.upload-placeholder p {
  font-size: 0.95em;
}
.upload-hint {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.image-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 300px;
}

/* --- Effects Grid --- */
.effects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.effect-card {
  padding: 40px 24px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease;
  background: var(--white);
  text-align: center;
}
.effect-card:hover {
  background: var(--gray);
}
.effect-card:hover .effect-card-desc {
  color: #666;
}
.effect-card-title {
  font-family: var(--font-body);
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 6px;
}
.effect-card-desc {
  font-size: 0.8125em;
  color: var(--muted);
  line-height: 1.6;
  transition: color 0.2s ease;
}

/* --- About --- */
.about-body {
  max-width: 640px;
}
.about-body p {
  font-size: 1em;
  line-height: 1.65;
  margin-bottom: 4px;
  color: var(--muted);
}

/* --- Footer --- */
#footer {
  border-top: 1px solid var(--border-light);
  border-bottom: none;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  font-weight: 700;
  font-size: 0.8125em;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5em;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .effects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--black);
    flex-direction: column;
    padding: 20px 24px;
    gap: 14px;
  }
  .header-nav.open {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .hero-title {
    font-size: 2em;
  }
  .hero-desc, .section-desc, .about-body p {
    font-size: 1em;
  }
  .section-title {
    font-size: 1.5em;
  }
  .section-inner {
    padding: 40px 16px;
  }
  .hero-inner {
    padding: 48px 16px 40px;
  }
  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6em;
  }
  .effects-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* --- Loading & Fallback --- */
.output-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 20px;
  padding: 40px;
}
.output-loading p {
  font-size: 0.875em;
  color: var(--muted);
}
.loading-dots {
  display: flex;
  gap: 6px;
}
.loading-dots span {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--black);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.15; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.fallback-notice {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 16px;
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  background: var(--white);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 640px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
.contact-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.contact-status.success {
  color: #2a7d2e;
}
.contact-status.error {
  color: #c00;
}
