:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, sans-serif;
  background: #05070b;
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #05070b;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #05070b;
}

.video-stage {
  position: fixed;
  inset: 0;
  background: #05070b;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
  filter: saturate(1.02) brightness(0.78);
}

.bg-video.active {
  opacity: 1;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(18, 27, 46, 0.18), transparent 40%),
    linear-gradient(to bottom, rgba(3, 7, 18, 0.2), rgba(3, 7, 18, 0.72));
}

.reminder-alerts {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(560px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.reminder-alert {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(244, 199, 129, 0.58);
  background: rgba(8, 12, 20, 0.68);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  animation: reminderBlink 1.6s ease-in-out infinite;
}

.reminder-alert-title {
  margin: 0;
  font-size: 1rem;
  color: rgba(245, 247, 251, 0.98);
  overflow-wrap: anywhere;
}

.reminder-alert-meta {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: rgba(245, 247, 251, 0.76);
}

.reminder-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  pointer-events: auto;
}

.reminder-snooze-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.78rem;
  color: rgba(245, 247, 251, 0.94);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.pomodoro-shell {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.pomodoro-shell.is-hidden {
  display: none;
}

.pomodoro-card {
  width: min(520px, 100%);
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  text-align: center;
  backdrop-filter: blur(14px);
  background: rgba(8, 12, 20, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.pomodoro-card.is-finished {
  animation: reminderBlink 1.6s ease-in-out infinite;
  border-color: rgba(244, 199, 129, 0.58);
}

.pomodoro-time {
  margin: 12px 0 18px;
  font-size: clamp(3.2rem, 10vw, 6rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: rgba(245, 247, 251, 0.98);
}

.pomodoro-presets,
.pomodoro-actions,
.pomodoro-audio-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pomodoro-presets {
  margin-bottom: 14px;
}

.pomodoro-shell.is-active .pomodoro-presets,
.pomodoro-shell.is-active #pomodoro-start {
  display: none;
}

.pomodoro-audio-controls {
  margin-top: 14px;
}

.pomodoro-audio-button {
  width: 44px;
  min-width: 44px;
  padding: 10px 0;
}

.pomodoro-shell:not(.is-active):not(.is-finished) #pomodoro-pause,
.pomodoro-shell.is-finished #pomodoro-pause,
.pomodoro-shell.is-finished .pomodoro-presets,
.pomodoro-shell.is-finished #pomodoro-start,
.pomodoro-shell:not(.is-active) .pomodoro-audio-controls,
.pomodoro-shell.is-finished .pomodoro-audio-controls {
  display: none;
}

.top-right-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.top-right-primary {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
}

.hud-icon-button {
  width: 42px;
  min-width: 42px;
  padding: 10px 0;
  text-align: center;
}

.hud {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
}

.hud-toggle {
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.88rem;
  color: rgba(245, 247, 251, 0.94);
  background: rgba(8, 12, 20, 0.42);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.hud-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.hud-toggle:active {
  transform: translateY(1px);
}

.hud-toggle.is-selected {
  color: #08101d;
  background: #f2f6ff;
  border-color: #f2f6ff;
}

.hud-content {
  display: flex;
  min-height: 100%;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
}

.hud.is-hidden .hud-content {
  opacity: 0;
  pointer-events: none;
}

.hidden-audio-controls {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.42);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.hud.is-hidden .hidden-audio-controls[aria-hidden="false"] {
  display: flex;
}

.hidden-audio-button {
  min-width: 42px;
  padding: 10px 0;
  text-align: center;
}

.hidden-audio-volume {
  width: 72px;
  accent-color: #f2f6ff;
  cursor: pointer;
}

.title-block {
  max-width: 560px;
  padding-top: 8px;
}

.eyebrow,
.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: rgba(239, 244, 255, 0.7);
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
  font-weight: 600;
}

.subtitle {
  margin: 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(245, 247, 251, 0.82);
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(860px, 100%);
}

.controls-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.34);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.folder-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.88rem;
  color: rgba(245, 247, 251, 0.94);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.control-button:active {
  transform: translateY(1px);
}

.control-button.is-selected {
  color: #08101d;
  background: #f2f6ff;
  border-color: #f2f6ff;
}

.control-button.is-muted {
  color: #08101d;
  background: #d7def0;
  border-color: #d7def0;
}

.reminder-panel.is-hidden {
  display: none;
}

.help-panel.is-hidden {
  display: none;
}

.now-playing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.now-playing > div {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.34);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.now-playing p {
  margin: 8px 0 0;
  font-size: 0.98rem;
  color: rgba(245, 247, 251, 0.94);
  overflow-wrap: anywhere;
}

.reminder-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.34);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.reminder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reminder-subtitle {
  margin: 8px 0 0;
  color: rgba(245, 247, 251, 0.78);
  font-size: 0.92rem;
}

.help-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.34);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-subtitle {
  margin: 8px 0 0;
  color: rgba(245, 247, 251, 0.78);
  font-size: 0.92rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.help-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(245, 247, 251, 0.96);
}

.help-text {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(245, 247, 251, 0.82);
}

.reminder-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.9fr) auto;
  gap: 10px;
}

.reminder-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  color: rgba(245, 247, 251, 0.94);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.reminder-input::placeholder {
  color: rgba(245, 247, 251, 0.56);
}

.reminder-input:focus {
  border-color: rgba(242, 246, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
}

.reminder-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
}

.reminder-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reminder-item.is-done {
  opacity: 0.62;
}

.reminder-item.is-done .reminder-title {
  text-decoration: line-through;
}

.reminder-item.is-overdue {
  animation: reminderBlink 1.6s ease-in-out infinite;
  border-color: rgba(244, 199, 129, 0.58);
}

.reminder-item-main {
  min-width: 0;
}

.reminder-title {
  margin: 0;
  font-size: 0.98rem;
  color: rgba(245, 247, 251, 0.96);
  overflow-wrap: anywhere;
}

.reminder-meta {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: rgba(245, 247, 251, 0.68);
}

.reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reminder-action {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.8rem;
  color: rgba(245, 247, 251, 0.94);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.reminder-empty {
  margin: 0;
  padding: 10px 2px 2px;
  color: rgba(245, 247, 251, 0.68);
  font-size: 0.92rem;
}

@keyframes reminderBlink {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 rgba(244, 199, 129, 0);
  }

  50% {
    background: rgba(244, 199, 129, 0.18);
    box-shadow: 0 0 0 6px rgba(244, 199, 129, 0.08);
  }
}

@media (max-width: 720px) {
  .hud {
    padding: 22px;
  }

  .top-right-actions {
    align-items: stretch;
  }

  .top-right-primary {
    justify-content: flex-end;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .hidden-audio-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pomodoro-card {
    padding: 18px;
  }

  .controls-panel {
    padding: 12px;
  }

  .now-playing {
    grid-template-columns: 1fr;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .reminder-form {
    grid-template-columns: 1fr;
  }

  .reminder-item {
    grid-template-columns: 1fr;
  }

  .reminder-actions {
    justify-content: flex-start;
  }

  .subtitle {
    font-size: 0.95rem;
  }
}

.hud.is-hidden.show-auxiliary-panels .hud-content {
  opacity: 1;
  pointer-events: auto;
  justify-content: flex-end;
}

.hud.is-hidden.show-auxiliary-panels .title-block,
.hud.is-hidden.show-auxiliary-panels .controls-panel,
.hud.is-hidden.show-auxiliary-panels .now-playing {
  display: none;
}