:root {
  --lg-bg-color: rgba(255, 255, 255, 0.20);
  --lg-highlight: rgba(255, 255, 255, 0.75);
  --lg-text: #ffffff;
  --lg-hover-glow: rgba(255, 255, 255, 0.25);
  --lg-red: #fb7185;
  --lg-grey: #5b5b5b;

  /* Theme Tokens (Default: Frosted Pearl Glass) */
  --theme-name: 'default';
  --theme-accent: #ffffff;
  --theme-accent-rgb: 255, 255, 255;
  --theme-glass-tint: rgba(255, 255, 255, 0.12);
  --theme-glass-tint-active: rgba(255, 255, 255, 0.22);
  --theme-glass-tint-hover: rgba(255, 255, 255, 0.18);
  --theme-glass-border: rgba(255, 255, 255, 0.28);
  --theme-glass-specular: rgba(255, 255, 255, 0.75);
  --theme-glass-glow: rgba(255, 255, 255, 0.12);
  --theme-glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  --theme-card-bg: rgba(255, 255, 255, 0.08);
  --theme-card-border: rgba(255, 255, 255, 0.18);
}

/* Green: Soft Pastel Mint / Matcha Glass */
[data-theme="green"] {
  --lg-bg-color: rgba(167, 243, 208, 0.15);
  --lg-highlight: rgba(236, 253, 245, 0.85);
  --lg-hover-glow: rgba(167, 243, 208, 0.28);
  --theme-name: 'green';
  --theme-accent: #6ee7b7;
  --theme-accent-rgb: 110, 231, 183;
  --theme-glass-tint: rgba(167, 243, 208, 0.14);
  --theme-glass-tint-active: rgba(167, 243, 208, 0.25);
  --theme-glass-tint-hover: rgba(209, 250, 229, 0.22);
  --theme-glass-border: rgba(167, 243, 208, 0.38);
  --theme-glass-specular: rgba(236, 253, 245, 0.85);
  --theme-glass-glow: rgba(110, 231, 183, 0.18);
  --theme-glass-gradient: linear-gradient(135deg, rgba(167, 243, 208, 0.18), rgba(236, 253, 245, 0.05));
  --theme-card-bg: rgba(209, 250, 229, 0.08);
  --theme-card-border: rgba(167, 243, 208, 0.24);
}

/* Yellow: Soft Pastel Buttercream / Chiffon Glass */
[data-theme="yellow"] {
  --lg-bg-color: rgba(254, 240, 138, 0.15);
  --lg-highlight: rgba(254, 249, 195, 0.85);
  --lg-hover-glow: rgba(253, 230, 138, 0.28);
  --theme-name: 'yellow';
  --theme-accent: #fde047;
  --theme-accent-rgb: 253, 224, 71;
  --theme-glass-tint: rgba(254, 240, 138, 0.14);
  --theme-glass-tint-active: rgba(254, 240, 138, 0.25);
  --theme-glass-tint-hover: rgba(254, 249, 195, 0.22);
  --theme-glass-border: rgba(253, 230, 138, 0.38);
  --theme-glass-specular: rgba(254, 249, 195, 0.85);
  --theme-glass-glow: rgba(253, 224, 71, 0.18);
  --theme-glass-gradient: linear-gradient(135deg, rgba(254, 240, 138, 0.18), rgba(254, 249, 195, 0.05));
  --theme-card-bg: rgba(254, 249, 195, 0.08);
  --theme-card-border: rgba(253, 230, 138, 0.24);
}

/* Blue: Soft Pastel Baby Sky / Cloud Glass */
[data-theme="blue"] {
  --lg-bg-color: rgba(186, 230, 253, 0.15);
  --lg-highlight: rgba(224, 242, 254, 0.85);
  --lg-hover-glow: rgba(191, 219, 254, 0.28);
  --theme-name: 'blue';
  --theme-accent: #93c5fd;
  --theme-accent-rgb: 147, 197, 253;
  --theme-glass-tint: rgba(186, 230, 253, 0.14);
  --theme-glass-tint-active: rgba(186, 230, 253, 0.25);
  --theme-glass-tint-hover: rgba(224, 242, 254, 0.22);
  --theme-glass-border: rgba(186, 230, 253, 0.38);
  --theme-glass-specular: rgba(224, 242, 254, 0.85);
  --theme-glass-glow: rgba(147, 197, 253, 0.18);
  --theme-glass-gradient: linear-gradient(135deg, rgba(186, 230, 253, 0.18), rgba(224, 242, 254, 0.05));
  --theme-card-bg: rgba(224, 242, 254, 0.08);
  --theme-card-border: rgba(186, 230, 253, 0.24);
}

/* Pink: Soft Pastel Strawberry Milk / Blush Glass */
[data-theme="pink"] {
  --lg-bg-color: rgba(251, 207, 232, 0.15);
  --lg-highlight: rgba(253, 232, 244, 0.85);
  --lg-hover-glow: rgba(244, 114, 182, 0.28);
  --theme-name: 'pink';
  --theme-accent: #f472b6;
  --theme-accent-rgb: 244, 114, 182;
  --theme-glass-tint: rgba(251, 207, 232, 0.14);
  --theme-glass-tint-active: rgba(251, 207, 232, 0.25);
  --theme-glass-tint-hover: rgba(253, 232, 244, 0.22);
  --theme-glass-border: rgba(251, 207, 232, 0.38);
  --theme-glass-specular: rgba(253, 232, 244, 0.85);
  --theme-glass-glow: rgba(244, 114, 182, 0.18);
  --theme-glass-gradient: linear-gradient(135deg, rgba(251, 207, 232, 0.18), rgba(253, 232, 244, 0.05));
  --theme-card-bg: rgba(253, 232, 244, 0.08);
  --theme-card-border: rgba(251, 207, 232, 0.24);
}

/* Purple: Soft Pastel Lilac / Lavender Glass */
[data-theme="purple"] {
  --lg-bg-color: rgba(221, 214, 254, 0.15);
  --lg-highlight: rgba(243, 232, 255, 0.85);
  --lg-hover-glow: rgba(196, 181, 253, 0.28);
  --theme-name: 'purple';
  --theme-accent: #c4b5fd;
  --theme-accent-rgb: 196, 181, 253;
  --theme-glass-tint: rgba(221, 214, 254, 0.14);
  --theme-glass-tint-active: rgba(221, 214, 254, 0.25);
  --theme-glass-tint-hover: rgba(243, 232, 255, 0.22);
  --theme-glass-border: rgba(221, 214, 254, 0.38);
  --theme-glass-specular: rgba(243, 232, 255, 0.85);
  --theme-glass-glow: rgba(196, 181, 253, 0.18);
  --theme-glass-gradient: linear-gradient(135deg, rgba(221, 214, 254, 0.18), rgba(243, 232, 255, 0.05));
  --theme-card-bg: rgba(243, 232, 255, 0.08);
  --theme-card-border: rgba(221, 214, 254, 0.24);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  background: url("https://images.unsplash.com/photo-1551384963-cccb0b7ed94b?q=80&w=3247&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D")
    center/cover;
  animation: bg-move 15s ease-in-out infinite alternate;
}

