/* =============================
   GLOBAL DEFAULT STYLES
============================= */
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #333;
  font-family: 'Poppins', sans-serif;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.container {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  text-align: center;
  z-index: 1;
}

#waveCanvas {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 200px;
  z-index: 0;
  pointer-events: none;
}

/* =============================
   FIXED MENU BAR
============================= */
.menu-bar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  background-color: #4ECDC4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  color: white;
}
.menu-bar .logo {
  font-weight: bold;
}
.menu-links {
  display: flex;
  gap: 10px;
}
.preset-btn {
  background-color: #ffffff;
  color: #4ECDC4;
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
}
.preset-btn:hover {
  background-color: #e6f9f7;
}

/* =============================
   CONTENT STYLING
============================= */
.lyrics-display {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  max-height: 200px;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top: 60px; /* to avoid overlapping menu bar */
}
.lyrics-line {
  font-size: 1.2rem;
  color: #333;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.word-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  margin: 0 auto 20px auto;
  gap: 10px;
  min-height: 50px;
  z-index: 5;
  position: relative;
  overflow: visible;
  background: transparent;
}

.word-item {
  font-size: 1.1rem;
  color: #000 !important;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1 !important;
  transition: none;
  background: none;
  border: none;
  padding: 0;
}

.prompt {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

/* =============================
   BUTTON STYLES
============================= */
.input-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.left-buttons {
  display: flex;
  gap: 8px;
}

.input-line input {
  width: 100%;
  max-width: 300px;
  padding: 15px;
  font-size: 1.3rem;
  background-color: #f8f8f8;
  color: #333;
  border: none;
  border-radius: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  outline: none;
  text-align: center;
}

button {
  padding: 12px 20px;
  font-size: 1.2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#addButton, #clearButton, #muteButton, .mode-btn {
  background-color: #4ECDC4;
  color: white;
}

#addButton:hover, #clearButton:hover, #muteButton:hover, .mode-btn:hover {
  background-color: #3bbeb4;
  transform: scale(1.05);
}

#addButton:active, #clearButton:active, #muteButton:active, .mode-btn:active {
  transform: scale(0.95);
}

/* =============================
   MODE BUTTONS
============================= */
.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 70px;
  margin-bottom: 20px;
}

/* =============================
   THEME MODES
============================= */
body.sad-mode {
  background-color: #d0e7f9;
  color: #1e3d59;
}
body.sad-mode #addButton,
body.sad-mode #clearButton,
body.sad-mode #muteButton,
body.sad-mode .mode-btn {
  background-color: #76b5c5;
  color: white;
}
body.sad-mode button:hover {
  background-color: #5aa2b2;
}

body.happy-mode {
  background-color: #fff4e6;
  color: #d6336c;
}
body.happy-mode #addButton,
body.happy-mode #clearButton,
body.happy-mode #muteButton,
body.happy-mode .mode-btn {
  background-color: #ffe066;
  color: #d6336c;
}
body.happy-mode button:hover {
  background-color: #ffd43b;
}

body.excited-mode {
  background-color: #fff0f5;
  color: #ff4081;
}
body.excited-mode #addButton,
body.excited-mode #clearButton,
body.excited-mode #muteButton,
body.excited-mode .mode-btn {
  background-color: #ff8c00;
  color: white;
}
body.excited-mode button:hover {
  background-color: #ff7300;
}

body.dark-mode {
  background-color: #1e1e1e;
  color: #eee;
}
body.dark-mode #addButton,
body.dark-mode #clearButton,
body.dark-mode #muteButton,
body.dark-mode .mode-btn {
  background-color: #444;
  color: #fff;
}
body.dark-mode button:hover {
  background-color: #666;
}

body.dark-mode * {
  color: #ffffff !important;
}

body.calm-mode {
  background-color: #e6ecf0;
  color: #3a3a3a;
}
body.calm-mode #addButton,
body.calm-mode #clearButton,
body.calm-mode #muteButton,
body.calm-mode .mode-btn {
  background-color: #b8c1d1;
  color: #3a3a3a;
}
body.calm-mode button:hover {
  background-color: #a5b0c0;
}
