:root { color-scheme: light; } :root[data-theme='dark'] { color-scheme: dark; } html { background-color: transparent; } body { transition: background-color 0.25s ease, color 0.25s ease; } [data-theme='dark'] body { background-color: #0b1220; color: #e5e7eb; } [data-theme-toggle-wrapper] .theme-toggle-switch { position: relative; display: inline-flex; align-items: center; width: 2.9rem; height: 1.5rem; padding: 0 0.15rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.35); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; } [data-theme='dark'] [data-theme-toggle-wrapper] .theme-toggle-switch { background: rgba(148, 163, 184, 0.25); border-color: rgba(148, 163, 184, 0.4); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.45); } .theme-toggle-thumb { position: relative; width: 1.2rem; height: 1.2rem; border-radius: 999px; background-color: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); transform: translateX(0); transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; } [data-theme='dark'] .theme-toggle-thumb { background-color: #c7d2fe; } .theme-toggle-checkbox:checked + .theme-toggle-switch .theme-toggle-thumb { transform: translateX(1.4rem); }