:root {
  color-scheme: dark;
  --ui-scale: clamp(0.78, calc(100vw / 2560), 1);
  --space: calc(24px * var(--ui-scale));
  --widget-w: calc(330px * var(--ui-scale));
  --widget-h: calc(190px * var(--ui-scale));
  --dock-icon: calc(54px * var(--ui-scale));
  --top-icon: calc(48px * var(--ui-scale));
  --text: #f7faf8;
  --muted: rgba(247, 250, 248, 0.68);
  --glass: rgba(16, 24, 27, 0.52);
  --glass-strong: rgba(12, 17, 19, 0.76);
  --line: rgba(255, 255, 255, 0.16);
  --accent: #6ee7b7;
  --accent-2: #f8c471;
  --danger: #ff7a7a;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  overflow: hidden;
  background: #101417;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.background {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(120deg, rgba(13, 24, 28, 0.3), rgba(51, 41, 22, 0.1)),
    url("https://picsum.photos/seed/startpage-2026-05-08/2400/1500") center / cover;
  transform: scale(1.02);
  transition: background-image 600ms ease, filter 800ms ease;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.15), transparent 24rem),
    linear-gradient(90deg, rgba(5, 9, 12, 0.58), rgba(5, 9, 12, 0.15), rgba(5, 9, 12, 0.68));
}

.page-shell.night .background {
  filter: saturate(0.82) brightness(0.62) contrast(1.08);
}

.page-shell.day .background {
  filter: saturate(1.04) brightness(0.94);
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
}

.page-shell.night .atmosphere {
  background-image:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 38%, rgba(255, 255, 255, 0.74) 0 1px, transparent 2px);
  background-size: 220px 190px, 280px 230px, 320px 260px;
}

.title-strip {
  position: absolute;
  top: clamp(22px, 4vw, 54px);
  left: clamp(22px, 4.4vw, 72px);
  max-width: min(calc(460px * var(--ui-scale)), calc(100vw - 150px));
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.42);
}

.daily-quote {
  position: absolute;
  top: clamp(28px, 4.4vw, 58px);
  left: 50%;
  z-index: 3;
  width: min(calc(420px * var(--ui-scale)), 35vw);
  padding: calc(14px * var(--ui-scale)) calc(16px * var(--ui-scale));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 14, 16, 0.34);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  text-align: center;
  transform: translateX(-50%);
}

.daily-quote p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.86rem, 1.3vw, 1rem);
  font-weight: 700;
  line-height: 1.35;
}

.daily-quote span {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.title-strip p,
.panel-head p,
.widget-label {
  margin: 0;
  color: var(--muted);
  font-size: calc(0.78rem * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-strip h1 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 5vw, calc(5.5rem * var(--ui-scale)));
  line-height: 0.92;
  letter-spacing: 0;
}

.top-actions {
  position: fixed;
  top: var(--space);
  right: var(--space);
  z-index: 7;
  display: flex;
  gap: 10px;
}

.top-action {
  width: var(--top-icon);
  height: var(--top-icon);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, background 180ms ease;
}

.top-action:hover,
.top-action:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.panel-toggle i {
  animation: spinGear 7s linear infinite;
}

.panel-toggle:hover i,
.panel-toggle:focus-visible i {
  animation-duration: 1.8s;
}

.random-background i {
  transition: transform 220ms ease;
}

.random-background:hover i,
.random-background:focus-visible i {
  transform: rotate(90deg) scale(1.08);
}

.widget-layer {
  position: absolute;
  inset: 0;
}

.widget {
  position: absolute;
  width: var(--widget-w);
  height: var(--widget-h);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(16, 24, 27, 0.58), rgba(16, 24, 27, 0.28));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  user-select: none;
  touch-action: none;
}

.widget.dragging {
  cursor: grabbing;
  outline: 2px solid rgba(110, 231, 183, 0.48);
}

.widget-grip {
  position: absolute;
  top: 9px;
  right: 11px;
  color: rgba(255, 255, 255, 0.42);
  cursor: grab;
}

.clock-widget {
  left: 7vw;
  top: 31vh;
  padding: calc(22px * var(--ui-scale)) calc(48px * var(--ui-scale)) calc(22px * var(--ui-scale)) calc(22px * var(--ui-scale));
}

