/*
 * FartSound.net Stylesheet
 * A playful yet clean design to support the light‑hearted nature of the site.
 * Uses CSS variables for easy theming and responsive layouts for mobile support.
 */

/* Root colour palette */
:root {
  --primary-colour: #fff8e1;       /* warm off‑white for page backgrounds */
  --accent-colour: #aed581;        /* soft green reminiscent of a cartoon fart cloud */
  --highlight-colour: #ffd54f;      /* golden yellow used for highlights and call‑to‑actions */
  --text-dark: #2e3d27;            /* dark greenish brown for high contrast text */
  --text-light: #ffffff;           /* white text for dark backgrounds */
  --max-width: 1100px;             /* maximum layout width */
}

/* Global resets and typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: var(--primary-colour);
  color: var(--text-dark);
}

h1, h2, h3, h4 {
  margin-top: 0;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

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

/* Container utility */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 10px;
}

/* Header and navigation */
header {
  background-color: var(--accent-colour);
  color: var(--text-dark);
  padding: 20px 0;
  border-bottom: 4px solid var(--highlight-colour);
}

header .branding {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

nav {
  margin-top: 10px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

nav li {
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

nav a:hover {
  background-color: var(--highlight-colour);
  color: var(--text-dark);
}

/* Hero section on home page */
.hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 40px 0;
}

.hero .hero-text {
  flex: 1 1 400px;
}

.hero .hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.hero .hero-text p {
  font-size: 1.1rem;
}

.hero .hero-image {
  flex: 1 1 300px;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--highlight-colour);
  color: var(--text-dark);
  padding: 10px 18px;
  margin: 5px 0;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #ffca28;
}

/* Play button style */
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--highlight-colour);
  color: var(--text-dark);
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-button:hover {
  transform: scale(1.05);
  background-color: #ffca28;
}

/* Section styles */
section {
  margin: 40px 0;
}

section h2 {
  margin-bottom: 20px;
  color: var(--accent-colour);
  font-size: 1.6rem;
}

.facts-list {
  padding-left: 20px;
}

.facts-list li {
  margin-bottom: 10px;
}

/* Soundboard grid */
.soundboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.sound-item {
  background-color: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.sound-item h3 {
  margin-top: 0;
}

.sound-item button {
  margin-top: 10px;
  padding: 8px 16px;
  border: none;
  background-color: var(--highlight-colour);
  color: var(--text-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.sound-item button:hover {
  background-color: #ffca28;
}

/* Timer form */
.timer-form {
  background-color: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 6px;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.timer-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.timer-form input,
.timer-form select,
.timer-form button {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #c5e1a5;
  border-radius: 4px;
  font-size: 1rem;
}

.timer-form button {
  background-color: var(--highlight-colour);
  color: var(--text-dark);
  font-weight: 700;
  cursor: pointer;
}

.timer-form button:hover {
  background-color: #ffca28;
}

/* Footer */
footer {
  background-color: var(--accent-colour);
  color: var(--text-dark);
  padding: 15px 0;
  text-align: center;
}

/* Timer page specific styles */
.timer-subtitle {
  text-align: center;
  font-size: 1.1rem;
  margin: 20px auto 30px;
  max-width: 600px;
}

.countdown-display {
  background-color: #fff3e0;
  border: 3px solid var(--highlight-colour);
  border-radius: 20px;
  padding: 30px;
  margin: 30px auto;
  max-width: 500px;
  min-height: 120px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.countdown-text {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-dark);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.fart-cloud {
  font-size: 4rem;
  position: absolute;
  animation: float 3s ease-in-out infinite;
  opacity: 0.8;
}

.fart-cloud.hidden {
  display: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.quick-timers {
  background-color: #f9fbe7;
  border-radius: 10px;
  padding: 25px;
  margin: 30px auto;
  max-width: 600px;
  text-align: center;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.preset-btn {
  background-color: var(--highlight-colour);
  border: 2px solid transparent;
  color: var(--text-dark);
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-btn:hover {
  background-color: #ffca28;
  transform: scale(1.05);
  border-color: var(--accent-colour);
}

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

.timer-form {
  background-color: #f1f8e9;
  border: 2px solid var(--accent-colour);
  border-radius: 15px;
  padding: 30px;
  max-width: 600px;
  margin: 30px auto;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.form-row input {
  width: auto;
  display: inline-block;
  padding: 10px;
  font-size: 1.1rem;
  border: 2px solid #c5e1a5;
  border-radius: 8px;
  margin-right: 10px;
}

.input-suffix {
  font-size: 1.1rem;
  font-weight: 600;
}

.sound-selector {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sound-selector select {
  flex: 1;
  min-width: 200px;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #c5e1a5;
  border-radius: 8px;
}

.preview-btn {
  background-color: #81c784;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.preview-btn:hover {
  background-color: #66bb6a;
}

.big-btn {
  width: 100%;
  padding: 20px;
  font-size: 1.3rem;
  font-weight: bold;
  background-color: #ff5722;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.big-btn:hover {
  background-color: #f4511e;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.cancel-btn {
  display: block;
  margin: 20px auto;
  padding: 15px 30px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background-color: #d32f2f;
}

.cancel-btn.hidden {
  display: none;
}

/* Ad placeholder styling */
.ad-placeholder {
  background-color: #fffde7;
  border: 1px dashed #ffd54f;
  color: #827717;
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
  text-align: center;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .play-button {
    width: 80px;
    height: 80px;
    font-size: 1.2rem;
  }
  nav ul {
    gap: 10px;
  }
}