/* -------------------------------- */
/* THEME VARIABLES                  */
/* -------------------------------- */

:root {
  --bg: #f8f8f8;
  --text: #222222;
  --card: #ffffff;
  --accent: #000000;
  --border: #dddddd;
  --muted: #777777;
}

body.theme-dark {
  --bg: #111111;
  --text: #f5f5f5;
  --card: #181818;
  --accent: #f5f5f5;
  --border: #333333;
  --muted: #999999;
}

body.theme-oled {
  --bg: #000000;
  --text: #e2b714;
  --card: #000000;
  --accent: #e2b714;
  --border: #333333;
  --muted: #999999;
}

/* -------------------------------- */
/* LAYOUT BASE                      */
/* -------------------------------- */

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  background: var(--bg);
  font-family: "Inter", sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column; /* allows sticky footer */
}

/* Main content takes remaining space */
.container {
  flex: 1;
  text-align: center;
  width: 90%;
  max-width: 380px;
  margin: 40px auto 0;
}

/* -------------------------------- */
/* HEADER                           */
/* -------------------------------- */

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* -------------------------------- */
/* INPUTS & TASK DISPLAY            */
/* -------------------------------- */

#taskInput {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  outline: none;
  margin-bottom: 12px;
  font-size: 16px;
  background: var(--card);
  color: var(--text);
}

#taskInput::placeholder {
  color: var(--muted);
}

.edit-icon {
  margin-left: 10px;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* -------------------------------- */
/* TIMER                            */
/* -------------------------------- */

.timer-display {
  font-size: 64px;
  font-weight: 600;
  margin: 24px 0;
  cursor: pointer;
}

#timerInput {
  font-size: 40px;
  text-align: center;
  width: 120px;
  border: none;
  outline: none;
  background: var(--card);
  color: var(--text);
}

#timerInput::placeholder {
  font-size: 12px;
  color: var(--muted);
}

/* -------------------------------- */
/* BUTTONS                          */
/* -------------------------------- */

button {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  background: var(--accent);
  color: var(--card);
  margin: 5px;
}

/* -------------------------------- */
/* SOUND BUTTONS                    */
/* -------------------------------- */

.sound-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sound-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sound-btn:hover {
  background: var(--card);
}

.sound-btn.active {
  background: var(--accent);
  color: var(--card);
  border-color: var(--accent);
}

/* -------------------------------- */
/* THEME DOTS                       */
/* -------------------------------- */

.theme-switch {
  display: flex;
  gap: 6px;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  padding: 0;
}

.theme-dot:nth-child(1) { background: #ffffff; }
.theme-dot:nth-child(2) { background: #202020; }
.theme-dot:nth-child(3) { background: #000000; }

.theme-dot.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------------------------------- */
/* MODAL                            */
/* -------------------------------- */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card);
  padding: 28px 32px;
  border-radius: 18px;
  text-align: center;
  max-width: 280px;
  width: 85%;
  box-shadow: 0px 6px 22px rgba(0,0,0,0.18);
  transform: translateY(20px);
  animation: slideUpFade .35s ease forwards;
}

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

.modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--accent);
  animation: pop .4s ease;
}

@keyframes pop {
  0%   { transform: scale(.2); opacity: 0; }
  65%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

#closeModal {
  background: var(--accent);
  color: var(--card);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  margin-top: 14px;
  cursor: pointer;
}

/* -------------------------------- */
/* BADGE                            */
/* -------------------------------- */

.badge {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: var(--card);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  opacity: 0.85;
}

/* -------------------------------- */
/* FOOTER (FIXED + THEME MATCHED)   */
/* -------------------------------- */

.footer {
  width: 100%;
  padding: 20px 0 30px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
  opacity: 0.8;
  transition: 0.25s ease;
}

.footer:hover {
  opacity: 1;
}

.footer .creator {
  display: block;
  margin-bottom: 8px;
}

.bmc-btn {
  padding: 2px 14px;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  transition: 0.2s ease;
}

.bmc-btn:hover {
  background: var(--text);
  color: var(--bg);
}