.clock-time {
  margin-top: calc(18px * var(--ui-scale));
  font-size: calc(4.6rem * var(--ui-scale));
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0;
}

.clock-seconds {
  margin-top: 2px;
  color: var(--accent);
  font-size: calc(1.35rem * var(--ui-scale));
  font-weight: 800;
}

.analog-clock {
  position: absolute;
  inset: 26px 84px 18px 84px;
  margin: auto;
  width: calc(142px * var(--ui-scale));
  height: calc(142px * var(--ui-scale));
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 4px, transparent 5px),
    rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08);
}

.analog-clock span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(255, 255, 255, 0.86);
  font-size: calc(0.78rem * var(--ui-scale));
  font-weight: 850;
  text-align: center;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 30deg)) translateY(calc(-57px * var(--ui-scale)))
    rotate(calc(var(--i) * -30deg));
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 4px;
  border-radius: 999px;
  background: #fff;
  transform-origin: bottom center;
}

.hour-hand {
  height: calc(38px * var(--ui-scale));
  background: var(--accent-2);
}

.minute-hand {
  height: calc(52px * var(--ui-scale));
  background: #fff;
}

.second-hand {
  width: 2px;
  height: calc(58px * var(--ui-scale));
  background: var(--accent);
}

.analog-clock b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.date-widget {
  left: 66vw;
  top: 26vh;
  padding: calc(24px * var(--ui-scale)) calc(52px * var(--ui-scale)) calc(24px * var(--ui-scale)) calc(24px * var(--ui-scale));
}

.date-day {
  margin-top: 8px;
  font-size: calc(3.7rem * var(--ui-scale));
  font-weight: 800;
}

.date-full {
  color: var(--muted);
  font-size: calc(1.05rem * var(--ui-scale));
}

.weather-widget {
  left: 43vw;
  top: 57vh;
  display: grid;
  grid-template-columns: calc(104px * var(--ui-scale)) 1fr;
  gap: calc(18px * var(--ui-scale));
  padding: calc(24px * var(--ui-scale)) calc(52px * var(--ui-scale)) calc(24px * var(--ui-scale)) calc(24px * var(--ui-scale));
  cursor: pointer;
}

.weather-widget::after {
  content: "\f105";
  position: absolute;
  right: calc(18px * var(--ui-scale));
  bottom: calc(16px * var(--ui-scale));
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.weather-widget:hover::after,
.weather-widget:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.weather-temp {
  margin-top: 3px;
  font-size: calc(3.1rem * var(--ui-scale));
  font-weight: 850;
  line-height: 0.96;
}

.weather-desc {
  color: var(--muted);
  font-size: calc(0.95rem * var(--ui-scale));
}

.weather-scene {
  position: relative;
  height: calc(96px * var(--ui-scale));
}

.sun,
.cloud,
.rain,
.snow {
  position: absolute;
  display: block;
}

.sun {
  top: 10px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 38px rgba(255, 209, 102, 0.7);
  animation: pulseSun 3.4s ease-in-out infinite;
}

.cloud {
  width: 74px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18));
  animation: driftCloud 5.8s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 12px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 12px;
  width: 30px;
  height: 30px;
}

.cloud::after {
  left: 36px;
  width: 38px;
  height: 38px;
}

.cloud-a {
  top: 42px;
  left: 13px;
}

.cloud-b {
  top: 53px;
  left: 39px;
  width: 58px;
  opacity: 0.72;
  animation-delay: -1.4s;
}

.rain,
.snow {
  opacity: 0;
}

.rain {
  top: 72px;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: #82d8ff;
  animation: fallRain 840ms linear infinite;
}

.rain-a {
  left: 35px;
}

.rain-b {
  left: 66px;
  animation-delay: -320ms;
}

.snow {
  top: 76px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: fallSnow 1.8s ease-in infinite;
}

.snow-a {
  left: 35px;
}

.snow-b {
  left: 70px;
  animation-delay: -700ms;
}

.weather-widget.rainy .rain,
.weather-widget.stormy .rain,
.weather-widget.snowy .snow {
  opacity: 1;
}

