* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-main: #202124;
  --text-muted: #70757a;
  --link-color: #1a0dab;
  --border-color: #dfe1e5;
  --overlay-bg: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] {
  --bg-primary: #202124;
  --bg-secondary: #303134;
  --text-main: #e8eaed;
  --text-muted: #9aa0a6;
  --link-color: #8ab4f8;
  --border-color: #3c4043;
  --overlay-bg: rgba(32, 33, 36, 0.95);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary) !important;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-family: arial, sans-serif;
  background-color: var(--bg-primary) !important;
  margin: 0;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

body,
button,
input,
textarea,
select {
  color: var(--text-main);
}

a {
  color: var(--link-color);
}

#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 6px 14px 6px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease;
}

#themeToggle:hover {
  background: var(--bg-primary);
}

.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 20px;
  border: 2px solid var(--text-main);
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.toggle-thumb {
  width: 12px;
  height: 12px;
  background-color: var(--text-main);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}

:root[data-theme="dark"] .toggle-thumb {
  transform: translateX(16px);
}

.logo-wrapper {
  position: relative;
  width: 269.59px;
  height: 120px;
  cursor: pointer;
}

.logo-wrapper--header {
  width: 67.4px;
  height: 30px;
  flex: 0 0 auto;
  margin-right: 35px;
}

.logo-wrapper--header .google-logo {
  transform: translateY(9.75px);
}

.google-logo,
.pritam-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.google-logo {
  z-index: 2;
  transition: opacity 0.3s ease;
  transform: translateY(39px);
}

.pritam-logo {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.logo-wrapper.is-active .pritam-logo {
  opacity: 1;
  transition: none;
  pointer-events: auto;
}

.fade-letter {
  transition: opacity 0.4s ease;
}

.logo-wrapper.is-active .fade-letter {
  opacity: 0;
}

.logo-wrapper.is-active .google-l {
  opacity: 0;
  transition: opacity 0.01s;
  transition-delay: 1.2s;
}

.anim-path {
  stroke-dasharray: var(--path-length);
  stroke-dashoffset: var(--path-length);
  opacity: 0;
}

.is-active .anim-path {
  animation: drawStroke forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.is-active .top-bar {
  animation: drawStroke 0.7s linear forwards;
  animation-delay: 0.5s;
}

.stem-pa {
  opacity: 0;
  transform-origin: center;
  transform: translateX(157.42px);
}

.is-active .stem-pa {
  animation: slideTraveler 1s linear forwards;
  animation-delay: 1.2s;
}

@keyframes slideTraveler {
  0% {
    transform: translateX(157.42px);
    opacity: 1;
  }
  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}

.stem-ma,
.stem-ta,
.stem-ee {
  opacity: 0;
}

.is-active .stem-ma {
  animation: snapVisible 0.01s forwards;
  animation-delay: 1.2s;
}

.is-active .stem-ta {
  animation: snapVisible 0.01s forwards;
  animation-delay: 1.62s;
}

.is-active .stem-ee {
  animation: snapVisible 0.01s forwards;
  animation-delay: 2.02s;
}

.is-active .curve-pa,
.is-active .curve-ee,
.is-active .curve-ta,
.is-active .curve-ma {
  animation-duration: 0.7s;
  animation-delay: 2.2s;
}

.is-active .slash-ra {
  animation-duration: 0.7s;
  animation-delay: 2.2s;
  animation-timing-function: ease-out;
}

@keyframes drawStroke {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes snapVisible {
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.logo-wrapper:not(.is-active) .stem-pa {
  transform: translateX(157.42px);
  transition: transform 0s ease 0.35s;
}

.logo-wrapper:not(.is-active) .fade-letter,
.logo-wrapper:not(.is-active) .google-l {
  opacity: 1 !important;
  transition: opacity 0.4s ease 0.35s;
}

:root[data-theme="dark"] .google-logo path {
  fill: #ffffff !important;
}

:root[data-theme="dark"] .pritam-logo path {
  fill: none !important;
  stroke: #ffffff !important;
}

[data-theme="dark"] .ac-logo {
  filter: brightness(0) invert(1) !important;
}

[data-theme="dark"] #gameCanvas {
  filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 600px) {
  #themeToggleText {
    display: none;
  }

  #themeToggle {
    padding: 6px;
    gap: 0;
  }
}
