:root {
  color-scheme: dark;
  --bg: #0d141b;
  --page-bg: linear-gradient(180deg, #0f171f 0%, #0c1319 100%);
  --overlay-bg: none;
  --panel: rgba(14, 21, 29, 0.82);
  --panel-strong: rgba(11, 17, 24, 0.92);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #f3f5f7;
  --muted: rgba(243, 245, 247, 0.64);
  --accent-rgb: 127, 200, 163;
  --accent-strong-rgb: 101, 182, 142;
  --accent: rgb(var(--accent-rgb));
  --accent-strong: rgb(var(--accent-strong-rgb));
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  --glass-rgb: 10, 16, 22;
  --glass-opacity: 0.5;
  --glass-bg: rgba(var(--glass-rgb), var(--glass-opacity));
  --glass-panel-blur: 10px;
  --input-bg: var(--glass-bg);
  --input-focus-bg: var(--glass-bg);
  --input-border: rgba(var(--accent-rgb), 0.36);
  --hint-bg: rgba(var(--accent-rgb), 0.18);
  --chip-bg: var(--glass-bg);
  --chip-hover-bg: var(--glass-bg);
  --chip-hover-border: rgba(255, 255, 255, 0.16);
  --chip-active-bg: rgba(var(--accent-rgb), 0.18);
  --chip-active-border: rgba(var(--accent-rgb), 0.46);
  --icon-bg: rgba(255, 255, 255, 0.08);
  --link-hover-bg: rgba(255, 255, 255, 0.08);
  --wallpaper-filter: none;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --container: 1180px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3f6;
  --page-bg: linear-gradient(180deg, #edf3f7 0%, #e7edf2 100%);
  --overlay-bg: none;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(18, 36, 52, 0.1);
  --text: #17212b;
  --muted: rgba(23, 33, 43, 0.66);
  --accent-rgb: 47, 122, 90;
  --accent-strong-rgb: 38, 101, 74;
  --accent: rgb(var(--accent-rgb));
  --accent-strong: rgb(var(--accent-strong-rgb));
  --shadow: 0 10px 24px rgba(27, 46, 66, 0.08);
  --glass-rgb: 255, 255, 255;
  --glass-opacity: 0.5;
  --glass-bg: rgba(var(--glass-rgb), var(--glass-opacity));
  --glass-panel-blur: 10px;
  --input-bg: var(--glass-bg);
  --input-focus-bg: var(--glass-bg);
  --input-border: rgba(var(--accent-rgb), 0.28);
  --hint-bg: rgba(var(--accent-rgb), 0.12);
  --chip-bg: var(--glass-bg);
  --chip-hover-bg: var(--glass-bg);
  --chip-hover-border: rgba(18, 36, 52, 0.14);
  --chip-active-bg: rgba(var(--accent-rgb), 0.12);
  --chip-active-border: rgba(var(--accent-rgb), 0.3);
  --icon-bg: rgba(18, 36, 52, 0.06);
  --link-hover-bg: rgba(18, 36, 52, 0.05);
  --wallpaper-filter: none;
}

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

html {
  font-size: 16px;
  overflow-y: auto;
  scrollbar-width: none;
  scrollbar-color: rgba(var(--accent-rgb), 0.62) transparent;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei UI",
    "Noto Sans SC", sans-serif;
  background: var(--page-bg);
  caret-color: transparent;
}

body,
.search-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.62) transparent;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body::-webkit-scrollbar,
.search-input::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-track,
.search-input::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb,
.search-input::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.72), rgba(var(--accent-strong-rgb), 0.62));
  border: 2px solid rgba(var(--glass-rgb), 0.04);
  border-radius: 999px;
  background-clip: padding-box;
}

body::-webkit-scrollbar-thumb:hover,
.search-input::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.86), rgba(var(--accent-strong-rgb), 0.76));
}

body::-webkit-scrollbar-corner,
.search-input::-webkit-scrollbar-corner {
  background: transparent;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

#wallpaper-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.01);
  filter: var(--wallpaper-filter);
}

#wallpaper-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-scrollbar {
  position: fixed;
  top: 10px;
  right: 2px;
  bottom: 10px;
  z-index: 12;
  width: 8px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.page-scrollbar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.page-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 1px;
  width: 6px;
  min-height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.76), rgba(var(--accent-strong-rgb), 0.66));
  box-shadow: 0 0 0 1px rgba(var(--glass-rgb), 0.04);
  cursor: pointer;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.page-scrollbar:hover .page-scrollbar-thumb,
.page-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-strong-rgb), 0.82));
}

.max-w-6xl {
  width: min(calc(100% - 32px), var(--container));
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 24px;
  padding-right: 24px;
}

