/* Global Styles */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: url('assets/backgrounds/main.jpg') no-repeat center center/cover;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Centered Box */
.mainBox {
  background: rgba(255, 255, 255, 0.85);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
}

/* Titles */
h1 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  color: #333;
}

/* Category Buttons */
.categoryBtn {
  display: block;
  width: 100%;
  margin: 10px auto;
  padding: 12px 20px;
  border: none;
  background: #f7f4ee;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: inherit;
}

.categoryBtn:hover {
  background: #ece7dd;
}

/* Task Cards */
#taskGrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.taskCard {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 120px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  word-wrap: break-word;
  max-width: 130px;
}


.taskCard span {
  display: block;
  font-size: 0.95rem;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
  color: #444;
}

.taskCard:hover {
  transform: scale(1.05);
}

.taskCard img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 5px;
}

/* Timer Display */
#timerDisplay {
  font-size: 3rem;
  margin: 20px 0;
  color: #444;
}

#motivationalMessage {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #555;
  font-style: italic;
}

/* Buttons */
button {
  margin: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  background: #f0efe9;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

button:hover {
  background: #e3e1d9;
}

/* Theme Toggle */
.themeToggle {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

/* Switch Style */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #333;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Light Theme (default) */
body.light-mode {
  background-color: #f9f9f9;
  color: #333;
}

/* Dark Theme */
body.dark-mode {
  background-color: #111;
  color: #f2f2f2;
}

/* Main box background */
body.dark-mode .mainBox {
  background: rgba(25, 25, 25, 0.9); /* darker for more contrast */
}

/* Text colors */
body.dark-mode,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode #motivationalMessage,
body.dark-mode #timerDisplay {
  color: #f7f7f7;
}

/* Buttons */
body.dark-mode button {
  background-color: #2e2e2e;
  color: #f7f7f7;
}

/* Category buttons */
body.dark-mode .categoryBtn {
  background-color: #3a3a3a;
  color: #f9f9f9;
}

/* Task cards */
body.dark-mode .taskCard {
  background-color: #2a2a2a;
  color: #fafafa;
}

/* Task card text */
body.dark-mode .taskCard span {
  color: #eee;
}

#timerStickerBox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

#timerSticker {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: none;
  transition: transform 0.3s ease;
}

/* Mute Button - Top Right */
#muteBtn {
  position: fixed;
  top: 15px;
  right: 15px;
  font-size: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

/* Theme Switch (Only one, fixed at bottom center) */
#themeContainer {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.dark-mode #themeContainer {
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
}

#themeSwitch {
  cursor: pointer;
}

.sticker-box {
  text-align: center;
  margin-top: 20px;
}

/* Default sticker size */
.task-sticker {
  width: 120px;
  height: auto;
  transition: transform 0.3s ease;
}

/* Bigger sticker when countdown is shown */
#timerSection .task-sticker {
  width: 180px; /* increase size during timer */
}
.task-sticker.countdown-mode {
  width: 180px;
}

.task-sticker {
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}


