:root {
  --bg: #06040a;
  --bg-soft: #0c0814;
  --violet: #9a84c7;
  --violet-bright: #bfa4f7;
  --violet-deep: #5a418a;
  --accent: #bfa4f7;
  --text: #ece7f8;
  --text-dim: rgba(236, 231, 248, 0.62);
  --glass: rgba(154, 132, 199, 0.08);
  --glass-bg: rgba(154, 132, 199, 0.08);
  --border: rgba(191, 164, 247, 0.24);
  --glass-border: rgba(191, 164, 247, 0.24);
  --panel: rgba(12, 8, 20, 0.92);
  --card-bg: rgba(14, 10, 24, 0.84);
  --card-surface: rgba(22, 16, 38, 0.82);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  --modal-bg: #130d21;
  --overlay-dim: rgba(5, 3, 10, 0.76);
  --logo-grad: linear-gradient(135deg, #f5f2fc 0%, #bfa4f7 50%, #e6ace0 100%);
  --glow-color: rgba(191, 164, 247, 0.36);
  --sun-grad: radial-gradient(ellipse at 50% 100%, rgba(161, 140, 209, 0.38) 0%, rgba(90, 65, 138, 0.16) 45%, transparent 75%);
  --stage-bg: #030205;
}

body.light-theme,
body.theme-morning {
  --bg: #e7e0f4;
  --bg-soft: #dcd2ee;
  --violet: #65459c;
  --violet-bright: #4f3085;
  --violet-deep: #371d63;
  --accent: #4f3085;
  --text: #181026;
  --text-dim: rgba(24, 16, 38, 0.66);
  --glass: rgba(79, 48, 133, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --border: rgba(79, 48, 133, 0.24);
  --glass-border: rgba(79, 48, 133, 0.24);
  --panel: rgba(250, 248, 255, 0.96);
  --card-bg: rgba(246, 242, 253, 0.86);
  --card-surface: #ffffff;
  --card-shadow: 0 10px 28px rgba(79, 48, 133, 0.11);
  --modal-bg: #ffffff;
  --overlay-dim: rgba(224, 215, 242, 0.82);
  --logo-grad: linear-gradient(135deg, #181026 0%, #54338c 52%, #863fb5 100%);
  --glow-color: rgba(84, 51, 140, 0.26);
  --sun-grad: radial-gradient(ellipse at 50% 100%, rgba(109, 79, 158, 0.28) 0%, rgba(154, 132, 199, 0.14) 48%, transparent 75%);
  --stage-bg: #dfd7ee;
}

body.theme-morphing,
body.theme-morphing *,
body.theme-morphing *::before,
body.theme-morphing *::after {
  transition:
    background-color 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 132, 199, 0.32) transparent;
}

*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(154, 132, 199, 0.32);
  border-radius: 999px;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

#helloWord {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: clamp(3.4rem, 11.8vw, 9.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.26;
  padding: 0.08em 0.04em 0.16em;
  overflow: visible;
  color: var(--text);
  text-shadow: 0 10px 38px var(--glow-color);
  will-change: transform, opacity;
  user-select: none;
}

#helloWord.brand-mode {
  font-weight: 700;
  letter-spacing: -0.025em;
  text-shadow: none;
  filter: drop-shadow(0 12px 32px var(--glow-color));
}

#helloWord.brand-mode .char {
  display: inline-block;
  padding-bottom: 0.14em;
  line-height: 1.24;
  background: var(--logo-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(154, 132, 199, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 8px 26px rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.45s ease;
}

body.light-theme .glass-btn,
body.theme-morning .glass-btn {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 1px #ffffff, 0 6px 20px rgba(79, 48, 133, 0.14);
}

.theme-pill-wrap {
  display: inline-flex;
  align-items: center;
}

.theme-pill {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 36px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14), 0 6px 20px rgba(0, 0, 0, 0.2);
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
}

body.light-theme .theme-pill,
body.theme-morning .theme-pill {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 1px #ffffff, 0 4px 16px rgba(79, 48, 133, 0.12);
}

.theme-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, #7c52d4 0%, #5848c2 100%);
  box-shadow: 0 3px 12px rgba(124, 82, 212, 0.36);
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
  transition: color 0.25s ease;
}

.theme-opt.active {
  color: #ffffff;
}