.py-8 {
  padding-top: 32px;
  padding-bottom: 32px;
}

.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.flex-1 {
  flex: 1;
}

.w-full {
  width: 100%;
}

.max-w-3xl {
  max-width: 860px;
}

.relative {
  position: relative;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-white {
  color: var(--text);
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 600;
}

.text-xs {
  font-size: 0.78rem;
}

.text-sm {
  font-size: 0.92rem;
}

.text-2xl {
  font-size: 1.45rem;
}

.text-4xl {
  font-size: clamp(2.2rem, 4.8vw, 3.5rem);
}

.text-5xl {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-10 {
  margin-bottom: 1.75rem;
}

.mb-12 {
  margin-bottom: 1.25rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-12 {
  margin-top: 2rem;
}

.-mt-20 {
  margin-top: 0;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-5 {
  gap: 1.25rem;
}

.opacity-60 {
  opacity: 0.6;
}

.opacity-80 {
  opacity: 0.8;
}

.text-white\/80 {
  color: rgba(245, 247, 251, 0.8);
}

.fade-in {
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.theme-switcher {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 10;
  width: auto;
}

.theme-switcher-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 42px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.theme-switcher-toggle:hover {
  border-color: var(--chip-hover-border);
  background: var(--chip-hover-bg);
}

.theme-switcher-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
}

.theme-switcher-label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}

.theme-switcher-caret {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.theme-switcher.open .theme-switcher-caret {
  transform: rotate(180deg);
}

.theme-switcher-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 180px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.theme-switcher.open .theme-switcher-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-delay-settings {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  width: auto;
}

.search-delay-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.search-delay-toggle:hover {
  border-color: var(--chip-hover-border);
  background: var(--chip-hover-bg);
}

.search-delay-gear {
  font-size: 1.08rem;
  line-height: 1;
}

.search-delay-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 220px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.search-delay-settings.open .search-delay-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-delay-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
}

.search-delay-title {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.search-delay-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-delay-input {
  width: 88px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(var(--glass-rgb), 0.22);
  color: var(--text);
  outline: none;
}

.search-delay-input:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
}

.search-delay-unit {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.search-delay-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.theme-switcher-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-option:hover {
  background: var(--link-hover-bg);
  border-color: var(--panel-border);
}

.theme-option.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.24);
  color: var(--accent);
}

.theme-option-check {
  opacity: 0;
  color: var(--accent);
  font-size: 0.85rem;
  transform: scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.theme-option.active .theme-option-check {
  opacity: 1;
  transform: scale(1);
}

header,
#searchArea,
#quickLinks,
footer {
  position: relative;
  z-index: 1;
}

header,
#searchArea,
.group-card,
.engine-btn,
.link-item {
  -webkit-user-select: none;
  user-select: none;
}

header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
  align-items: start;
  gap: 24px;
  padding: 8px 6px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  color: #fff;
}

.header-title {
  position: absolute;
  top: 26px;
  left: 50%;
  display: flex;
  justify-content: center;
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.site-title {
  margin: 0;
  min-height: 0.96em;
  font-size: clamp(1.5rem, 3.2vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.96;
  color: #fff;
  text-align: center;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
}

#weather {
  display: flex;
  align-items: center;
  align-self: start;
  justify-self: start;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

#weather .text-2xl {
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1;
}

#weather .font-medium,
#clock {
  opacity: 0.8;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
  display: block;
  min-height: 0.95em;
}

#weather .text-xs,
#date {
  color: #fff;
  opacity: 0.8;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

section.flex-1 {
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.weather-loading {
  color: rgba(255, 255, 255, 0.88);
}

header .text-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  min-width: 0;
  justify-self: end;
  color: #fff;
  text-align: center;
}

#searchArea {
  padding: 22px 30px 24px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
  max-width: 980px;
}

.search-input-wrap {
  position: relative;
  min-height: 60px;
  border: 1px solid var(--input-border);
  border-radius: 30px;
  background: var(--input-bg);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.search-engine-indicator {
  position: absolute;
  top: 50%;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  transform: translateY(-50%);
  overflow: hidden;
  pointer-events: none;
}

.search-engine-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(12px) scale(0.72) rotate(-14deg);
  transform-origin: center;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.search-engine-icon.is-current {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

.search-engine-icon.is-exit {
  opacity: 0;
  transform: translateY(-12px) scale(0.72) rotate(14deg);
}

.search-input {
  width: calc(100% - 76px);
  min-height: 60px;
  padding: 16px 18px 16px 62px;
  border: 0;
  border-radius: 30px 0 0 30px;
  background: transparent;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.35;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
  resize: none;
  overflow-y: hidden;
  white-space: pre-wrap;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  transform: none;
}

.search-input-wrap:focus-within {
  border-color: rgba(var(--accent-rgb), 0.68);
  background: var(--input-focus-bg);
}

.search-hint {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  background: var(--hint-bg);
  color: var(--text);
  font-size: 1.24rem;
  letter-spacing: 0;
  text-transform: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.search-hint:hover {
  background: rgba(var(--accent-rgb), 0.24);
}

.search-hint:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.52);
  outline-offset: 2px;
}

.search-redirect-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text);
}