body.has-video-bg {
  background-image: none !important;
  background-color: #0a0a0c;
  animation: none;
}

.bg-fireplace-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  background: #0a0a0c;
}

.bg-fireplace-video.hidden {
  display: none !important;
}

@keyframes bg-move {
  from { background-position: center center; }
  to { background-position: center top; }
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px;
}

.container--inline {
  flex-direction: row;
}

.glass-container {
  position: relative;
  display: flex;
  font-weight: 600;
  color: var(--lg-text);
  background: transparent;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 24px var(--theme-glass-glow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2), box-shadow 0.35s ease;
}

.glass-container--rounded {
  border-radius: 28px;
  margin: 0.5rem;
  fill: var(--lg-grey);
}

.glass-container--large {
  width: auto;
  max-width: 95vw;
}

.focus-panel {
  width: min(92vw, 520px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.15rem;
}

.timer-panel {
  width: 100%;
  max-width: none;
}

.glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(5px); /* Increased slightly for actual glass feel */
  filter: url(#lg-dist);
  isolation: isolate;
}



.glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--theme-glass-gradient);
  transition: background 0.35s ease;
}

.glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
  box-shadow: inset 1px 1px 0 var(--theme-glass-specular),
    inset 0 0 7px var(--theme-glass-border);
  transition: box-shadow 0.35s ease;
}

.glass-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 1.5rem 2rem;
  flex-direction: column;
  width: 100%;
}

.glass-content--inline {
  flex-direction: row;
}

@media (max-width: 480px) {
  .glass-content {
    padding: 1.5rem;
    gap: 15px;
  }
}

.glass-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-radius: 1rem;
  color: white;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  padding: 1rem;
}

@media (max-width: 480px) {
  .glass-item {
    padding: 0.5rem;
  }
  .glass-item h3 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }
  .glass-item .preset-time-label {
    font-size: 0.8rem;
  }
}

.glass-item svg {
  fill: white;
  transition: fill 0.3s ease;
}

.glass-item:hover {
  background: var(--lg-hover-glow);
  transform: translateY(-2px);
}

.glass-item:active {
  transform: translateY(1px);
}

.glass-item--active {
  background: rgba(0, 0, 0, 0.25);
  color: black;
  border-radius: 1rem;
}

.glass-item--active svg {
  fill: black;
}

.glass-item--icon {
  width: 64px;
  height: 64px;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.glass-item--icon svg {
  width: 28px;
  height: 28px;
}

/* Custom UI specifics */
.timer-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timer-mode-badge.on-break {
  background: var(--theme-glass-tint-active, rgba(110, 231, 183, 0.25));
  border-color: var(--theme-accent, #6ee7b7);
  box-shadow: 0 0 12px var(--theme-glass-glow, rgba(110, 231, 183, 0.3));
}

.timer-text {
  font-size: clamp(3rem, 16vw, 5rem);
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  letter-spacing: -2px;
  margin: 0;
  line-height: 1;
  text-shadow: 0px 4px 10px rgba(0,0,0,0.3);
}

.timer-text span {
  outline: none;
  display: inline-block;
  min-width: 1.15em;
  text-align: center;
}

.timer-text span[contenteditable="true"] {
  cursor: text;
  border-radius: 8px;
  padding: 0 4px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  user-select: text;
  -webkit-user-select: text;
}

.timer-text span[contenteditable="true"]:hover {
  background: rgba(255, 255, 255, 0.08);
}

.timer-text span[contenteditable="true"]:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.timer-text span[contenteditable="false"] {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.glass-item--break {
  height: 64px;
  padding: 0 1.35rem;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.32));
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 4px 14px var(--theme-glass-glow, rgba(110, 231, 183, 0.18)),
    inset 0 1px 2px rgba(255, 255, 255, 0.65);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  translate: 0px;
  rotate: 0deg;
  scale: 1;
  transition:
    translate 0.25s ease,
    scale 0.25s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.glass-item--break svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.glass-item--break:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: var(--theme-glass-specular, #ffffff);
  translate: 0 -2px;
}

.glass-item--break:active {
  translate: 0 1px;
  scale: 0.96;
}

.glass-item--break.on-break {
  background: var(--theme-glass-tint-active, rgba(110, 231, 183, 0.28));
  border-color: var(--theme-accent, #6ee7b7);
  box-shadow:
    0 0 18px var(--theme-glass-glow, rgba(110, 231, 183, 0.35)),
    inset 0 1px 2px rgba(255, 255, 255, 0.85);
}

.glass-item--break.overdue-warning {
  border-color: var(--theme-accent, #6ee7b7);
  animation: breakPulse 2s infinite ease-in-out;
}

.tasks-panel {
  position: relative;
  width: 100%;
  color: white;
}

.tasks-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
}

.tasks-open-sidebar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.tasks-open-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tasks-open-sidebar-btn:active {
  transform: translateY(1px);
}

.tasks-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0px 3px 8px rgba(0,0,0,0.28);
}

.tasks-add-btn,
.task-plan-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.25));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tasks-add-btn:hover,
.task-plan-btn:hover {
  transform: scale(1.08);
}

.tasks-add-btn:active,
.task-plan-btn:active {
  transform: scale(0.96);
}

.tasks-add-btn[hidden],
.task-plan-btn[hidden] {
  display: none;
}

