@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body {
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  font-weight: lighter;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow: hidden;
}

#currentDate {
  font-family: "Roboto", sans-serif;
  font-size: 5em;
  color: #a8a8a8;
  text-align: center;
}

.search-container {
  display: flex;
  margin-top: 40px;
  transform: translateY(30px);
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
  animation-delay: 0.5s;
  justify-content: center;
  transition-delay: 0.2s;
}

body.light-mode #searchInput {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ccc;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#searchInput {
  padding: 12px;
  font-size: 1.2em;
  width: 300px;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  background-color: #1e1e1e;
  color: #ffffff;
}

#searchBtn {
  padding: 12px 20px;
  font-size: 1.2em;
  border: none;
  border-radius: 0 4px 4px 0;
  background-color: #3a3a3a;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#searchBtn:hover {
  background-color: #5a5a5a;
  box-shadow: 0 0 10px #ffffff33;
}

body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode #currentTime,
body.light-mode #currentDate {
  color: #000000;
}

body.light-mode #settingsOverlay {
  background-color: rgba(255,255,255,0.95);
}

body.light-mode .settings-content {
  color: #000000;
}

body.light-mode .settings-content input[type="radio"] {
  accent-color: #000000;
}

body.light-mode .settings-content input[type="text"] {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ccc;
}

body.light-mode .settings-content button {
  background-color: #dddddd;
  color: #000000;
}

#currentDate {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

#mainContent {
  font-family: "Roboto", sans-serif;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1s ease-in forwards;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.prompt-box {
  text-align: center;
  color: #ffffff;
}

.prompt-box h2 {
  font-family: "Roboto", sans-serif;
  font-size: 2em;
  margin-bottom: 20px;
}

.name-input-group {
  justify-content: center;
  animation: fadeIn 1s ease-in forwards;
}

body.light-mode .overlay {
  background-color: rgba(255,255,255,0.85);
}

body.light-mode .prompt-box {
  color: #000000;
}

body.light-mode .name-input-group input {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode .name-input-group button {
  background-color: #dddddd;
  color: #000000;
}

#userName {
  padding: 12px;
  font-size: 1.2em;
  width: 300px;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  background-color: #1e1e1e;
  color: #ffffff;
}

#saveName {
  padding: 12px 20px;
  font-size: 1.2em;
  border: none;
  border-radius: 0 4px 4px 0;
  background-color: #3a3a3a;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#saveName:hover {
  background-color: #5a5a5a;
  box-shadow: 0 0 10px #ffffff33;
}

body.light-mode #userName {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode #saveName {
  background-color: #dddddd;
  color: #000000;
}

#greeting {
  font-size: 3em;
  color: #ffffff;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  text-align: center;
}

body.light-mode #greeting {
  color: #000000;
}

#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.todo-container {
  position: fixed;
  margin: 10px;
  bottom: 10px;
  right: 15px;
  width: 250px;
  background-color: #1e1e1e;
  color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9em;
  box-shadow: 0 0 10px #00000033;
  z-index: 9999;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.todo-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.todo-container h4 {
  font-family: "Roboto", sans-serif;
  margin-top: 0;
  font-size: 1em;
}

#todoList {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

#todoList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  background-color: #333;
  padding: 6px 8px;
  border-radius: 4px;
}

#todoList li.checked {
  text-decoration: line-through;
  opacity: 0.6;
}

#todoInput {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 4px;
  background-color: #2a2a2a;
  color: #ffffff;
}

body.light-mode .todo-container {
  background-color: #f0f0f0;
  color: #000000;
}

body.light-mode #todoList li {
  background-color: #dddddd;
}

body.light-mode #todoInput {
  background-color: #ffffff;
  color: #000000;
}

.layout-anchor {
  position: relative;
  width: 100%;
  height: 0; /* or minimal height if needed */
}

/* Overlay */
#settingsOverlay {
  font-family: "Roboto", sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(20, 20, 20, 0.95);
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 9999;
}

#settingsOverlay.settings-visible {
  opacity: 1;
  pointer-events: auto;
}


/* Content */
.settings-content {
  flex: 1;
  padding: 30px;
  color: #fff;
  overflow-y: auto;
  max-height: 90vh;
}

/* Close Button */
#closeSettings {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #fff;
  cursor: pointer;
}