.weather-widget.cloudy .sun,
.weather-widget.rainy .sun,
.weather-widget.snowy .sun,
.weather-widget.stormy .sun {
  opacity: 0.36;
}

.weather-widget.clear .cloud-b {
  opacity: 0.22;
}

.forecast-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 18, 0.32);
  backdrop-filter: blur(14px);
}

.forecast-panel {
  width: min(920px, calc(100vw - 48px));
  max-height: min(720px, calc(100svh - 48px));
  overflow: auto;
  padding: calc(24px * var(--ui-scale));
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.86), rgba(38, 48, 71, 0.72));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  color: #fff;
}

.forecast-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.forecast-head p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: calc(0.88rem * var(--ui-scale));
}

.forecast-head h2 {
  margin: 0;
  font-size: calc(1.65rem * var(--ui-scale));
}

.forecast-head span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: calc(0.95rem * var(--ui-scale));
}

.forecast-close {
  display: grid;
  place-items: center;
  width: calc(42px * var(--ui-scale));
  height: calc(42px * var(--ui-scale));
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

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

.forecast-card {
  min-height: calc(210px * var(--ui-scale));
  padding: calc(16px * var(--ui-scale));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.forecast-card.today {
  background: rgba(255, 255, 255, 0.2);
}

.forecast-card h3,
.forecast-card p {
  margin: 0;
}

.forecast-card h3 {
  font-size: calc(1rem * var(--ui-scale));
}

.forecast-date {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: calc(0.78rem * var(--ui-scale));
}

.forecast-icon {
  display: grid;
  place-items: center;
  width: calc(52px * var(--ui-scale));
  height: calc(52px * var(--ui-scale));
  margin: calc(16px * var(--ui-scale)) 0 calc(14px * var(--ui-scale));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: calc(1.35rem * var(--ui-scale));
}

.forecast-temp {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}

.forecast-temp strong {
  font-size: calc(1.55rem * var(--ui-scale));
}

.forecast-temp span {
  color: rgba(255, 255, 255, 0.62);
  font-size: calc(0.95rem * var(--ui-scale));
}

.forecast-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: calc(0.9rem * var(--ui-scale));
}

.forecast-meta {
  display: grid;
  gap: 6px;
  margin-top: calc(14px * var(--ui-scale));
  color: rgba(255, 255, 255, 0.7);
  font-size: calc(0.8rem * var(--ui-scale));
}

.notes-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.post-it {
  position: absolute;
  width: calc(190px * var(--ui-scale));
  min-height: calc(150px * var(--ui-scale));
  padding: calc(10px * var(--ui-scale));
  border-radius: 5px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
  color: #221b12;
  pointer-events: auto;
  transform: rotate(-1.4deg);
  touch-action: none;
}

.post-it:nth-child(even) {
  transform: rotate(1.2deg);
}

.post-it.yellow {
  background: linear-gradient(150deg, #fff3a6, #f6d96c);
}

.post-it.mint {
  background: linear-gradient(150deg, #cdf7d3, #8ee2ad);
}

.post-it.peach {
  background: linear-gradient(150deg, #ffd6b8, #f7a977);
}

.post-it.blue {
  background: linear-gradient(150deg, #cfeaff, #86c6f4);
}

.post-it.dragging {
  cursor: grabbing;
  transform: rotate(0deg) scale(1.02);
}

.post-it-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(34, 27, 18, 0.58);
  cursor: grab;
}

.post-it-bar button {
  display: grid;
  place-items: center;
  width: calc(24px * var(--ui-scale));
  height: calc(24px * var(--ui-scale));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  color: rgba(34, 27, 18, 0.72);
}

.post-it textarea {
  width: 100%;
  min-height: calc(108px * var(--ui-scale));
  margin-top: calc(4px * var(--ui-scale));
  border: 0;
  background: transparent;
  color: inherit;
  font: 700 calc(0.98rem * var(--ui-scale)) / 1.35 "Segoe UI", system-ui, sans-serif;
  resize: none;
  outline: none;
}

.dock-wrap {
  position: fixed;
  right: 0;
  bottom: calc(22px * var(--ui-scale));
  left: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.dock {
  display: flex;
  align-items: end;
  gap: calc(8px * var(--ui-scale));
  min-height: calc(78px * var(--ui-scale));
  max-width: min(92vw, 920px);
  padding: calc(11px * var(--ui-scale));
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 14, 16, 0.52);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.dock-item {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--dock-icon);
  height: var(--dock-icon);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  transform-origin: bottom center;
  transition: transform 180ms ease, background 180ms ease;
}

.dock-item:hover,
.dock-item:focus-visible {
  z-index: 2;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-13px) scale(1.32);
}

.dock-item i {
  font-size: calc(1.55rem * var(--ui-scale));
}

.dock-item span {
  position: absolute;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 170px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(6, 9, 10, 0.82);
  color: #fff;
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dock-item:hover span,
.dock-item:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.media-player {
  position: fixed;
  right: var(--space);
  bottom: calc(26px * var(--ui-scale));
  z-index: 8;
  width: min(calc(360px * var(--ui-scale)), calc(100vw - 32px));
  pointer-events: none;
}

.media-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--top-icon);
  height: var(--top-icon);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 14, 16, 0.66);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.media-panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--top-icon) + 12px);
  width: 100%;
  padding: calc(14px * var(--ui-scale));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 14, 16, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  opacity: 0.001;
  pointer-events: none;
  transform: translateY(calc(100% + 80px)) scale(0.96);
  transform-origin: right bottom;
  transition: opacity 180ms ease, transform 180ms ease;
}

