:root {
  --bg-1: #0b1221;
  --bg-2: #1c2f4a;
  --bg-3: #3b5b7d;
  --bg-4: #5a7796;
  --card: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.2);
  --text: #f7f8fb;
  --muted: rgba(247, 248, 251, 0.72);
  --accent: #6ecbff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-image: var(--clock-bg-image), linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: cover, cover;
  background-position: center, center;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 16, 28, 0.55), rgba(18, 34, 56, 0.55), rgba(42, 68, 96, 0.45));
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.app::before {
  content: "";
  position: fixed;
  inset: -10%;
  background: radial-gradient(circle at 20% 10%, rgba(110, 203, 255, 0.18), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(255, 214, 153, 0.14), transparent 45%),
              radial-gradient(circle at 70% 80%, rgba(124, 179, 255, 0.16), transparent 45%);
  animation: drift 18s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2%, 1%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 20px;
  background: rgba(12, 18, 30, 0.82);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 24px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
}

.content {
  padding: 36px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  max-width: 640px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--clock-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.0;
  z-index: 0;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 18, 32, 0.72), rgba(24, 46, 72, 0.6), rgba(58, 91, 124, 0.45));
  z-index: 0;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.festival-greeting {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 6px;
}

.full-date {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.hello {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.clock {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 1px;
}

.analog-clock {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 12px 0 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.analog-clock .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(0deg);
  border-radius: 999px;
}

.analog-clock .hand.hour {
  width: 6px;
  height: 54px;
  background: #ffffff;
}

.analog-clock .hand.minute {
  width: 4px;
  height: 72px;
  background: rgba(255, 255, 255, 0.9);
}

.analog-clock .hand.second {
  width: 2px;
  height: 82px;
  background: #ff6a5f;
}

.analog-clock .center-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.analog-clock .tick {
  position: absolute;
  width: 2px;
  height: 9px;
  background: rgba(255, 255, 255, 0.7);
  left: 50%;
  top: 8px;
  transform-origin: center 82px;
  transform: translateX(-50%) rotate(0deg);
}

.analog-clock .tick[data-tick="0"],
.analog-clock .tick[data-tick="3"],
.analog-clock .tick[data-tick="6"],
.analog-clock .tick[data-tick="9"] {
  height: 12px;
}

.analog-clock .clock-number {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.analog-clock .tick[data-tick="0"] { transform: translateX(-50%) rotate(0deg); }
.analog-clock .tick[data-tick="1"] { transform: translateX(-50%) rotate(30deg); }
.analog-clock .tick[data-tick="2"] { transform: translateX(-50%) rotate(60deg); }
.analog-clock .tick[data-tick="3"] { transform: translateX(-50%) rotate(90deg); }
.analog-clock .tick[data-tick="4"] { transform: translateX(-50%) rotate(120deg); }
.analog-clock .tick[data-tick="5"] { transform: translateX(-50%) rotate(150deg); }
.analog-clock .tick[data-tick="6"] { transform: translateX(-50%) rotate(180deg); }
.analog-clock .tick[data-tick="7"] { transform: translateX(-50%) rotate(210deg); }
.analog-clock .tick[data-tick="8"] { transform: translateX(-50%) rotate(240deg); }
.analog-clock .tick[data-tick="9"] { transform: translateX(-50%) rotate(270deg); }
.analog-clock .tick[data-tick="10"] { transform: translateX(-50%) rotate(300deg); }
.analog-clock .tick[data-tick="11"] { transform: translateX(-50%) rotate(330deg); }

.weather {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.view-clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  align-items: start;
}

.todo-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 16px;
  min-height: 420px;
  backdrop-filter: blur(12px);
}

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

.todo-header h2 {
  font-size: 20px;
  margin: 0;
}

.todo-date {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.todo-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.5);
}

.todo-item.done .todo-title {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-title {
  font-size: 14px;
  font-weight: 600;
}

.todo-time {
  font-size: 12px;
  color: var(--muted);
}

.todo-actions {
  display: flex;
  gap: 6px;
}

.todo-actions button {
  padding: 6px 10px;
  font-size: 12px;
}

.todo-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.todo-form input[type="text"],
.todo-form input[type="time"],
.todo-date input[type="date"] {
  width: 100%;
}

.todo-time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.todo-hint {
  font-size: 12px;
  color: var(--muted);
}

.todo-import {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.todo-import-label {
  font-size: 12px;
  color: var(--muted);
}

.todo-import-or {
  font-size: 12px;
  color: var(--muted);
}

.todo-import textarea {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px;
  resize: vertical;
}

.alarm-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.alarm-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.5);
}

.alarm-meta {
  display: grid;
  gap: 2px;
}

.alarm-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.alarm-label {
  font-size: 12px;
  color: var(--muted);
}

.alarm-sound {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .view-clock {
    grid-template-columns: 1fr;
  }
}

.weather-line {
  color: var(--text);
  font-weight: 600;
}

.weather-attrib {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.big-time {
  font-size: 66px;
  font-weight: 700;
  margin: 18px 0;
  letter-spacing: 1px;
  text-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.timer-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  margin: 12px 0 22px;
}

.timer-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.18) 0deg),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  mask: radial-gradient(circle at center, transparent 58%, #000 60%);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  width: 110px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

button.primary {
  background: linear-gradient(135deg, #7ad3ff, var(--accent));
  color: #00131f;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.phase {
  font-size: 18px;
  font-weight: 600;
  color: #ffe2a1;
}

.view h1 {
  font-size: 28px;
  margin-bottom: 12px;
  font-family: "Newsreader", "Nunito", serif;
  text-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

@media (max-width: 840px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
