/* =========================
   GLOBAL RESET
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  transition: background 0.4s ease;
  background: #f4f8f6;
}

/* =========================
   LAYOUT
========================= */

.container {
  max-width: 900px;
  margin: auto;
  padding: 18px;
}

/* =========================
   CARD SYSTEM
========================= */

.card {
  background: #fff;
  padding: 26px;
  border-radius: 18px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(0,0,0,0.10);
}

/* =========================
   TEXT
========================= */

h1 {
  text-align: center;
  font-size: 26px;
}

h2 {
  font-size: 20px;
}

p, li {
  font-size: 15px;
  color: #444;
}

/* =========================
   INPUT
========================= */

input {
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  font-size: 15px;
  outline: none;
}

input:focus {
  box-shadow: 0 0 0 3px rgba(39,174,96,0.15);
}

/* =========================
   BASE BUTTON (IMPORTANT)
========================= */
button {
  font-family: inherit;
}

.btn {
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  color: white;
  background: #27ae60;
}

.btn:hover {
  background: #1f8f4d;
}


/* =========================
   TTS CONTROLS (FINAL FIXED VERSION)
========================= */
.tts-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.tts-btn {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 12px;

  cursor: pointer;
  font-size: 18px;
  color: white;

  transition: all 0.2s ease;
}

/* softer colors */
.tts-btn.play { background: #2ecc71; }
.tts-btn.play:hover { background: #27ae60; }

.tts-btn.pause { background: #f1c40f; color: #333; }
.tts-btn.pause:hover { background: #d4ac0d; }

.tts-btn.stop { background: #e67e73; }
.tts-btn.stop:hover { background: #c0392b; }

.tts-btn:active {
  transform: scale(0.95);
}
/* =========================
   RESULT BOX
========================= */

.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   NAV
========================= */

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

nav a {
  text-decoration: none;
  color: #27ae60;
  font-weight: 600;
}

.nav a {
  margin-right: 12px;
  display: inline-block;
}

/* =========================
   FEATURES
========================= */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* =========================
   DAY THEMES
========================= */

.day-mon { background: linear-gradient(to right, #e8f5e9, #f4f8f6); }
.day-tue { background: linear-gradient(to right, #f5efe6, #fdfaf6); }
.day-wed { background: linear-gradient(to right, #fff9e6, #f4f8f6); }
.day-thu { background: linear-gradient(to right, #fde7f3, #f4f8f6); }
.day-fri { background: linear-gradient(to right, #fff8e1, #fff3cd); }
.day-sat { background: linear-gradient(to right, #e0f2f1, #f4f8f6); }
.day-sun { background: linear-gradient(to right, #f3e5f5, #f4f8f6); }

/* =========================
   LANGUAGE THEMES (BODY)
========================= */

body.theme-en { background: linear-gradient(to bottom, #e8f5e9, #f4f8f6); }
body.theme-ms { background: linear-gradient(to bottom, #fff8e1, #f4f8f6); }
body.theme-zh { background: linear-gradient(to bottom, #f8d7e8, #f4f8f6); }
body.theme-fr { background: linear-gradient(to bottom, #f3e5f5, #f4f8f6); }
body.theme-es { background: linear-gradient(to bottom, #ffe0b2, #f4f8f6); }

body.theme-default {
  background: linear-gradient(to bottom, #f4f8f6, #eef6f1);
}

/* =========================
   ECO THEMES (BACKGROUND ONLY)
========================= */

body.theme-water { background: linear-gradient(to bottom, #e0f7fa, #f4f8f6); }
body.theme-tree { background: linear-gradient(to bottom, #e8f5e9, #f4f8f6); }
body.theme-carbon { background: linear-gradient(to bottom, #e3f2fd, #f4f8f6); }
body.theme-plastic { background: linear-gradient(to bottom, #fce4ec, #f4f8f6); }

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .container { padding: 14px; }
  .card { padding: 20px; }
  h1 { font-size: 23px; }
  h2 { font-size: 18px; }
  p, li { font-size: 14px; }
}