.media-player.open .media-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: calc(10px * var(--ui-scale));
}

.media-head p {
  margin: 0;
  color: var(--muted);
  font-size: calc(0.72rem * var(--ui-scale));
  font-weight: 800;
  text-transform: uppercase;
}

.media-head h3 {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(1rem * var(--ui-scale));
}

.media-head > i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: calc(36px * var(--ui-scale));
  height: calc(36px * var(--ui-scale));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
}

.media-frame-wrap {
  position: relative;
  overflow: hidden;
  min-height: calc(214px * var(--ui-scale));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.media-frame-wrap iframe {
  display: block;
  width: 100%;
  height: calc(214px * var(--ui-scale));
  border: 0;
}

.radio-player {
  display: grid;
  align-content: center;
  gap: calc(14px * var(--ui-scale));
  min-height: calc(214px * var(--ui-scale));
  padding: calc(18px * var(--ui-scale));
}

.radio-visual {
  display: grid;
  place-items: center;
  gap: calc(8px * var(--ui-scale));
  color: #ffd166;
  text-align: center;
}

.radio-visual i {
  display: grid;
  place-items: center;
  width: calc(62px * var(--ui-scale));
  height: calc(62px * var(--ui-scale));
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.18);
  font-size: calc(1.9rem * var(--ui-scale));
  box-shadow: 0 0 42px rgba(255, 209, 102, 0.2);
}

.radio-visual span {
  display: inline-block;
  width: calc(46px * var(--ui-scale));
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.58);
  animation: radioPulse 900ms ease-in-out infinite;
}

.radio-visual span:nth-child(3) {
  width: calc(30px * var(--ui-scale));
  animation-delay: -180ms;
}

.radio-visual span:nth-child(4) {
  width: calc(54px * var(--ui-scale));
  animation-delay: -360ms;
}

.radio-player audio {
  width: 100%;
  accent-color: #ffd166;
}

.media-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.media-empty i {
  font-size: calc(2rem * var(--ui-scale));
}

.media-tabs {
  display: flex;
  gap: 7px;
  margin-top: calc(10px * var(--ui-scale));
  overflow-x: auto;
  padding-bottom: 2px;
}

.media-tabs button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  max-width: 140px;
  min-height: calc(34px * var(--ui-scale));
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.media-tabs button.active {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.18);
}

.media-tabs span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-player.spotify .media-toggle,
.media-player.spotify .media-head > i,
.playlist-icon.spotify {
  background: rgba(30, 215, 96, 0.22);
  color: #8ff5b4;
}

