body {
  font-family: 'Segoe UI', 'Fredoka', sans-serif;
  background: linear-gradient(135deg, #0B1F35, #1A293F);
  color: #F4F4F6;
  text-align: center;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-attachment: fixed;
  background-size: cover;
}

h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: #5c4d7d;
  text-shadow: 0 0 8px rgba(92, 77, 125, 0.2);
}

.lock {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 0 15px rgba(73, 227, 251, 0.15);
  padding: 2rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 520px;
  transition: box-shadow 0.3s ease;
}

.lock h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #49E3FB;
  text-shadow: 0 0 8px rgba(73, 227, 251, 0.5);
}

.timer {
  font-size: 2.7rem;
  font-weight: bold;
  color: #B672F9;
  text-shadow: 0 0 6px rgba(182, 114, 249, 0.6);
}

.encouragement {
  margin-top: 1rem;
  font-style: italic;
  font-size: 1.1rem;
  color: #A8B0B8;
  text-shadow: 0 0 4px rgba(168, 176, 184, 0.4);
  transition: opacity 0.5s ease-in-out;
}

.lock h2::before {
  content: "🐾 ";
  margin-right: 0.5rem;
}

.fade-in {
  animation: fadeIn 1s ease-in;
}

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

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  color: #333;
  font-weight: bold;
  font-family: 'Fredoka', sans-serif;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  z-index: 1000;
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast.success {
  background: #c6f6d5;
  color: #22543d;
}

.toast.error {
  background: #fed7d7;
  color: #742a2a;
}

button {
  background: linear-gradient(135deg, #49E3FB, #B672F9);
  border: none;
  padding: 12px 20px;
  border-radius: 40px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #0B1F35;
  font-family: 'Fredoka', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(73, 227, 251, 0.5), 0 0 20px rgba(182, 114, 249, 0.4);
}

button:hover {
  transform: scale(1.07);
  box-shadow: 0 0 20px rgba(73, 227, 251, 0.75), 0 0 25px rgba(182, 114, 249, 0.6);
}

button:active {
  transform: scale(0.97);
}

button::before {
  content: "🐶";
  font-size: 1.2rem;
  position: relative;
  margin-right: 0.5rem;
}

.sub-label {
  font-size: 0.95rem;
  color: #A8B0B8;
  margin-top: 0.4rem;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 4px rgba(168, 176, 184, 0.25);
}

.location-note {
  font-size: 0.85rem;
  color: #A8B0B8;
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 1rem;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.modal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 0 25px rgba(73, 227, 251, 0.3), 0 0 20px rgba(182, 114, 249, 0.2);
  max-width: 360px;
  width: 90%;
  color: #F4F4F6;
  font-family: 'Fredoka', sans-serif;
  text-align: center;
}

.modal h3 {
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: #49E3FB;
  text-shadow: 0 0 6px rgba(73, 227, 251, 0.4);
}

.modal input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #F4F4F6;
}

.modal input::placeholder {
  color: #ccc;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 30px;
  font-size: 1rem;
  background: linear-gradient(135deg, #49E3FB, #B672F9);
  color: #0B1F35;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-buttons button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(182, 114, 249, 0.5);
}
.unit-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.unit-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #F4F4F6;
}

.unit-control button {
  background: none;
  border: none;
  color: #B672F9;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.unit-control button:hover {
  transform: scale(1.3);
}

.unit-display {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 6px 0;
  text-shadow: 0 0 4px rgba(182, 114, 249, 0.7);
}

.unit-label {
  font-size: 0.9rem;
  color: #A8B0B8;
  text-shadow: 0 0 4px rgba(168, 176, 184, 0.4);
}

.total-display {
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #49E3FB;
  text-shadow: 0 0 6px rgba(73, 227, 251, 0.5);
}
.icon-button {
  background: none;
  border: none;
  font-size: 1.1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  color: #A8B0B8;
  padding: 0;
  vertical-align: middle;
  transition: transform 0.1s ease, color 0.2s ease;
}

.icon-button:hover {
  color: #F4F4F6;
  transform: scale(1.2);
}
.lock-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.lock-title h2 {
  margin: 0;
  font-size: 1.8rem;
}

.icon-button {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #A8B0B8;
  opacity: 0.6;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Log line filtering and emoji-based categorization */
.lock-log {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.5rem;
}

.lock-log li {
  padding: 2px 0;
  line-height: 1.3;
  white-space: pre-wrap;
}

.lock-log li.emoji-add {
  color: #49E3FB;
}
.lock-log li.emoji-deny {
  color: #fba949;
}
.lock-log li.emoji-locked {
  color: #B672F9;
}
.lock-log li.emoji-unlock {
  color: #F98E8E;
}
.lock-log li.emoji-reset {
  color: #A8B0B8;
}
/* Log sidebar for displaying lock logs */
#log-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  padding: 1rem;
  overflow-y: auto;
  z-index: 999;
  color: #F4F4F6;
  font-family: 'Fredoka', sans-serif;
  border-left: 1px solid rgba(255,255,255,0.1);
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateX(0);
  opacity: 1;
}

#log-sidebar.collapsed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

#log-sidebar h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 4px;
  color: #49E3FB;
  text-shadow: 0 0 4px rgba(73, 227, 251, 0.5);
}
#sidebar-toggle {
  position: fixed;
  top: 10px;
  right: 330px;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.7);
  color: #F4F4F6;
  font-family: 'Fredoka', sans-serif;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}