.tasks-add-btn svg,
.task-plan-btn svg {
  width: 1.6rem;
  height: 1.6rem;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.task-check-btn {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.task-check-btn:hover {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.12);
}

.task-check-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.task-check-btn.task-check-btn--checked {
  background: rgba(255, 255, 255, 0.95);
  border-color: white;
  color: #111827;
}

.task-check-btn.task-check-btn--checked svg {
  opacity: 1;
  transform: scale(1);
}

.task-upload-btn {
  align-self: center;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0px 2px 5px rgba(0,0,0,0.25);
  cursor: pointer;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.task-row:focus-within .task-upload-btn,
.task-row.task-row--active .task-upload-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.task-upload-btn--attached {
  background: rgba(255, 255, 255, 0.24);
}

.task-pdf-input,
.task-plan-output {
  display: none;
}

.task-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto 2.25rem;
  grid-template-rows: minmax(2.8rem, auto) 4px;
  column-gap: 0.5rem;
  align-items: end;
  width: 100%;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-row--completing {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
}

.task-row--completing .task-input {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Pop Animation on Task Check Button */
.task-check-btn--pop {
  animation: checkPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.45) forwards !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: white !important;
  color: #111827 !important;
}

.task-check-btn--pop svg {
  opacity: 1 !important;
  transform: scale(1.15) !important;
}

@keyframes checkPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.42) rotate(-6deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 35px rgba(96, 165, 250, 0.6);
  }
  75% {
    transform: scale(0.92) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* Pop Animation on Task Row */
.task-row--pop {
  animation: taskRowPop 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

.task-row--pop .task-input {
  text-decoration: line-through;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

@keyframes taskRowPop {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.025) translateY(-3px);
  }
  100% {
    transform: scale(0.92) translateY(-12px);
    opacity: 0;
  }
}

/* Liquid Glass Pop Particles */
.pop-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 0;
  height: 0;
}

.pop-particle {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, rgba(147, 197, 253, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 16px rgba(96, 165, 250, 0.6);
  animation: particleFly 0.44s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes particleFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 0.85;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.15);
    opacity: 0;
  }
}

.task-row--entering {
  animation: taskRowEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes taskRowEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tasks-empty-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1.2rem;
  border-radius: 1.2rem;
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tasks-empty-placeholder:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.task-line {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
}

.tasks-list {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.8rem;
}

.task-input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4rem 0 0.3rem;
  border: 0;
  border-radius: 0;
  outline: none;
  color: white;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 0px 2px 5px rgba(0,0,0,0.25);
  caret-color: white;
}

.task-plan-status {
  grid-column: 1 / -1;
  min-height: 1rem;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 500;
  text-shadow: 0px 2px 5px rgba(0,0,0,0.25);
}

.plan-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.plan-modal.hidden {
  display: none;
}

.plan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.plan-modal-panel {
  width: min(92vw, 540px);
  max-height: min(78vh, 680px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.plan-modal-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.35rem 0.75rem;
}

.plan-modal-header h2 {
  margin: 0;
  color: white;
  font-size: 1.35rem;
  line-height: 1.15;
  text-shadow: 0px 2px 6px rgba(0,0,0,0.25);
}

.plan-modal-close {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.plan-modal-close svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.plan-modal-body {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding: 0.35rem;
  color: white;
}

.task-plan {
  display: grid;
  gap: 0.85rem;
}

.task-plan h3 {
  margin: 0;
  font-size: 1rem;
}

.task-plan-section {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
}

.task-plan-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.task-plan-section-header span {
  font-size: 0.78rem;
  opacity: 0.78;
}

.task-plan-section-header strong {
  font-size: 0.95rem;
}

.task-plan ul {
  margin: 0;
  padding-left: 1.1rem;
}

.task-plan li {
  margin: 0.25rem 0;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .task-row {
    grid-template-columns: minmax(0, 1fr) 2.25rem 2.25rem;
  }

  .task-upload-btn {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: 0.15rem;
  }
}

.settings-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 12, 18, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: block;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.settings-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.settings-overlay > .glass-container {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  transform: scale(1) translateY(0);
  will-change: transform, opacity;
}

.settings-overlay.hidden > .glass-container {
  transform: scale(0.95) translateY(10px);
  opacity: 0;
}

.settings-scroll-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.settings-scroll-area::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Top-Right Actions Container */
.top-right-actions {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Dynamic Expanding Break Nudge Button */
.break-nudge-btn {
  position: relative;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.88rem;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.14));
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.35));
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  box-shadow:
    0 4px 16px var(--theme-glass-glow, rgba(110, 231, 183, 0.2)),
    inset 0 1px 2px rgba(255, 255, 255, 0.75);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transform-origin: top right;
  --break-nudge-scale: 1;
  translate: 0px;
  rotate: 0deg;
  scale: var(--break-nudge-scale, 1);
  transition:
    scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    translate 0.25s ease,
    opacity 0.35s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
  isolation: isolate;
}

/* Focus Streak Container & Pill */
.streak-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.streak-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.85rem;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.14));
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.35));
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  box-shadow:
    0 4px 16px var(--theme-glass-glow, rgba(110, 231, 183, 0.2)),
    inset 0 1px 2px rgba(255, 255, 255, 0.75);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 0.22s ease;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.streak-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  z-index: 1;
}

.streak-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--theme-glass-specular, #fff);
  box-shadow:
    0 6px 20px var(--theme-glass-glow, rgba(110, 231, 183, 0.3)),
    inset 0 1px 2px rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.streak-btn:active {
  transform: translateY(0) scale(0.96);
}

.streak-flame-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.streak-flame-svg {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(255, 107, 53, 0.45));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.streak-btn:hover .streak-flame-svg {
  transform: scale(1.15) rotate(-3deg);
  filter: drop-shadow(0 0 10px rgba(255, 138, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 56, 92, 0.5));
}

.streak-flame-icon.flame-active .streak-flame-svg {
  animation: flameFloat 2s infinite ease-in-out;
  filter: drop-shadow(0 0 8px rgba(255, 138, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 56, 92, 0.6));
}

@keyframes flameFloat {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.14) translateY(-1px) rotate(2deg); }
}

.streak-count-text {
  position: relative;
  z-index: 2;
  letter-spacing: 0.01em;
}

/* Weekly Streak Popover (Appears on Hover) */
.weekly-streak-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.3));
  border-radius: 1.15rem;
  padding: 1.1rem 1.25rem;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.95);
  transition:
    opacity 0.22s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Invisible bridge so mouse moving from button to popover never drops hover */
.weekly-streak-popover::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
  pointer-events: auto;
}

.streak-container:hover .weekly-streak-popover,
.streak-container:focus-within .weekly-streak-popover,
.weekly-streak-popover:hover,
.streak-container.popover-active .weekly-streak-popover,
.streak-container.popover-pinned .weekly-streak-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.weekly-popover-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.weekly-popover-user {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

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

.weekly-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-accent, #6ee7b7);
}

.weekly-popover-summary {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
}

.weekly-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.weekly-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.day-letter {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}

.day-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.weekly-day-pill.completed .day-circle {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.38), rgba(234, 88, 12, 0.22));
  border-color: #f97316;
  color: #fff;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.day-flame-svg {
  width: 13px;
  height: 13px;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(255, 107, 53, 0.7));
}

