h1 {
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

p {
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

h2 {
  text-align: center;
}

#currentTime {
  height: 260px;
  width: 100%;
  position: relative;
  margin: 0;
}

.glyph-item {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s ease;
}

.glyph-item img {
  width: 200px;
  height: 200px;
  display: block;
}

/* 1 glyph: centered, full size */
.glyph-1 .glyph-item:nth-child(1) {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* 2 glyphs: side by side */
.glyph-2 .glyph-item:nth-child(1) {
  transform: translate(calc(-50% - 65px), -50%) scale(0.6);
  opacity: 1;
}
.glyph-2 .glyph-item:nth-child(2) {
  transform: translate(calc(-50% + 65px), -50%) scale(0.6);
  opacity: 1;
}

/* 3 glyphs: triangle — 1 top, 2 bottom */
.glyph-3 .glyph-item:nth-child(1) {
  transform: translate(-50%, calc(-50% - 50px)) scale(0.425);
  opacity: 1;
}
.glyph-3 .glyph-item:nth-child(2) {
  transform: translate(calc(-50% - 50px), calc(-50% + 40px)) scale(0.425);
  opacity: 1;
}
.glyph-3 .glyph-item:nth-child(3) {
  transform: translate(calc(-50% + 50px), calc(-50% + 40px)) scale(0.425);
  opacity: 1;
}

/* Per-glyph entrance animations */
@keyframes entrance-croissant {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-180deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes entrance-butterfly {
  0% { transform: translate(-50%, -200%) scale(0.5) rotate(-15deg); opacity: 0; }
  25% { transform: translate(-50%, -120%) scale(0.7) rotate(10deg); opacity: 0.5; }
  50% { transform: translate(-50%, -80%) scale(0.85) rotate(-8deg); opacity: 0.8; }
  75% { transform: translate(-50%, -60%) scale(0.95) rotate(4deg); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes entrance-tulip {
  0% { transform: translate(-50%, 50%) scale(0.3); opacity: 0; }
  60% { transform: translate(-50%, -55%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-umbrella {
  0% { transform: translate(-50%, -200%) scale(0.8); opacity: 0; }
  50% { transform: translate(-50%, -40%) scale(1.05); opacity: 1; }
  70% { transform: translate(-50%, -55%) scale(0.98); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-cactus {
  0% { transform: translate(-50%, 30%) scale(0.2, 0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(0.9, 1.1); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.05, 0.95); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-balloon {
  0% { transform: translate(-50%, 80%) scale(0.4); opacity: 0; }
  60% { transform: translate(-50%, -60%) scale(1.05); opacity: 1; }
  80% { transform: translate(-50%, -45%) scale(0.98); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-glasses {
  0% { transform: translate(-50%, -50%) scale(1, 0) scaleX(0.3); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1, 1) scaleX(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-anchor {
  0% { transform: translate(-50%, -200%) scale(1); opacity: 0; }
  60% { transform: translate(-50%, -40%) scale(1); opacity: 1; }
  75% { transform: translate(-50%, -52%) scale(1); opacity: 1; }
  85% { transform: translate(-50%, -48%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-peacock {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.15) rotate(5deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(0.95) rotate(-3deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes entrance-robot {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  10% { transform: translate(-48%, -50%) scale(1); opacity: 1; }
  20% { transform: translate(-52%, -50%) scale(1); opacity: 0.7; }
  30% { transform: translate(-49%, -50%) scale(1); opacity: 1; }
  40% { transform: translate(-51%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-star {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
  70% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-cloud {
  0% { transform: translate(-150%, -50%) scale(0.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-tree {
  0% { transform: translate(-50%, 40%) scale(0.4, 0.2); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(0.95, 1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-kite {
  0% { transform: translate(-180%, 80%) scale(0.5) rotate(-25deg); opacity: 0; }
  60% { transform: translate(-45%, -55%) scale(1.05) rotate(5deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes entrance-chair {
  0% { transform: translate(-50%, -200%) scale(1); opacity: 0; }
  70% { transform: translate(-50%, -45%) scale(1); opacity: 1; }
  85% { transform: translate(-50%, -52%) scale(1.02); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes entrance-recycle {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(360deg); opacity: 1; }
}

[class*="glyph-entrance-"] .glyph-item { transition: none; }
.glyph-entrance-croissant .glyph-item { animation: entrance-croissant 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.glyph-entrance-butterfly .glyph-item { animation: entrance-butterfly 1.2s ease-out both; }
.glyph-entrance-tulip .glyph-item { animation: entrance-tulip 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-umbrella .glyph-item { animation: entrance-umbrella 0.8s ease-out both; }
.glyph-entrance-cactus .glyph-item { animation: entrance-cactus 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-balloon .glyph-item { animation: entrance-balloon 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-glasses .glyph-item { animation: entrance-glasses 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-anchor .glyph-item { animation: entrance-anchor 0.8s ease-out both; }
.glyph-entrance-peacock .glyph-item { animation: entrance-peacock 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.glyph-entrance-robot .glyph-item { animation: entrance-robot 0.6s linear both; }
.glyph-entrance-star .glyph-item { animation: entrance-star 0.9s ease-out both; }
.glyph-entrance-cloud .glyph-item { animation: entrance-cloud 1.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-tree .glyph-item { animation: entrance-tree 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-kite .glyph-item { animation: entrance-kite 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.glyph-entrance-chair .glyph-item { animation: entrance-chair 0.7s ease-out both; }
.glyph-entrance-recycle .glyph-item { animation: entrance-recycle 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Test mode controls */
.test-controls {
  text-align: center;
  padding: 0.5rem;
  font-size: 1.2rem;
}

.test-btn {
  font-size: 1.5rem;
  background: none;
  border: 1px solid rgba(150, 150, 150, 0.4);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  color: inherit;
  margin: 0 0.5rem;
}

.test-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .test-btn {
  border-color: rgba(100, 100, 140, 0.4);
}

.dark .test-btn:hover {
  background: rgba(80, 80, 120, 0.15);
}

#testModeToggle:hover {
  filter: brightness(1.2);
}

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

body {
  background-color: whitesmoke;
  color: #222;
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
}

a {
  color: inherit;
}

.dark,
.dark body {
  background-color: #1a1a2e;
  color: #e0e0e0;
}

.content-layer {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-height 0.8s ease;
}

/* Clock-only mode: hide non-clock elements, center clock */
.about > *:not(.about-clock) {
  transition: opacity 0.8s ease, max-height 0.8s ease, margin 0.8s ease, padding 0.8s ease;
  max-height: 500px;
  overflow: hidden;
}

.about {
  transition: margin 0.8s ease, padding 0.8s ease;
}

body.clock-only .about > *:not(.about-clock) {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

body.clock-only .about {
  margin: 0;
}

body.clock-only {
  overflow: hidden;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(245, 245, 245, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: opacity 0.5s ease, background 0.3s;
}

.dark .nav {
  background: rgba(26, 26, 46, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  height: 56px;
  gap: 32px;
}

.nav-logo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #222;
  text-decoration: none;
  transition: color 0.2s;
}

.dark .nav-logo {
  color: #e0e0e0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid rgba(150, 150, 150, 0.4);
  border-radius: 8px;
  cursor: pointer;
  color: #777;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: rgba(100, 100, 100, 0.6);
  color: #222;
}

.dark .theme-toggle {
  border-color: rgba(100, 100, 140, 0.4);
  color: #999;
}

.dark .theme-toggle:hover {
  border-color: rgba(120, 120, 160, 0.6);
  color: #e0e0e0;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }

/* Nav button (language switcher) */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(150, 150, 150, 0.4);
  color: #777;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.nav-btn:hover {
  border-color: rgba(100, 100, 100, 0.6);
  color: #222;
}

.dark .nav-btn {
  border-color: rgba(100, 100, 140, 0.4);
  color: #999;
}

.dark .nav-btn:hover {
  border-color: rgba(120, 120, 160, 0.6);
  color: #e0e0e0;
}

/* Language switcher dropdown */
.lang-switcher {
  position: relative;
}

.lang-switcher__list {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(150, 150, 150, 0.4);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  min-width: 160px;
}

.lang-switcher__option {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: #666;
  font-size: 0.85rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher__option:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.lang-switcher__option--active {
  color: #111;
  font-weight: 600;
}

.dark .lang-switcher__list {
  background: rgba(25, 25, 45, 0.95);
  border-color: rgba(100, 100, 140, 0.4);
}

.dark .lang-switcher__option {
  color: #999;
}

.dark .lang-switcher__option:hover {
  background: rgba(80, 80, 120, 0.15);
  color: #ddd;
}

.dark .lang-switcher__option--active {
  color: #eee;
}

/* About page */
.about {
  max-width: 640px;
  margin: 80px auto 60px;
  padding: 0 24px;
}

.about h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 2.5rem;
}

.privacy-heading {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 0.5rem;
}

.about-list {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  text-align: left;
  padding-left: 1.5em;
  margin: 0 0 1.5rem;
}

.about-list li {
  margin-bottom: 0.25rem;
}

.about-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: #444;
  margin-bottom: 2rem;
  text-align: left;
}

.dark .about-text {
  color: #b0b0b0;
}

.about-text a {
  text-decoration: none;
  border-bottom: 1px solid rgba(100, 100, 100, 0.3);
  transition: border-color 0.2s;
}

.about-text a:hover {
  border-color: currentColor;
}

.about-clock {
  margin: 0 0 2.5rem;
}

/* Focus area */
.focus-area {
  text-align: center;
  margin-top: 1rem;
}

.focus-add {
  background: none;
  border: none;
  color: #999;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  transition: color 0.2s;
}

.focus-add:hover {
  color: #555;
}

.dark .focus-add:hover {
  color: #ccc;
}

.focus-input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(150, 150, 150, 0.4);
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.4rem 0.5rem;
  width: 260px;
  max-width: 80vw;
  outline: none;
  transition: border-color 0.2s;
}

.focus-input:focus {
  border-bottom-color: #6366f1;
}

.focus-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.focus-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  color: #666;
  transition: opacity 0.8s ease;
}

.dark .focus-text {
  color: #aaa;
}

.focus-clear {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
  transition: color 0.2s, opacity 0.8s ease;
}

.focus-clear:hover {
  color: #888;
}

/* Hide add button and clear button in clock-only, keep focus text */
body.clock-only .focus-add {
  opacity: 0;
  pointer-events: none;
}

body.clock-only .focus-clear {
  opacity: 0;
  pointer-events: none;
}

.about-glyphs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  font-size: 2rem;
  border-top: 1px solid rgba(150, 150, 150, 0.2);
  border-bottom: 1px solid rgba(150, 150, 150, 0.2);
}

.about-addon {
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #999;
  text-align: left;
}

.about-addon a {
  text-decoration: none;
  border-bottom: 1px solid rgba(150, 150, 150, 0.3);
  transition: border-color 0.2s;
}

.about-addon a:hover {
  border-color: currentColor;
}

.dark .about-addon {
  color: #666;
}

.about-creator {
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 3rem;
  font-size: 0.95rem;
  color: #999;
  text-align: left;
}

.about-creator a {
  text-decoration: none;
  border-bottom: 1px solid rgba(150, 150, 150, 0.3);
  transition: border-color 0.2s;
}

.about-creator a:hover {
  border-color: currentColor;
}

.banglabs-brand {
  font-family: monospace;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #c7d2fe, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: none;
}

.banglabs-brand:hover {
  border-bottom: none;
  opacity: 0.8;
}

.dark .about-creator {
  color: #666;
}

@media (max-width: 480px) {
  .about { margin-top: 56px; }
  .about h1 { font-size: 1.6rem; }
}