.media-player.youtube .media-toggle,
.media-player.youtube .media-head > i,
.playlist-icon.youtube {
  background: rgba(255, 0, 0, 0.22);
  color: #ff8d8d;
}

.media-player.youtube-music .media-toggle,
.media-player.youtube-music .media-head > i,
.playlist-icon.youtube-music {
  background: rgba(255, 40, 40, 0.2);
  color: #ffb1b1;
}

.media-player.radio .media-toggle,
.media-player.radio .media-head > i,
.playlist-icon.radio {
  background: rgba(255, 209, 102, 0.2);
  color: #ffd166;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  width: min(430px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: rgba(10, 14, 16, 0.82);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(26px);
  transform: translateX(104%);
  transition: transform 240ms ease;
}

.settings-panel.open {
  transform: translateX(0);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.panel-head button,
.panel-row button,
.file-button,
.shortcut-form button,
.shortcut-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.panel-head button {
  width: 40px;
}

.panel-content {
  height: calc(100vh - 90px);
  padding: 18px 24px 28px;
  overflow: auto;
}

.settings-group {
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.settings-group h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.78) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus {
  border-color: rgba(110, 231, 183, 0.72);
}

.panel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-row button,
.file-button,
.shortcut-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  color: #fff;
}

.primary-action {
  background: rgba(110, 231, 183, 0.18) !important;
  border-color: rgba(110, 231, 183, 0.38) !important;
}

.file-button input {
  display: none;
}

.shortcut-form,
.playlist-form {
  display: grid;
}

.shortcut-list,
.playlist-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.shortcut-row,
.playlist-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.shortcut-row.dragging {
  opacity: 0.5;
}

.playlist-row.active {
  border-color: rgba(110, 231, 183, 0.46);
  background: rgba(110, 231, 183, 0.12);
}

.shortcut-icon,
.playlist-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  cursor: grab;
}

.shortcut-meta strong,
.shortcut-meta small,
.playlist-meta strong,
.playlist-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-meta small,
.playlist-meta small {
  color: var(--muted);
}

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

.shortcut-actions button {
  width: 36px;
}

.delete-action {
  color: var(--danger);
}

@keyframes pulseSun {
  50% {
    transform: scale(1.09);
    box-shadow: 0 0 54px rgba(255, 209, 102, 0.88);
  }
}

@keyframes spinGear {
  to {
    transform: rotate(360deg);
  }
}

@keyframes driftCloud {
  50% {
    transform: translateX(8px);
  }
}

@keyframes fallRain {
  to {
    transform: translateY(18px);
    opacity: 0;
  }
}

@keyframes fallSnow {
  to {
    transform: translate(9px, 24px);
    opacity: 0;
  }
}

@keyframes radioPulse {
  50% {
    transform: scaleX(0.62);
    opacity: 0.62;
  }
}

@media (max-width: 1920px) {
  :root {
    --ui-scale: 0.76;
  }

  .clock-widget {
    top: 32vh;
  }

  .date-widget {
    left: 68vw;
    top: 28vh;
  }

  .weather-widget {
    top: 56vh;
  }

  .daily-quote {
    width: min(330px, 32vw);
  }

  .forecast-panel {
    width: min(780px, calc(100vw - 44px));
  }
}

@media (min-width: 2200px) {
  :root {
    --ui-scale: 0.94;
  }
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .page-shell {
    min-height: 100svh;
    overflow: hidden;
  }

  .title-strip {
    top: 26px;
    left: 20px;
    max-width: calc(100vw - 92px);
  }

  .widget {
    min-width: 170px;
  }

  .clock-widget,
  .date-widget,
  .weather-widget {
    transform: none;
  }

  .weather-widget {
    grid-template-columns: 82px 1fr;
    min-width: min(340px, calc(100vw - 32px));
  }

  .forecast-overlay {
    align-items: end;
    padding: 14px;
  }

  .forecast-panel {
    width: 100%;
    max-height: min(720px, calc(100svh - 28px));
    border-radius: 22px;
  }

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

  .forecast-card {
    min-height: 0;
  }

  .dock {
    gap: 6px;
    overflow-x: auto;
  }

  .dock-item {
    flex: 0 0 auto;
  }
}