.weekly-day-pill.today .day-circle {
  border-color: var(--theme-accent, #6ee7b7);
  box-shadow: 0 0 8px var(--theme-glass-glow, rgba(110, 231, 183, 0.3));
}

.weekly-day-pill.muted .day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.popover-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
}

.stat-badge {
  color: rgba(255, 255, 255, 0.75);
}

.stat-badge strong {
  color: white;
}

.stat-user {
  font-size: 0.74rem;
  color: var(--theme-accent, #6ee7b7);
  font-weight: 600;
  max-width: 125px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.popover-cta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

.glass-btn--xs {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.break-nudge-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  z-index: 1;
}

.break-nudge-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--theme-glass-specular, rgba(255, 255, 255, 0.6));
  box-shadow:
    0 6px 20px var(--theme-glass-glow, rgba(110, 231, 183, 0.3)),
    inset 0 1px 2px rgba(255, 255, 255, 0.9);
  translate: 0 -1px;
}

.break-nudge-btn:active {
  scale: calc(var(--break-nudge-scale, 1) * 0.94);
}

.break-nudge-btn.break-nudge-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6) translateY(-8px);
  visibility: hidden;
}

.break-nudge-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
  position: relative;
  z-index: 2;
}

.break-nudge-btn:hover .break-nudge-icon {
  transform: scale(1.15) rotate(-6deg);
}

.break-nudge-label {
  position: relative;
  z-index: 2;
  letter-spacing: 0.01em;
}

.break-nudge-timer {
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.25);
  letter-spacing: 0.03em;
}

.break-nudge-timer:empty {
  display: none;
}

.break-nudge-btn.on-break {
  background: var(--theme-glass-tint-active, rgba(110, 231, 183, 0.2));
  border-color: var(--theme-accent, #6ee7b7);
  box-shadow: 0 0 16px var(--theme-glass-glow, rgba(110, 231, 183, 0.3));
}

@keyframes breakPulse {
  0%, 100% {
    box-shadow:
      0 4px 18px var(--theme-glass-glow, rgba(110, 231, 183, 0.25)),
      inset 0 1px 2px rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow:
      0 0 26px var(--theme-accent, #6ee7b7),
      0 0 45px rgba(var(--theme-accent-rgb, 110, 231, 183), 0.4),
      inset 0 1px 3px #ffffff;
  }
}

.break-nudge-btn.overdue-warning {
  border-color: var(--theme-accent, #6ee7b7);
  animation: breakPulse 2.2s infinite ease-in-out;
}

.break-nudge-btn.overdue-urgent {
  border-color: var(--theme-glass-specular, #ffffff);
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb, 110, 231, 183), 0.35), rgba(var(--theme-accent-rgb, 110, 231, 183), 0.18));
  animation: breakPulse 1.4s infinite ease-in-out;
}

.break-nudge-btn.overdue-huge {
  z-index: 150;
  border-color: #ffffff;
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb, 110, 231, 183), 0.45), rgba(var(--theme-accent-rgb, 110, 231, 183), 0.25));
  animation: breakPulse 0.9s infinite ease-in-out;
}

@media (max-width: 600px) {
  .break-nudge-btn {
    right: 64px;
    top: 18px;
    padding: 0.36rem 0.72rem;
    font-size: 0.8rem;
  }
}

.settings-icon-top {
  position: relative;
  z-index: 100;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.12));
  border: 1px solid var(--theme-glass-border, rgba(255, 255, 255, 0.25));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px var(--theme-glass-glow, rgba(110, 231, 183, 0.15));
  transition: all 0.25s ease;
}

.settings-icon-top svg {
  fill: white;
  filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.settings-icon-top:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--theme-glass-specular, #fff);
  box-shadow: 0 6px 16px var(--theme-glass-glow);
  transform: translateY(-1px);
}

.settings-icon-top:hover svg {
  transform: scale(1.1) rotate(45deg);
  filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5)) drop-shadow(0 0 8px var(--theme-glass-glow));
}

/* Left-hand To-Do Toggle Button */
.todo-toggle-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--theme-glass-tint);
  border: 1px solid var(--theme-glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  box-shadow: 0 4px 14px var(--theme-glass-glow);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.todo-toggle-btn svg {
  stroke: white;
  filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.4));
  transition: transform 0.2s ease;
}

.todo-toggle-btn:hover {
  background: var(--theme-glass-tint-hover);
  border-color: var(--theme-glass-specular);
  transform: scale(1.1);
  box-shadow: 0 6px 18px var(--theme-glass-glow);
}

.todo-toggle-btn:hover svg {
  transform: scale(1.08);
}

.todo-toggle-btn:active {
  transform: scale(0.96);
}

.todo-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fb4268;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.todo-badge[hidden] {
  display: none;
}

/* Left-hand To-Do Drawer */
.todo-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.35s ease;
}

.todo-drawer-overlay:not(.hidden) {
  pointer-events: auto;
  visibility: visible;
}

.todo-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.todo-drawer-overlay:not(.hidden) .todo-drawer-backdrop {
  opacity: 1;
}

.todo-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(390px, 88vw);
  max-width: 100vw;
  background: rgba(18, 22, 34, 0.62);
  border-right: 1px solid var(--theme-glass-border);
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.45), 0 0 25px var(--theme-glass-glow);
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.todo-drawer-overlay:not(.hidden) .todo-drawer {
  transform: translateX(0);
}

.todo-drawer .glass-filter {
  filter: url(#lg-dist);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.todo-drawer .glass-overlay {
  background: var(--theme-glass-gradient);
  transition: background 0.35s ease;
}

.todo-drawer .glass-specular {
  box-shadow: inset 1px 0 0 var(--theme-glass-specular),
              inset 0 0 10px var(--theme-glass-border);
  transition: box-shadow 0.35s ease;
}

.todo-drawer-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: white;
}

