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

:root {
  --bg: #fffef9;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #ff6b35;
  --border: #1a1a1a;
  --card: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Product Hunt Badge */
.ph-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  transition: transform 0.2s;
}

.ph-badge:hover {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .ph-badge {
    bottom: 16px;
    right: 16px;
  }
  .ph-badge img {
    width: 200px;
    height: auto;
  }
}

/* Main */
main {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 0;
  position: relative;
}

.sketch-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border: 3px solid var(--border);
  border-radius: 53% 47% 52% 48% / 36% 41% 59% 64%;
  opacity: 0.06;
  animation: morph 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes morph {
  0%, 100% { border-radius: 53% 47% 52% 48% / 36% 41% 59% 64%; }
  50% { border-radius: 37% 63% 56% 44% / 49% 56% 44% 51%; }
}

h1 {
  font-family: 'Caveat', cursive;
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 8px;
  background: var(--accent);
  opacity: 0.3;
  border-radius: 4px;
  z-index: -1;
}

.tagline {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--muted);
  margin-bottom: 48px;
}

/* Terminal */
.terminal {
  width: 100%;
  max-width: 500px;
  background: var(--text);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    8px 8px 0 0 rgba(0,0,0,0.1),
    0 4px 20px rgba(0,0,0,0.1);
  transform: rotate(-0.5deg);
  transition: transform 0.3s;
}

.terminal:hover {
  transform: rotate(0deg);
}

.terminal-bar {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  background: #2a2a2a;
}

.terminal-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }

.terminal-content {
  padding: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  min-height: 100px;
}

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

.prompt {
  color: var(--accent);
  font-weight: 700;
}

#cmd {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

#cmd::placeholder {
  color: #666;
}

#output {
  margin-top: 12px;
  color: #888;
  font-size: 0.85rem;
}

#output .ok { color: #4ade80; }
#output .err { color: #f87171; }

/* Install */
.install {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  box-shadow: 4px 4px 0 0 var(--border);
  transition: all 0.2s;
}

.install:hover {
  box-shadow: 2px 2px 0 0 var(--border);
  transform: translate(2px, 2px);
}

.install code {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
}

#copy {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  padding: 4px;
  transition: color 0.2s;
}

#copy:hover { color: var(--text); }
#copy.done { color: var(--accent); }

.note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Examples */
.examples {
  padding: 80px 0;
}

.examples h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  padding: 20px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 8px;
  transform: translate(4px, 4px);
  z-index: -1;
  transition: transform 0.2s;
}

.card:hover::before {
  transform: translate(2px, 2px);
}

.card:hover {
  transform: translate(2px, 2px);
}

.card code {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.card span {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--muted);
}

/* Footer */
footer {
  text-align: center;
  padding: 60px 0 120px;
  border-top: 2px dashed var(--border);
}

.links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.links a {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.links a:hover {
  border-color: var(--accent);
}

.links span {
  color: var(--muted);
}

footer p {
  font-size: 0.9rem;
  color: var(--muted);
}

footer p a {
  color: var(--text);
  text-decoration: none;
}

footer p a:hover {
  text-decoration: underline;
}

/* Selection */
::selection {
  background: var(--accent);
  color: #fff;
}