body.light-mode #closeSettings {
  color: #000000;
}

#openSettings {
  position: fixed;
  top: 20px;
  right: 25px;
  background-color: #3a3a3a;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 1.2em;
  border-radius: 6px;
  cursor: pointer;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

#openSettings:hover {
  background-color: #5a5a5a;
  box-shadow: 0 0 10px #ffffff33;
}

#openSettings.hidden {
  opacity: 0;
  pointer-events: none;
}

.settings-content h3 {
  margin-top: 30px;
  font-size: 1.2em;
  border-bottom: 1px solid #444;
  padding-bottom: 6px;
  color: #fff;
}

.settings-content label {
  color: #fff;
}

body.light-mode .settings-content h3 {
  border-bottom: 1px solid #ccc;
  color: #000000;
}

body.light-mode .settings-content label {
  color: #000000;
}

#showtodo {
  position: fixed;
  top: 70px;
  right: 20px;
  background-color: #3a3a3a;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 1.2em;
  border-radius: 6px;
  cursor: pointer;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

html, body {
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Shared styles */
#clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Segoe UI', sans-serif;
  color: var(--clock-color, #fff);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  transition-delay: 0.1s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.time-row {
  display: flex;
  align-items: center;
}

.time {
  font-size: 20rem;       /* main time large */
  font-weight: 700;
  line-height: 1;
}

.right-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 14px;     /* a little more breathing room */
  line-height: 1;
}

.ampm {
  font-size: 6.5rem;       /* smaller than seconds */
  font-weight: 600;
  margin-bottom: 0.2rem; /* tighter spacing */
}

.seconds {
  font-size: 8rem;       /* bigger than AM/PM, but smaller than main time */
  font-weight: 500;
  opacity: 0.9;
}

body.light-mode #clock {
  --clock-color: #000; /* dark text for light backgrounds */
  color: #000;
}

#searchEngine {
  padding: 6px;
  font-size: 1rem;
  border-radius: 4px;
  background-color: var(--dropdown-bg, #222);
  color: var(--dropdown-text, #fff);
  border: 1px solid #444;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Optional: hover and focus styles */
#searchEngine:hover,
#searchEngine:focus {
  background-color: #333;
  border-color: #666;
}

button:hover {
  transform: scale(1.05);
}

body.minimal-mode #nonEssentialUI {
  display: none;
}

body.minimal-mode {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
}

body.light-theme.minimal-mode {
  background-color: #1e1e1e !important;
  --text-color: #222;
}

body.minimal-mode button,
body.minimal-mode input,
body.minimal-mode select {
  background-color: var(--button-bg);
  color: var(--text-color);
  border: 1px solid var(--text-color);
}

:root {
  --bg-color: #1e1e1e;
  --text-color: #f0f0f0;
  --button-bg: #2c2c2c;
}

body.light-theme {
  --bg-color: #f5f5f5;
  --text-color: #222222;
  --button-bg: #ffffff;
}

body.minimal-mode * {
  background-color: transparent !important;
  color: #ffffff !important;
  border-color: #444 !important;
}

body.minimal-mode #greeting {
	display: none;
}

body.minimal-mode #currentDate {
	display: none;
}

#clock, .search-container {
  position: relative;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

body.minimal-mode #clock {
  transform: translateY(-50px);
  opacity: 1;
}

body.minimal-mode .search-container {
  transform: translateY(50px);
  opacity: 1;
}

body:not(.minimal-mode) #clock,
body:not(.minimal-mode) #searchBox {
  transform: translateX(0);
}

#wave-bg {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;           /* adjust wave height */
  pointer-events: none;    /* clicks pass through */
  z-index: -1;      			 /* behind your UI */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Make waves fill and overlap slightly for depth */
#wave-bg .wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;             /* two tiles side-by-side */
  height: 50%;
}

/* Layering and subtle parallax */
#wave-bg .wave-back { height: 55%; opacity: 0.6; filter: blur(0.3px); }
#wave-bg .wave-front { height: 70%; opacity: 0.9; }

/* Optional: smooth page transitions */
body, #wave-bg .wave {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  #wave-bg .wave .moving animateTransform { display: none; }
}

body.wave-enabled #wave-bg {
  visibility: visible;
  opacity: 1;
}