.todo-drawer-header {
  padding: 1.5rem 1.4rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.todo-drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-header-icon {
  color: rgba(255, 255, 255, 0.9);
}

.todo-drawer-title {
  margin: 0;
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.todo-hide-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.todo-hide-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateX(-2px);
}

.todo-drawer-subtitle {
  margin: 0.35rem 0 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.todo-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-add-top-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.todo-input-nest {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.45rem 0.7rem 0.4rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.todo-input-nest:focus-within {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}

.todo-new-input {
  width: 100%;
  min-width: 0;
  padding: 0.15rem 0.1rem;
  border: none;
  background: transparent;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  outline: none;
}

.todo-new-input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.todo-due-nested-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.todo-add-due-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.todo-add-due-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.todo-add-due-btn--active {
  background: rgba(110, 231, 183, 0.22);
  border-color: rgba(110, 231, 183, 0.65);
  color: #ecfdf5;
}

.todo-due-date-input {
  color-scheme: dark;
  accent-color: var(--theme-accent, #6ee7b7);
  padding: 0.18rem 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  outline: none;
  cursor: pointer;
}

.todo-due-date-input.hidden,
.todo-clear-due-btn.hidden {
  display: none;
}

.todo-clear-due-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
}

.todo-clear-due-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(248, 113, 113, 0.7);
  color: #ffffff;
}

.todo-sort-row {
  display: flex;
  width: 100%;
}

.todo-sort-due-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0.58rem 0.85rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.todo-sort-due-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

.todo-sort-due-btn--active {
  background: rgba(110, 231, 183, 0.22);
  border-color: rgba(110, 231, 183, 0.7);
  color: #ecfdf5;
}

.todo-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.todo-item-due-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.todo-due-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  transition: all 0.18s ease;
}

.todo-due-badge:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.focus-task-due-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
}

.todo-add-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0.6rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.todo-add-submit-btn:hover {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
}

.todo-add-submit-btn:active {
  transform: translateY(1px);
}

.todo-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.todo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.todo-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.todo-section-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.todo-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.22s ease;
  user-select: none;
  -webkit-user-select: none;
}

.todo-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
  cursor: grab;
  border-radius: 4px;
  transition: color 0.18s ease, background 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.todo-drag-handle:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
}

.todo-drag-handle:active {
  cursor: grabbing;
}

.todo-drag-handle svg {
  display: block;
}

.todo-item[draggable="true"] {
  cursor: grab;
}

.todo-item[draggable="true"]:active {
  cursor: grabbing;
}

.todo-item button,
.todo-item input {
  cursor: pointer;
}

.todo-item:hover:not(.todo-item--dragging) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(2px);
}

.todo-item:hover:not(.todo-item--dragging) .todo-drag-handle {
  color: rgba(255, 255, 255, 0.75);
}

.todo-item.todo-item--dragging {
  opacity: 0.35;
  filter: grayscale(0.5);
  transform: scale(0.985);
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.todo-item.todo-item--drop-top {
  border-top: 2.5px solid #38bdf8 !important;
  box-shadow: 0 -4px 12px -2px rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.todo-item.todo-item--drop-bottom {
  border-bottom: 2.5px solid #38bdf8 !important;
  box-shadow: 0 4px 12px -2px rgba(56, 189, 248, 0.45);
  transform: translateY(2px);
}

.todo-item--focus {
  border-left: 3.5px solid #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

.todo-item-check {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s ease;
  padding: 0;
}

.todo-item-check:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.todo-item-check svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.todo-item--completed {
  opacity: 0.52;
  filter: grayscale(0.6);
  background: rgba(255, 255, 255, 0.04);
}

.todo-item--completed .todo-item-check {
  background: rgba(255, 255, 255, 0.85);
  border-color: white;
  color: #111827;
}

.todo-item--completed .todo-item-check svg {
  opacity: 1;
  transform: scale(1);
}

.todo-item--completed .todo-item-text {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.65);
}

.todo-item-text {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.3;
  word-break: break-word;
  color: white;
}

.todo-focus-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.25);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
  white-space: nowrap;
}

.todo-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.todo-item:hover .todo-item-actions {
  opacity: 1;
}

.todo-action-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.todo-action-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

.todo-action-btn--delete:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.2);
}

.todo-empty-state {
  padding: 1.5rem 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.todo-empty-state p {
  margin: 0;
}

.todo-empty-sub {
  margin-top: 0.3rem !important;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.preset-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-shadow: 0px 2px 4px rgba(0,0,0,0.2);
}

.preset-time-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 5px;
}

/* Abdughafur Liquid Glass Modal */
.liquid-glass {
  --scale-factor: 1;
  --settings-lg-radius: 28px;
  --settings-lg-blur: 8px;
  --settings-lg-tint: var(--theme-glass-tint);
  isolation: isolate;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 25px var(--theme-glass-glow);
  transition: all 300ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.35s ease;
  box-sizing: border-box;
  transform: scale(var(--scale-factor));
  border: 0;
  border-radius: var(--settings-lg-radius);
  background: transparent;
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--settings-lg-tint);
  box-shadow:
    inset 2px 2px 1px 0 var(--theme-glass-specular),
    inset -1px -1px 1px 1px var(--theme-glass-border);
  pointer-events: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.liquid-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(var(--settings-lg-blur)) saturate(150%);
  backdrop-filter: blur(var(--settings-lg-blur)) saturate(150%);
  filter: url(#settings-liquid-glass);
  -webkit-filter: url(#settings-liquid-glass);
}

@media (max-width: 768px) {
  .liquid-glass::after {
    backdrop-filter: blur(2.1px);
    -webkit-backdrop-filter: blur(2.1px);
  }
}

/* Settings Menu Layout Refinements - Expanded Horizontally Without Scrollbars */
.settings-modal-container {
  width: min(94vw, 760px);
  max-width: 760px;
  margin: auto;
  padding: 0.6rem;
}

.settings-content-wrapper {
  z-index: 2;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem;
  height: auto !important;
  min-height: 0;
}

.settings-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.15rem;
}

.settings-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.settings-user-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.settings-user-pill.has-user {
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.2), rgba(59, 130, 246, 0.15));
  border-color: rgba(110, 231, 183, 0.45);
  box-shadow: 0 2px 10px rgba(110, 231, 183, 0.25);
}