.search-redirect-notice[hidden] {
  display: none;
}

.search-redirect-copy {
  min-width: 0;
  font-size: 0.96rem;
  line-height: 1.4;
}

.search-redirect-copy strong {
  font-weight: 700;
}

.search-redirect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.search-redirect-button:hover {
  background: rgba(var(--accent-rgb), 0.24);
  border-color: rgba(var(--accent-rgb), 0.56);
}

#engineButtons {
  margin-top: 14px;
}

.engine-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.engine-btn:hover {
  transform: none;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.08));
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.engine-btn.active {
  border-width: 2px;
  padding: 9px 13px;
  background: var(--chip-bg);
  border-color: var(--chip-active-border);
  box-shadow: none;
}

.engine-btn.active:hover {
  border-width: 2px;
  background: var(--chip-bg);
  border-color: var(--chip-active-border);
  box-shadow: none;
}

.engine-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.engine-btn span {
  font-size: 1.12rem;
}

#quickLinks {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 0.25rem;
  align-items: stretch;
}

.group-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 18px 14px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--shadow);
}

.group-card > div:last-child {
  flex: 1;
}

.group-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--icon-bg);
  font-size: 1.1rem;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.link-item + .link-item {
  margin-top: 8px;
}

.link-item:hover {
  transform: none;
  background: var(--link-hover-bg);
}

.link-title {
  font-weight: 600;
  line-height: 1.25;
}

.link-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.link-arrow {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-item:hover .link-arrow {
  transform: translateX(2px);
  color: var(--accent);
}

footer {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-theme="light"] footer {
  color: #fff;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .md\:text-5xl {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
  }

  .md\:text-6xl {
    font-size: clamp(3rem, 6vw, 4.4rem);
  }
}

@media (max-width: 900px) {
  header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title title"
      "weather time";
    gap: 14px 18px;
    padding: 4px 2px 0;
  }

  .header-title {
    position: static;
    grid-area: title;
    justify-content: flex-start;
    transform: none;
    pointer-events: auto;
  }

  #weather {
    grid-area: weather;
    margin-top: 0;
  }

  header .text-right {
    grid-area: time;
  }

  .-mt-20 {
    margin-top: 0;
  }

  #searchArea {
    padding: 20px 22px;
    border-radius: 18px;
  }
}

@media (max-width: 640px) {
  .max-w-6xl {
    width: min(calc(100% - 20px), var(--container));
  }

  .px-4 {
    padding-left: 16px;
    padding-right: 16px;
  }

  .py-8 {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "weather"
      "time";
    align-items: start;
    margin-bottom: 1.75rem;
    padding: 0;
  }

  #weather {
    min-width: 0;
    margin-top: 0;
  }

  .header-title {
    position: static;
    justify-content: flex-start;
    padding: 0;
    transform: none;
    pointer-events: auto;
  }

  .site-title {
    font-size: 1.55rem;
  }

  .text-right {
    min-width: 0;
    text-align: left;
  }

  #searchArea {
    padding: 18px 16px;
  }

  .search-input {
    min-height: 56px;
    padding-left: 58px;
    padding-right: 18px;
    font-size: 1.08rem;
    width: 100%;
    border-radius: 28px;
  }

  .search-engine-indicator {
    left: 12px;
    width: 34px;
    height: 34px;
  }

  .search-hint {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
  }

  .search-redirect-notice {
    flex-direction: column;
    align-items: stretch;
  }

  .search-redirect-button {
    width: 100%;
  }

  #engineButtons {
    justify-content: flex-start;
  }

  .engine-btn {
    width: calc(50% - 4px);
    justify-content: center;
  }

  .theme-switcher {
    left: 10px;
    bottom: 10px;
  }

  .search-delay-settings {
    right: 10px;
    bottom: 10px;
  }

  .theme-switcher-panel {
    bottom: calc(100% + 8px);
    width: min(180px, calc(100vw - 20px));
  }

  .search-delay-panel {
    bottom: calc(100% + 8px);
    width: min(220px, calc(100vw - 20px));
  }

  .group-card {
    padding: 16px 14px 12px;
  }

  footer {
    margin-top: 2rem;
    letter-spacing: 0.08em;
  }
}
