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

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a25;
  --accent-primary: #ff6b6b;
  --accent-secondary: #ffd93d;
  --accent-tertiary: #6bcb77;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --gradient-1: linear-gradient(135deg, #ff6b6b, #ffd93d);
  --gradient-2: linear-gradient(135deg, #667eea, #764ba2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.15);
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.background-glow {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 2rem;
  font-weight: 700;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-1);
  color: #000;
  border-radius: 12px;
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo .accent {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Reason Card */
.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
}

.reason-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reason-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 80px rgba(255, 107, 107, 0.2);
}

.reason-card.animate {
  animation: cardPulse 0.4s ease;
}

@keyframes cardPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.quote-mark {
  position: absolute;
  font-size: 4rem;
  color: var(--accent-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.quote-mark:first-of-type {
  top: 1rem;
  left: 1.5rem;
}

.quote-mark.end {
  bottom: 0.5rem;
  right: 1.5rem;
}

.reason-text {
  font-size: 1.25rem;
  text-align: center;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.6;
  padding: 0 1rem;
  transition: opacity 0.2s ease;
}

.reason-text.loading {
  opacity: 0.5;
}

/* Generate Button */
.generate-btn {
  margin-top: 2rem;
  background: var(--gradient-1);
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.generate-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 107, 107, 0.4);
}

.generate-btn:active {
  transform: scale(0.98);
}

.btn-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.generate-btn:hover .btn-icon {
  transform: translateX(4px);
}

.btn-subtext {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

#clickCount {
  color: var(--accent-secondary);
  font-weight: 600;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 107, 0.3);
}

.feature-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: var(--bg-elevated);
}

.feature-icon.icon-lightning {
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffd93d'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E") center/24px no-repeat;
}

.feature-icon.icon-collection {
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b6b'%3E%3Cpath d='M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z'/%3E%3C/svg%3E") center/24px no-repeat;
}

.feature-icon.icon-api {
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236bcb77'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") center/24px no-repeat;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* API Section */
.api-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 4rem;
  text-align: center;
}

.api-section h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.api-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.code-block {
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.code-method {
  background: var(--accent-tertiary);
  color: #000;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.code-url {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.code-response {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
}

.code-response code {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer>p:first-child {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.8;
}

.divider {
  color: var(--text-muted);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .reason-card {
    padding: 2rem 1.5rem;
  }

  .reason-text {
    font-size: 1.1rem;
  }

  .generate-btn {
    padding: 0.9rem 2rem;
  }

  .features {
    grid-template-columns: 1fr;
  }
}