.settings-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--theme-accent, #6ee7b7);
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.settings-user-pill:not(.has-user) .settings-user-avatar {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.settings-user-name {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.settings-modal-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.settings-modal-close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

.settings-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
}

@media (max-width: 660px) {
  .settings-grid-layout {
    grid-template-columns: 1fr;
  }
}

.settings-grid-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.settings-section-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 1rem;
  padding: 0.95rem 1.15rem;
  width: 100%;
  box-shadow:
    inset 1px 1px 1px var(--theme-glass-border),
    inset -1px -1px 1px rgba(255, 255, 255, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.settings-section-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px) saturate(135%);
  backdrop-filter: blur(6px) saturate(135%);
  filter: url(#settings-liquid-glass);
  -webkit-filter: url(#settings-liquid-glass);
}

.preset-title {
  font-size: 0.98rem;
  margin-bottom: 0;
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-icon {
  opacity: 0.85;
}

.rhythm-preset {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
}

.rhythm-preset h4,
.rhythm-preset h3 {
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
}

.rhythm-preset .preset-time-label {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  margin: 0;
  opacity: 0.9;
}

.active-preset {
  border-color: var(--theme-accent, #6ee7b7);
  background: var(--theme-glass-tint-active, rgba(110, 231, 183, 0.2));
  box-shadow: 0 0 14px var(--theme-glass-glow, rgba(110, 231, 183, 0.2));
}

/* Theme Options Grid and Swatches */
.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

@media (max-width: 480px) {
  .theme-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-preset-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.theme-preset-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.theme-preset-chip:active {
  transform: translateY(0);
}

.theme-preset-chip.active-theme {
  background: var(--theme-glass-tint-active);
  border-color: var(--theme-glass-specular);
  box-shadow: 0 0 12px var(--theme-glass-glow), inset 0 0 6px var(--theme-glass-glow);
  transform: scale(1.02);
}

.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.theme-swatch::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 2.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.theme-swatch--default {
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4), inset 0 1px 1px #fff;
}

.theme-swatch--green {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  box-shadow: 0 0 6px rgba(110, 231, 183, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.theme-swatch--yellow {
  background: linear-gradient(135deg, #fef08a, #fde047);
  box-shadow: 0 0 6px rgba(253, 224, 71, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.theme-swatch--blue {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  box-shadow: 0 0 6px rgba(147, 197, 253, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.theme-swatch--pink {
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
  box-shadow: 0 0 6px rgba(244, 114, 182, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.theme-swatch--purple {
  background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
  box-shadow: 0 0 6px rgba(196, 181, 253, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.theme-label {
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.background-options {
  display: flex;
  gap: 0.65rem;
  width: 100%;
  padding-top: 0;
}

.rhythm-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  padding: 0;
}

.glass-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.glass-btn:active {
  transform: translateY(1px);
}

.glass-btn--primary {
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.38), rgba(var(--theme-accent-rgb), 0.18));
  border-color: var(--theme-glass-border);
  box-shadow: 0 4px 12px var(--theme-glass-glow);
}

.glass-btn--primary:hover {
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.50), rgba(var(--theme-accent-rgb), 0.28));
  border-color: var(--theme-glass-specular);
  box-shadow: 0 6px 16px var(--theme-glass-glow);
}

.glass-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.glass-btn--fireplace {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(234, 88, 12, 0.15));
  border-color: rgba(251, 146, 60, 0.45);
}

.glass-btn--fireplace:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(234, 88, 12, 0.25));
  border-color: rgba(251, 146, 60, 0.75);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.glass-btn--fireplace.active-bg {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.5), rgba(234, 88, 12, 0.32));
  border-color: #fb923c;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.fireplace-sound-row.hidden {
  display: none !important;
}

.functional-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 0.5rem;
}

.setting-label {
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.5;
}

@media (max-height: 520px) {
  .settings-scroll-area {
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
      max(0.5rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }

  .settings-modal-container {
    width: min(760px, calc(100vw - 1.5rem));
    max-width: none;
    padding: 0.45rem;
  }

  .settings-content-wrapper {
    gap: 0.65rem;
    padding: 0.65rem;
  }

  .settings-section-card {
    padding: 0.75rem;
    gap: 0.55rem;
  }

  .preset-title {
    font-size: 1rem;
    gap: 0.5rem;
  }

  .section-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }

  .rhythm-options,
  .background-options {
    gap: 0.5rem;
  }

  .rhythm-preset {
    height: 76px;
    padding: 0.5rem;
    gap: 0.35rem;
    border-radius: 0.75rem;
  }

  .rhythm-preset h3,
  .rhythm-preset .preset-time-label {
    font-size: 0.85rem;
  }

  .glass-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .functional-row {
    gap: 1rem;
    padding-top: 0;
  }

  .setting-label {
    font-size: 0.85rem;
  }

  .switch {
    transform: scale(0.82);
    transform-origin: right center;
  }

  #settings-close-btn {
    margin-top: 0 !important;
  }
}

/* MAXUIUX TOGGLE CSS */
.switch {
  display: inline-flex;
  cursor: pointer;
  position: relative;
  perspective: 600px;
  perspective-origin: center;
}

.switch input {
  display: none;
}

.switch-slider {
  flex-shrink: 0;
  position: relative;
  width: 86px;
  height: 38px;
  overflow: hidden;
  border-radius: 24px;
}

.switch-slider::before,
.switch-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* OFF gradient */
.switch-slider::before {
  background: linear-gradient(145deg, #e4e4e6 0%, #d7d7db 100%);
  opacity: 1;
  z-index: 1;
}

/* ON gradient - Always green when on across all toggles to clearly show ON state */
.switch-slider::after {
  background: linear-gradient(145deg, #34c759 0%, #24a849 100%) !important;
  opacity: 0;
  z-index: 2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .switch-slider::before { opacity: 0; }
.switch input:checked + .switch-slider::after { opacity: 1; }

.switch input:checked + .switch-slider {
  box-shadow: 0 0 14px rgba(52, 199, 89, 0.42);
}

.switch-dot-glass {
  position: absolute;
  top: 0;
  left: 4px;
  bottom: 0;
  z-index: 2;
  width: 50px;
  height: 32px;
  scale: 1;
  border-radius: 50px;
  margin-top: auto;
  margin-bottom: auto;
  background-color: rgba(255, 255, 255, 0);
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: dot-off 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.switch-dot-glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit; /* Fixes the square artifact on Safari/iOS */
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  filter: url(#mini-liquid-lens);
  scale: 1;
  opacity: 0;
  animation: filter-off 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.switch-dot-glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.switch-dot-glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow:
    inset 1px 1px 0 rgba(82, 190, 121, 0.2),
    inset 1px 3px 0 rgba(28, 63, 90, 0.05),
    inset 0 0 22px rgba(255, 255, 255, 0.6),
    inset -1px -1px 0 rgba(82, 190, 121, 0.12);
  animation: filter-specular-off 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.switch input:checked ~ .switch-dot-glass { animation: dot-on 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.switch input:checked ~ .switch-dot-glass .switch-dot-glass-specular { animation: filter-specular-on 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.switch input:checked ~ .switch-dot-glass .switch-dot-glass-filter { animation: filter-on 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes dot-on {
  0% { transform: scale(1) translateX(0) rotateY(0deg); }
  12% { transform: scale(1.6) translateX(0) rotateY(-33deg); }
  50% { transform: scale(1.6) translateX(28px) rotateY(-33deg); }
  82% { background-color: rgba(255, 255, 255, 0.1); }
  90% { background-color: rgba(255, 255, 255, 0.7); }
  100% { transform: scale(1) translateX(28px) rotateY(0deg); background-color: rgba(255, 255, 255, 1); }
}

@keyframes dot-off {
  0% { transform: scale(1) translateX(28px) rotateY(0deg); }
  12% { transform: scale(1.6) translateX(28px) rotateY(33deg); }
  50% { transform: scale(1.6) translateX(0) rotateY(33deg); }
  82% { background-color: rgba(255, 255, 255, 0.1); }
  90% { background-color: rgba(255, 255, 255, 0.7); }
  100% { transform: scale(1) translateX(0) rotateY(0deg); background-color: rgba(255, 255, 255, 1); }
}

@keyframes filter-on {
  0% { opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes filter-off {
  0% { opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes filter-specular-on {
  0% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0), inset 1px 3px 0 rgba(28, 63, 90, 0), inset 0 0 22px rgba(255, 255, 255, 0), inset -1px -1px 0 rgba(82, 190, 121, 0); }
  12% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0.2), inset 1px 3px 0 rgba(28, 63, 90, 0.05), inset 0 0 22px rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(82, 190, 121, 0.12); }
  80% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0.2), inset 1px 3px 0 rgba(28, 63, 90, 0.05), inset 0 0 22px rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(82, 190, 121, 0.12); }
  100% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0), inset 1px 3px 0 rgba(28, 63, 90, 0), inset 0 0 22px rgba(255, 255, 255, 0), inset -1px -1px 0 rgba(82, 190, 121, 0); }
}
@keyframes filter-specular-off {
  0% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0), inset 1px 3px 0 rgba(28, 63, 90, 0), inset 0 0 22px rgba(255, 255, 255, 0), inset -1px -1px 0 rgba(82, 190, 121, 0); }
  12% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0.2), inset 1px 3px 0 rgba(28, 63, 90, 0.05), inset 0 0 22px rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(82, 190, 121, 0.12); }
  80% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0.2), inset 1px 3px 0 rgba(28, 63, 90, 0.05), inset 0 0 22px rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(82, 190, 121, 0.12); }
  100% { box-shadow: inset 1px 1px 0 rgba(82, 190, 121, 0), inset 1px 3px 0 rgba(28, 63, 90, 0), inset 0 0 22px rgba(255, 255, 255, 0), inset -1px -1px 0 rgba(82, 190, 121, 0); }
}

/* ==========================================================================
   Spotify Bottom-Left Floating Music Window
   ========================================================================== */

.spotify-widget {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 95;
  width: 360px;
  max-width: calc(100vw - 44px);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  user-select: none;
}

/* Minimized Floating Pill */
.spotify-minimized-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 9999px;
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(30, 215, 96, 0.2);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spotify-minimized-pill:hover {
  background: rgba(26, 34, 52, 0.9);
  border-color: rgba(30, 215, 96, 0.5);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(30, 215, 96, 0.35);
}

.spotify-minimized-pill:active {
  transform: scale(0.97);
}

.spotify-pill-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotify-pill-text {
  letter-spacing: 0.02em;
}

/* Equalizer audio bars animation */
.spotify-pill-soundbars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  margin-left: 2px;
}

.spotify-pill-soundbars .bar {
  width: 2.5px;
  background: #1ED760;
  border-radius: 2px;
  animation: spotify-soundbar 1.2s ease-in-out infinite alternate;
}

.spotify-pill-soundbars .bar-1 { height: 6px; animation-delay: 0.1s; }
.spotify-pill-soundbars .bar-2 { height: 13px; animation-delay: 0.3s; }
.spotify-pill-soundbars .bar-3 { height: 8px; animation-delay: 0.2s; }

@keyframes spotify-soundbar {
  0% { height: 3px; }
  50% { height: 13px; }
  100% { height: 7px; }
}

/* Expanded Glass Window Card */
.spotify-window-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(16, 20, 32, 0.72);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  border: 1px solid var(--theme-card-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--theme-glass-glow), inset 0 1px 0 var(--theme-glass-border);
  padding: 10px 12px 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.spotify-widget.spotify-widget--collapsed .spotify-window-card {
  display: none;
}

.spotify-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Header */
.spotify-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.spotify-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.spotify-brand-svg {
  filter: drop-shadow(0 0 6px rgba(30, 215, 96, 0.4));
  flex-shrink: 0;
}

.spotify-brand-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

.spotify-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotify-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotify-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  transform: translateY(-1px);
}

.spotify-icon-btn:active {
  transform: scale(0.94);
}

.spotify-icon-btn.active {
  background: rgba(30, 215, 96, 0.22);
  border-color: rgba(30, 215, 96, 0.6);
  color: #1ED760;
}

/* Floating Popover Windows (Curated Focus Vibes & Connect Your Preferred Music) */
.spotify-floating-window {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(14, 18, 30, 0.88);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(30, 215, 96, 0.15);
  padding: 12px 14px;
  z-index: 10;
  animation: spotify-float-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotify-floating-window.hidden,
.spotify-widget .hidden {
  display: none !important;
}

.spotify-floating-window .glass-filter,
.spotify-floating-window .glass-overlay,
.spotify-floating-window .glass-specular {
  pointer-events: none;
}

@keyframes spotify-float-up {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spotify-floating-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.spotify-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.spotify-floating-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.spotify-floating-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.spotify-floating-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.spotify-close-sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
  flex-shrink: 0;
}

.spotify-close-sub-btn svg {
  pointer-events: none;
}

.spotify-close-sub-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: scale(1.1);
}

.spotify-close-sub-btn:active {
  transform: scale(0.95);
}

/* Presets Grid */
.spotify-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.spotify-preset-chip {
  padding: 7px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-preset-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  transform: translateY(-1px);
}

.spotify-preset-chip.active {
  background: rgba(30, 215, 96, 0.22);
  border-color: rgba(30, 215, 96, 0.65);
  color: #1ED760;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(30, 215, 96, 0.2);
}

/* Custom URL Form */
.spotify-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spotify-input-row {
  display: flex;
  gap: 6px;
}

.spotify-url-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  color: white;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.spotify-url-input:focus {
  border-color: #1ED760;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(30, 215, 96, 0.2);
}

.spotify-url-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.spotify-apply-btn {
  background: #1ED760;
  color: #0c120c;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.spotify-apply-btn:hover {
  background: #1fdf64;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(30, 215, 96, 0.35);
}

.spotify-apply-btn:active {
  transform: scale(0.96);
}

.spotify-feedback {
  font-size: 0.7rem;
  min-height: 14px;
  line-height: 1.3;
}

.spotify-feedback--error {
  color: #ff6b6b;
}

.spotify-feedback--success {
  color: #1ED760;
}

.spotify-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.spotify-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.18s;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.spotify-link-btn:hover {
  color: white;
}

/* Spotify Iframe Wrap */
.spotify-iframe-wrap {
  width: 100%;
  height: 152px;
  border-radius: 12px;
  overflow: hidden;
  background: #121212;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotify-iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: none;
  border-radius: 12px;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Maximized Player State (Shows full playlist tracklist) */
.spotify-widget.spotify-widget--maximized {
  width: 380px;
}

.spotify-widget.spotify-widget--maximized .spotify-iframe-wrap,
.spotify-widget.spotify-widget--maximized .spotify-iframe {
  height: 352px;
}

/* Responsive adjustment */
@media (max-width: 600px) {
  .spotify-widget {
    bottom: 14px;
    left: 14px;
    width: calc(100vw - 28px);
    max-width: 340px;
  }
  .spotify-widget.spotify-widget--maximized {
    width: calc(100vw - 28px);
  }
}

/* Setting Label Group & Subtext */
.setting-label-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.setting-subtext {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.25;
}

.test-blocker-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.2rem;
}

.glass-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glass-chip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--theme-accent, #6ee7b7);
  transform: translateY(-1px);
}

