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

:root {
  --bg: #0f0e17;
  --bg2: #1a1928;
  --text: #fffffe;
  --text-dim: #a7a9be;
  --accent: #ff8906;
  --accent2: #e53170;
  --green: #2cb67d;
  --blue: #7f5af0;
  --card-bg: #1a1928;
  --card-border: #2e2b48;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Bubbles background */
.bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -100px;
  background: radial-gradient(circle at 30% 30%, rgba(127, 90, 240, 0.3), rgba(255, 137, 6, 0.1));
  border-radius: 50%;
  animation: floatUp linear forwards;
  opacity: 0.6;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(127, 90, 240, 0.15) 0%, transparent 60%);
}

.hero__emoji {
  font-size: 5rem;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255, 137, 6, 0.4));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero__title {
  font-family: 'Comfortaa', cursive;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  margin: 1rem 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-dim);
  max-width: 500px;
  margin-bottom: 2rem;
}

.fart-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 25px rgba(255, 137, 6, 0.4);
}

.fart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 35px rgba(255, 137, 6, 0.6);
}

.fart-btn:active {
  transform: scale(0.95);
}

.fart-btn__icon {
  font-size: 1.5rem;
  animation: wiggle 0.3s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.fart-counter {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-dim);
}

.fart-counter span {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.2rem;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section__title {
  font-family: 'Comfortaa', cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(127, 90, 240, 0.15);
  border-color: var(--blue);
}

.card__emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.card__text {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  transition: transform 0.3s, border-color 0.3s;
}

.step:hover {
  transform: translateX(8px);
  border-color: var(--green);
}

.step__number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Comfortaa', cursive;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 50%;
}

.step__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.3rem;
}

.step__text {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Soundboard */
.soundboard__hint {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.sounds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.sound-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.sound-btn:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 137, 6, 0.2);
}

.sound-btn:active {
  transform: scale(0.95);
}

.sound-btn__emoji {
  font-size: 2.5rem;
}

.sound-btn__name {
  font-weight: 700;
  font-size: 1rem;
}

.sound-btn__desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.visualizer {
  text-align: center;
}

#waveCanvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

/* Pro tips */
.pro-tips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pro-tip {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}

.pro-tip:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.pro-tip__icon {
  font-size: 2rem;
}

.pro-tip__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent2);
  margin: 0.5rem 0 0.3rem;
}

.pro-tip__text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Rating */
.rating {
  text-align: center;
}

.rating__subtitle {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.star {
  font-size: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  filter: grayscale(1) opacity(0.4);
}

.star.active {
  filter: none;
  transform: scale(1.2);
}

.star:hover {
  transform: scale(1.3);
}

.rating-result {
  margin-top: 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  min-height: 2rem;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item[open] {
  border-color: var(--blue);
}

.faq-item__q {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::before {
  content: '▸ ';
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item[open] .faq-item__q::before {
  content: '▾ ';
}

.faq-item__a {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Fart cloud animation */
.fart-cloud {
  position: fixed;
  font-size: 3rem;
  pointer-events: none;
  z-index: 100;
  animation: fartCloud 1.5s ease-out forwards;
}

@keyframes fartCloud {
  0% {
    transform: scale(0.5) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(2) translateY(-150px);
    opacity: 0;
  }
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--card-border);
}

.footer__fart {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounce 3s ease-in-out infinite;
}

.footer__text {
  color: var(--text-dim);
  font-size: 1rem;
}

.footer__copy {
  color: var(--card-border);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Screen shake */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1deg); }
  40% { transform: translateX(5px) rotate(1deg); }
  60% { transform: translateX(-3px) rotate(-0.5deg); }
  80% { transform: translateX(3px) rotate(0.5deg); }
}

/* Responsive */
@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .pro-tips {
    grid-template-columns: 1fr;
  }

  .sounds {
    grid-template-columns: repeat(2, 1fr);
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
