:root {
  --brand-purple: #6C4CE0;
  --brand-purple-dark: #4B32A8;
  --accent-green: #3DDC84;
  --accent-red: #E5484D;
  --bg-dark: #12101A;
  --card-dark: #1E1B2E;
  --text-light: #F5F3FF;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.landing-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  text-align: center;
}

.landing-emoji {
  font-size: 64px;
  margin-bottom: 4px;
}

.landing-content h1 {
  font-size: 28px;
  margin: 4px 0;
}

.landing-tagline {
  opacity: 0.7;
  font-size: 15px;
  margin: 8px 0 36px;
}

.enter-btn {
  display: inline-block;
  background: var(--brand-purple-dark);
  color: var(--text-light);
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(108, 76, 224, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

.enter-btn:hover {
  background: var(--brand-purple);
}

.enter-btn:active {
  transform: scale(0.96);
}

.app-header h1 {
  text-align: center;
  font-size: 22px;
  margin: 8px 0 0;
}

.build-tag {
  text-align: center;
  font-size: 12px;
  opacity: 0.4;
  padding-bottom: 4px;
}

.section-label {
  font-size: 13px;
  padding-bottom: 4px;
}

.volume-toggle {
  padding: 4px 0 8px;
}

.toggle-row {
  display: flex;
  gap: 6px;
}

.toggle-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--card-dark);
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--brand-purple-dark);
}

.grid-wrap {
  flex: 1;
  overflow-y: auto;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 4px 0;
}

.sound-tile {
  position: relative;
  height: 120px;
  border-radius: 16px;
  background: var(--card-dark);
  border: none;
  color: var(--text-light);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  transition: transform 0.08s ease, background 0.15s ease;
}

.sound-tile:active {
  transform: scale(0.96);
  background: var(--brand-purple-dark);
}

.sound-tile .star {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 20px;
  padding: 6px;
  cursor: pointer;
  line-height: 1;
}

.action-row {
  display: flex;
  gap: 8px;
  padding-top: 12px;
}

.action-btn {
  flex: 1;
  height: 60px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
}

.action-btn.card {
  background: var(--card-dark);
}

.action-btn.brand {
  background: var(--brand-purple-dark);
}

.action-btn.small {
  height: 40px;
  flex: none;
  padding: 0 14px;
  font-size: 13px;
}

.action-btn.full {
  width: 100%;
  margin-top: 20px;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.dialog-overlay.hidden {
  display: none;
}

.dialog {
  background: var(--bg-dark);
  border-radius: 18px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.dialog h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.how-to-steps {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.number-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-dark);
  border-radius: 12px;
  padding: 12px;
  margin-top: 14px;
}

.number-row span {
  flex: 1;
  font-size: 16px;
  font-weight: bold;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-dark);
  color: var(--text-light);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toast.hidden {
  display: none;
}