/* Mindful Off-Screen Break Overlay (Calming Blank Screen Experience) */
.offscreen-break-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.offscreen-break-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.offscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

.offscreen-container {
  position: relative;
  z-index: 2;
  width: min(92vw, 620px);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.12));
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.3));
  border-radius: 1.5rem;
  padding: 1.6rem 2rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: offscreenPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.offscreen-container::-webkit-scrollbar {
  display: none;
}

@keyframes offscreenPopIn {
  from {
    transform: scale(0.94) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.offscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.offscreen-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  border-radius: 9999px;
  background: rgba(var(--theme-accent-rgb), 0.18);
  border: 1px solid var(--theme-accent, #6ee7b7);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
}

.offscreen-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-accent, #6ee7b7);
  box-shadow: 0 0 8px var(--theme-accent, #6ee7b7);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.offscreen-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.offscreen-timer-pill strong {
  font-size: 1.05rem;
  color: white;
  letter-spacing: 0.04em;
}

.offscreen-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

.offscreen-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.offscreen-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.offscreen-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: white;
  margin: 0.15rem 0 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.offscreen-subtitle {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
  margin: 0;
  line-height: 1.45;
}

/* Spotlight Idea Card */
.offscreen-spotlight-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--theme-glass-specular, rgba(255, 255, 255, 0.45));
  border-radius: 1.15rem;
  padding: 1.25rem 1.4rem;
  box-shadow:
    0 8px 24px var(--theme-glass-glow, rgba(110, 231, 183, 0.2)),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.3s ease;
}

.spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spotlight-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--theme-accent, #6ee7b7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spotlight-duration {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.spotlight-body {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.spotlight-icon {
  font-size: 2.75rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.spotlight-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spotlight-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.spotlight-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

.offscreen-shuffle-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offscreen-shuffle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--theme-accent, #6ee7b7);
  transform: translateY(-1px);
}

/* Quick Ideas Grid */
.offscreen-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.offscreen-grid-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.offscreen-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.55rem;
}

.offscreen-idea-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.offscreen-idea-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--theme-accent, #6ee7b7);
  transform: translateY(-2px);
}

.idea-chip-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.idea-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.idea-chip-text strong {
  font-size: 0.8rem;
  color: white;
}

.idea-chip-text small {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
}

.offscreen-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

/* ==========================================================================
   Auth Modal (Email & Google Only)
   ========================================================================== */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.auth-modal-container {
  position: relative;
  z-index: 2;
  width: min(92vw, 420px);
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.14));
  border: 1.5px solid var(--theme-glass-border, rgba(255, 255, 255, 0.35));
  border-radius: 1.5rem;
  padding: 1.8rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: authPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authPopIn {
  from {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.auth-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.auth-modal-subtitle {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.4;
}

.auth-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

.auth-guest-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Auth Mode Tabs */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: white;
}

.auth-tab.active {
  background: var(--theme-accent, #6ee7b7);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.auth-footer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.auth-link-btn {
  background: none;
  border: none;
  color: var(--theme-accent, #6ee7b7);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.auth-link-btn:hover {
  opacity: 0.85;
}

.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-auth-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.google-auth-btn:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-divider span {
  padding: 0 0.75rem;
}

.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.auth-label-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--theme-accent, #6ee7b7);
  opacity: 0.85;
}

.input-shake {
  animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes inputShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--theme-accent, #6ee7b7);
  box-shadow: 0 0 10px var(--theme-glass-glow, rgba(110, 231, 183, 0.3));
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-signup-row {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.auth-error-msg {
  font-size: 0.8rem;
  color: #fca5a5;
  min-height: 1rem;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 0.25rem;
}

/* User Logged In Card */
.auth-user-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  flex-shrink: 0;
}

.auth-profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.auth-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.auth-email {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.auth-active-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  margin-top: 0.2rem;
}

.glass-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

.glass-btn--secondary:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: white;
}

/* Google Sign-In Account Chooser Panel */
.google-auth-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.google-auth-panel.hidden,
.google-saved-accounts-wrap.hidden {
  display: none !important;
}

.google-saved-accounts-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.google-chooser-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.google-saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 150px;
  overflow-y: auto;
}

.google-account-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  font-family: 'Outfit', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-account-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--theme-accent, #6ee7b7);
  transform: translateY(-1px);
}

.google-account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  flex-shrink: 0;
}

.google-account-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.google-account-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-account-email {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Log Out Buttons (Top-Right Bar, Streak Popover, Settings Header) */
.top-logout-btn,
.settings-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.2s ease;
}

.top-logout-btn:hover,
.settings-logout-btn:hover,
.popover-logout-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.65);
  color: #ffffff;
  transform: translateY(-1px);
}

.top-logout-btn.hidden,
.settings-logout-btn.hidden {
  display: none !important;
}

.popover-logout-btn {
  margin-left: auto;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Cross-Tab YouTube Blocker Extension Status Card */
.extension-status-card {
  margin-top: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.extension-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.extension-status-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fde68a;
}

.extension-status-badge--active {
  color: #6ee7b7;
}

.extension-setup-btn {
  padding: 0.28rem 0.65rem !important;
  font-size: 0.74rem !important;
}

.extension-status-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

.extension-setup-steps {
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.extension-setup-steps.hidden {
  display: none !important;
}

.extension-steps-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.extension-steps-list code {
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.32);
  font-family: monospace;
  font-size: 0.72rem;
}




