/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/602f4fe43d81b0c589b2/fonts/courier-prime-0.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/37dff0e441de59880b99/fonts/courier-prime-1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/60b48c4cc678fc002792/fonts/courier-prime-2.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/b21420739e4efe524069/fonts/courier-prime-3.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/18c8e32ea1e572327d72/fonts/courier-prime-4.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/21bf7ff8d9e067443a3f/fonts/courier-prime-5.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/078c780980eb6dc4865a/fonts/courier-prime-6.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/06622415713b4150c18f/fonts/courier-prime-7.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Iceland';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/0d1c96c3c8c5404c97b7/fonts/iceland.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*Default styles*/


* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Iceland", sans-serif;
}

body {
  background-color: rgb(25, 25, 25);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.bg-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(98, 165, 92, 0.06);
  animation: particleDrift linear infinite;
}


@keyframes particleDrift {
  0% {
    transform: translateY(110vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(10px) scale(1);
  }
  50% {
    transform: translateY(50vh) translateX(-15px) scale(1.1);
  }
  90% {
    opacity: 1;
    transform: translateY(10vh) translateX(8px) scale(0.9);
  }
  100% {
    transform: translateY(-5vh) translateX(0) scale(0);
    opacity: 0;
  }
}

button {
  cursor: pointer;
}

.container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
}

/*Navbar*/
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 10px 20px;
  color: white;
  font-size: 48px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgb(83, 141, 78), rgb(98, 165, 92), rgb(83, 141, 78), transparent) 1;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.nav-left, .nav-right {
  display: flex;
}

.nav-button {
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: none;
  background: none;
  margin: 0px 10px;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0;
  margin: 0 6px;
  cursor: pointer;
  font-family: inherit;
}

.nav-icon-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.35);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  color: #fff;
  transition: background 0.2s, color 0.2s, transform 0.15s ease;
}

.nav-icon-circle::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgb(25, 25, 25);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.nav-icon-circle > * {
  position: relative;
  z-index: 1;
}

.nav-icon-btn:hover .nav-icon-circle {
  background: rgb(83, 141, 78);
  color: rgb(98, 165, 92);
  transform: scale(1.08);
}

.nav-icon-btn:active .nav-icon-circle {
  transform: scale(0.92);
  transition-duration: 0.05s;
}

.nav-icon-circle svg {
  flex-shrink: 0;
}

.nav-profile-initial-wrap .nav-profile-initial {
  font-size: 1rem;
  font-weight: 700;
  color: rgb(98, 165, 92);
}

.nav-icon-btn:hover .nav-profile-initial-wrap .nav-profile-initial {
  color: #fff;
}

.nav-desktop-only {
  display: flex;
}

.nav-mobile-only {
  display: none;
}

@media (max-width: 599px) {
  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: block;
  }

  .nav-mobile-menu {
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }

  .nav-mobile-menu .nav-icon-btn:hover .nav-icon-circle {
    transform: none;
  }

  .nav-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    padding: 8px 0;
    background: linear-gradient(165deg, #2d2d2d 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    transform-origin: top right;
    animation: navDropdownOpen 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .nav-dropdown.nav-dropdown-closing {
    animation: navDropdownClose 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .nav-dropdown-item {
    animation: navDropdownItemIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  }

  .nav-dropdown-item:nth-child(1) { animation-delay: 0.04s; }
  .nav-dropdown-item:nth-child(2) { animation-delay: 0.07s; }
  .nav-dropdown-item:nth-child(3) { animation-delay: 0.1s; }
  .nav-dropdown-item:nth-child(4) { animation-delay: 0.13s; }

  .nav-dropdown:not([hidden]):not(.nav-dropdown-closing) .js-mobile-profile-avatar > * {
    animation: mobileProfileArrive .4s ease-out .13s backwards;
  }
  .nav-dropdown-profile-avatar {
    transition: transform .18s ease, color .18s ease, background .18s ease;
  }
  .js-profile-button:is(:hover, :focus-visible) .nav-dropdown-profile-avatar {
    color: rgb(98, 165, 92);
    background: rgb(83, 141, 78);
    transform: scale(1.08);
  }
  .js-profile-button:active .nav-dropdown-profile-avatar { transform: scale(.92); }


  .nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
  }

  .nav-dropdown-item:hover,
  .nav-dropdown-item:focus-visible {
    background: rgba(83, 141, 78, 0.2);
    outline: none;
  }

  .nav-dropdown-item-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    color: #fff;
    flex-shrink: 0;
  }

  .nav-dropdown-item-icon::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #252525;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  }

  .nav-dropdown-item-icon > * {
    position: relative;
    z-index: 1;
  }

  .nav-dropdown-profile-avatar {
    font-size: 14px;
  }

  .nav-dropdown .nav-profile-initial-wrap .nav-profile-initial {
    font-size: 0.85rem;
  }

  .navbar {
    font-size: 28px;
    padding: 12px 56px 12px 16px;
    min-height: 56px;
    box-sizing: border-box;
    align-items: center;
  }

  .nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 120px);
    pointer-events: none;
  }

  .nav-center .nav-text {
    pointer-events: auto;
  }
}

@keyframes navDropdownOpen {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes navDropdownClose {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.88) translateY(-12px);
  }
}

@keyframes navDropdownItemIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-text {
  cursor: default;
  transition: text-shadow 0.3s ease;
}

.nav-text:hover {
  animation: titleFlicker 1.5s ease-in-out infinite;
}

@keyframes titleFlicker {
  0%, 100% {
    text-shadow: 0 0 4px rgba(98, 165, 92, 0.2);
  }
  10% {
    text-shadow: 0 0 8px rgba(98, 165, 92, 0.5),
                 0 0 20px rgba(98, 165, 92, 0.15);
  }
  12% {
    text-shadow: none;
  }
  14% {
    text-shadow: 0 0 6px rgba(98, 165, 92, 0.4),
                 0 0 16px rgba(98, 165, 92, 0.12);
  }
  50% {
    text-shadow: 0 0 10px rgba(98, 165, 92, 0.5),
                 0 0 24px rgba(98, 165, 92, 0.2);
  }
  52% {
    text-shadow: 0 0 2px rgba(98, 165, 92, 0.15);
  }
  54% {
    text-shadow: 0 0 12px rgba(98, 165, 92, 0.55),
                 0 0 28px rgba(98, 165, 92, 0.2);
  }
}

@keyframes electricPulse {
  0% {
    color: rgb(98, 165, 92);
    text-shadow: 0 0 6px rgba(98, 165, 92, 0.5),
                 0 0 14px rgba(98, 165, 92, 0.25);
  }
  100% {
    color: rgb(140, 210, 135);
    text-shadow: 0 0 12px rgba(98, 165, 92, 0.8),
                 0 0 30px rgba(98, 165, 92, 0.35),
                 0 0 50px rgba(98, 165, 92, 0.1);
  }
}

.green-letter {
  color: rgb(98, 165, 92);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.green-letter.n-flicker-1 { animation: nFlicker1 0.35s ease-in-out; }
.green-letter.n-flicker-2 { animation: nFlicker2 0.6s ease-in-out; }
.green-letter.n-flicker-3 { animation: nFlicker3 0.9s ease-in-out; }

.nav-text:hover .green-letter {
  animation: electricPulse 0.8s ease-in-out infinite alternate;
}

@keyframes nFlicker1 {
  0%, 100% { color: rgb(98, 165, 92); text-shadow: none; }
  50% {
    color: rgb(140, 210, 135);
    text-shadow: 0 0 8px rgba(98, 165, 92, 0.6), 0 0 20px rgba(98, 165, 92, 0.2);
  }
}

@keyframes nFlicker2 {
  0%, 100% { color: rgb(98, 165, 92); text-shadow: none; }
  25% {
    color: rgb(140, 210, 135);
    text-shadow: 0 0 8px rgba(98, 165, 92, 0.6), 0 0 20px rgba(98, 165, 92, 0.2);
  }
  50% { color: rgb(98, 165, 92); text-shadow: none; }
  75% {
    color: rgb(150, 220, 140);
    text-shadow: 0 0 10px rgba(98, 165, 92, 0.7), 0 0 28px rgba(98, 165, 92, 0.25);
  }
}

@keyframes nFlicker3 {
  0%, 100% { color: rgb(98, 165, 92); text-shadow: none; }
  17% {
    color: rgb(140, 210, 135);
    text-shadow: 0 0 8px rgba(98, 165, 92, 0.6), 0 0 20px rgba(98, 165, 92, 0.2);
  }
  33% { color: rgb(98, 165, 92); text-shadow: none; }
  50% {
    color: rgb(150, 220, 140);
    text-shadow: 0 0 10px rgba(98, 165, 92, 0.7), 0 0 28px rgba(98, 165, 92, 0.25);
  }
  67% { color: rgb(98, 165, 92); text-shadow: none; }
  83% {
    color: rgb(135, 205, 130);
    text-shadow: 0 0 6px rgba(98, 165, 92, 0.5), 0 0 16px rgba(98, 165, 92, 0.15);
  }
}

/*Guessing area*/
.guess-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.guess-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 440px;
}

.guess-row .autocomplete-wrapper {
  flex: 1;
  min-width: 0;
}

.guess-row .guess-input {
  width: 100%;
}

.guess-row .guess-button {
  flex-shrink: 0;
}

.guess-input {
  font-size: 1.3rem;
  padding: 12px 32px 12px 14px;
  background-color: rgb(42, 42, 42);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 300px;
  border-radius: 10px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guess-input:-webkit-autofill,
.guess-input:-webkit-autofill:hover,
.guess-input:-webkit-autofill:focus,
.guess-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset !important;
  box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}

.guess-input:autofill {
  box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset;
  color: #fff;
}

.guess-input:focus {
  outline: none;
  border-color: rgb(83, 141, 78);
  box-shadow: 0 0 0 3px rgba(83, 141, 78, 0.25);
}

.guess-input:disabled,
.guess-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.4);
}

.guess-button,
.hint-button {
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  padding: 12px 0;
  border: none;
  background: linear-gradient(180deg, rgb(98, 165, 92), rgb(70, 125, 66));
  color: white;
  width: 110px;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 2px 8px rgba(83, 141, 78, 0.3);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.hint-button {
  width: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  flex-shrink: 0;
}

.hint-container {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 8;
  padding: 13px 18px 14px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(145deg, rgba(48, 62, 48, 0.98), rgba(32, 40, 32, 0.98));
  border: 1px solid rgba(98, 165, 92, 0.38);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(98, 165, 92, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  text-align: center;
  line-height: 1.4;
}

.hint-container::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 11px;
  height: 11px;
  background: rgba(48, 62, 48, 0.98);
  border-top: 1px solid rgba(98, 165, 92, 0.38);
  border-left: 1px solid rgba(98, 165, 92, 0.38);
  transform: rotate(45deg);
}

.hint-container.hint-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes signupPromptRipple {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes signupPromptGlow {
  0%, 100% {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.2),
                0 0 48px rgba(245, 158, 11, 0.1),
                0 12px 40px rgba(0, 0, 0, 0.4);
  }
  50% {
    border-color: rgba(251, 191, 36, 0.75);
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.35),
                0 0 64px rgba(245, 158, 11, 0.15),
                0 12px 40px rgba(0, 0, 0, 0.4);
  }
}

@keyframes signupPromptShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes signupPromptFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes signupPromptCardIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Signup prompt popover – near profile/menu button, non-blocking */
.signup-prompt-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 20px;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.signup-prompt-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.signup-prompt-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: linear-gradient(145deg, rgba(35, 32, 28, 0.98) 0%, rgba(28, 25, 22, 0.98) 100%);
  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 12px;
  max-width: min(320px, calc(100vw - 40px));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.signup-prompt-card::after {
  content: '';
  position: absolute;
  top: -8px;
  right: 24px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(245, 158, 11, 0.5);
}

.signup-prompt-popover.is-visible .signup-prompt-card {
  animation: signupPromptCardIn 0.35s ease-out forwards,
             signupPromptGlow 2.5s ease-in-out 0.35s infinite,
             signupPromptRipple 3s ease-in-out 0.35s infinite;
}

.signup-prompt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(251, 191, 36, 0.08) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: signupPromptShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.signup-prompt-text {
  font-size: clamp(0.95rem, 2.5vw, 1.08rem);
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.signup-prompt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.signup-prompt-btn {
  font-family: inherit;
  font-size: clamp(0.95rem, 2.2vw, 1rem);
  padding: 10px 20px;
  min-height: 44px;
  min-width: 44px;
  background: linear-gradient(180deg, rgb(251, 191, 36), rgb(245, 158, 11));
  color: rgb(25, 25, 25);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.signup-prompt-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
  filter: brightness(1.1);
}

.signup-prompt-btn:active {
  transform: translateY(0) scale(1);
}

.signup-prompt-dismiss {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.signup-prompt-dismiss:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 599px) {
  .signup-prompt-popover {
    right: 12px;
    top: calc(100% + 8px);
  }

  .signup-prompt-card::after {
    right: 12px;
  }
}

@media (max-width: 480px) {
  .signup-prompt-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .signup-prompt-actions {
    justify-content: center;
  }

  .signup-prompt-text {
    min-width: 0;
  }
}

.guess-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(83, 141, 78, 0.45);
  filter: brightness(1.1);
}

.hint-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  filter: brightness(1.2);
}

.guess-button:active,
.hint-button:active {
  transform: translateY(0);
}

.autocomplete-list {
  list-style: none;
  padding: 6px 0;
  margin: 6px 0 0;
  position: absolute;
  width: 100%;
  z-index: 10;
  background: rgba(32, 32, 32, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(83, 141, 78, 0.08);
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  animation: acDropIn 0.18s ease-out;
  transform-origin: top center;
}

@keyframes acDropIn {
  from {
    opacity: 0;
    transform: scaleY(0.6) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

.autocomplete-list::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-list::-webkit-scrollbar-track {
  background: transparent;
}

.autocomplete-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.autocomplete-list li {
  border: none;
  background: transparent;
}

.autocomplete-list button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 1.15rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  margin: 0 6px;
  width: calc(100% - 12px);
  transition: background 0.15s ease, color 0.15s ease;
}

.autocomplete-list button:hover,
.autocomplete-list button:focus-visible,
.autocomplete-list button.ac-active {
  background: rgba(83, 141, 78, 0.2);
  color: #fff;
  outline: none;
}

.autocomplete-list button.ac-active {
  border-left: 3px solid rgb(83, 141, 78);
  padding-left: 13px;
}

.autocomplete-list button .ac-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-list button .ac-match {
  color: rgb(98, 165, 92);
  font-weight: 700;
}

.autocomplete-wrapper {
  display: inline-block;
  position: relative;
}

.input-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.input-clear-btn.visible {
  display: flex;
}

.input-clear-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.input-clear-btn:active {
  transform: translateY(-50%) scale(0.9);
  transition-duration: 0.05s;
}

/*Display results*/
.correct-guess-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.js-additional-info,
.js-share-button {
  display: flex;
}

a.additional-info,
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  line-height: normal;
  padding: 10px 18px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

a.additional-info:hover,
.share-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

a.additional-info:active,
.share-button:active {
  transform: scale(0.95);
  transition-duration: 0.05s;
}

.guess-button:disabled {
  border-color: rgba(255, 255, 255, 0.25);
}

/*Popup*/
.popup {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: rgba(38, 38, 38, 0.95);
  color: #fff;
  padding: 16px 36px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(83, 141, 78, 0.15);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: normal;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  overflow-wrap: anywhere;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
}

.popup.popup-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.popup.popup-exit {
  transform: translateX(-50%) translateY(-40%);
  opacity: 0;
  transition: transform 0.25s ease-in,
              opacity 0.25s ease-in;
}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  color: white;
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

/*Display guesses section*/
.grid-container {
  margin-top: 55px;
  display: flex;
  justify-content: center;
}

.element-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
}

.element {
  position: relative;
  width: 250px;
  height: 250px;
  border: 2px solid rgb(97, 97, 97);
  border-radius: 15px;
  background-color: rgb(42, 42, 42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
}

.element.guessed-element {
  overflow: hidden;
}

.element.guessed-element::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.element.guessed-element:hover {
  transform: scale(1.025);
  box-shadow: rgba(255, 255, 255, 0.16) 0px 5px 18px 0px, rgba(255, 255, 255, 0.06) 0px 0px 0px 1px;
}

.name {
  font-size: 20px;
}

.atomic-number,
.family {
  position: absolute;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
}

.atomic-number {
  top: 5px;
  left: 5px;
}

.atomic-signal {
  display: inline-block;
}

.atomic-signal.signal-bounce {
  animation: signalBounce 0.5s ease-out;
}

@keyframes signalBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.5) translateY(-3px); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.family {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

.symbol {
  font-size: 80px;
}

.element-slot-number {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.08);
  user-select: none;
}

.element:not(.guessed-element) {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(42, 42, 42, 0.5);
}

.element:not(.guessed-element).next-slot {
  border-color: rgba(83, 141, 78, 0.45);
  animation: nextSlotPulse 2.4s ease-in-out infinite;
}

@keyframes nextSlotPulse {
  0%, 100% {
    border-color: rgba(83, 141, 78, 0.25);
    box-shadow: 0 0 0 0 rgba(83, 141, 78, 0);
  }
  50% {
    border-color: rgba(83, 141, 78, 0.55);
    box-shadow: 0 0 12px 2px rgba(83, 141, 78, 0.15);
  }
}

.element.shimmer,
.game-loading .element:not(.guessed-element) {
  overflow: hidden;
  position: relative;
}

.element.shimmer::after,
.game-loading .element:not(.guessed-element)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.04) 37%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.04) 63%,
    transparent 75%
  );
  background-size: 300% 100%;
  animation: shimmerSlide 2s linear infinite;
}

@keyframes shimmerSlide {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

.element.shimmer-done {
  animation: shimmerReveal 0.35s ease-out forwards;
}

.element.shimmer-done::after {
  display: none;
}

@keyframes shimmerReveal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.element.card-flip {
  opacity: 0;
  transform: rotateX(90deg) scale(0.95);
  animation: cardFlip 0.65s ease-out forwards;
}

@keyframes cardFlip {
  0% {
    transform: rotateX(90deg) scale(0.95);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotateX(0deg) scale(1);
    opacity: 1;
  }
}

.element.correct-card {
  border-color: rgb(83, 141, 78);
  animation: winGlow 2s ease-in-out infinite alternate;
}

.element.correct-card.card-flip {
  opacity: 0;
  transform: rotateX(90deg) scale(0.95);
  animation: cardFlip 0.65s ease-out forwards, winGlow 2s ease-in-out 0.65s infinite alternate;
}


@keyframes winGlow {
  from {
    box-shadow: 0 0 12px rgba(83, 141, 78, 0.4),
                0 0 24px rgba(83, 141, 78, 0.15);
  }
  to {
    box-shadow: 0 0 20px rgba(83, 141, 78, 0.6),
                0 0 40px rgba(83, 141, 78, 0.25);
  }
}

.green {
  color: rgb(83, 141, 78);
}

.family.family-flash {
  animation: familyFlash 0.8s ease-out 0.4s;
}

@keyframes familyFlash {
  0% {
    color: rgb(83, 141, 78);
    text-shadow: none;
  }
  30% {
    color: rgb(140, 220, 130);
    text-shadow: 0 0 8px rgba(83, 141, 78, 0.7), 0 0 20px rgba(83, 141, 78, 0.3);
  }
  100% {
    color: rgb(83, 141, 78);
    text-shadow: none;
  }
}

.yellow {
  color: rgb(181, 159, 59);
}

.reveal-answer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  background: rgba(42, 42, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 22px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.reveal-answer-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgb(83, 141, 78), rgb(55, 100, 52));
  flex-shrink: 0;
}

.reveal-answer-badge-symbol {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.reveal-answer-badge-num {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  margin-top: 2px;
}

.reveal-answer-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.reveal-answer-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

/*Shake animation*/
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.glow-red {
  animation: redGlowFade 0.6s ease-out forwards;
}

@keyframes redGlowFade {
  0% {
    border-color: #f87171;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.6),
                0 0 24px rgba(248, 113, 113, 0.2);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
  }
}

/* Modal popups (Statistics & How to Play) */
.modal-card {
  background: linear-gradient(165deg, #2d2d2d 0%, #1f1f1f 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: modalAppear 0.25s ease-out;
  margin: auto;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-card.modal-closing {
  animation: modalExit 0.2s ease-in forwards;
}

@keyframes modalExit {
  to {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px 0;
  letter-spacing: 0.02em;
  color: #fff;
}

.modal-back-button {
  font-size: 1rem;
  padding: 12px 28px;
  background-color: rgb(83, 141, 78);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 24px;
  transition: background-color 0.2s ease, transform 0.1s ease;
  font-family: inherit;
}

.modal-back-button:hover {
  background-color: rgb(98, 165, 92);
}

.modal-back-button:active {
  transform: scale(0.95);
  transition-duration: 0.05s;
}

/* Statistics modal */
.stats-modal .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats-modal .stat-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  animation: statFadeIn 0.4s ease-out forwards;
}

.stats-modal .stat-item:nth-child(1) { animation-delay: 0.1s; }
.stats-modal .stat-item:nth-child(2) { animation-delay: 0.18s; }
.stats-modal .stat-item:nth-child(3) { animation-delay: 0.26s; }
.stats-modal .stat-item:nth-child(4) { animation-delay: 0.34s; }
.stats-modal .stat-item:nth-child(5) { animation-delay: 0.42s; }

@keyframes statFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-modal .stat-item-wide {
  grid-column: span 2;
}

.stats-modal .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  opacity: 0;
  transform: scale(0.7);
  animation: statPop 0.4s ease-out forwards;
}

.stats-modal .stat-item:nth-child(1) .stat-value { animation-delay: 0.2s; }
.stats-modal .stat-item:nth-child(2) .stat-value { animation-delay: 0.28s; }
.stats-modal .stat-item:nth-child(3) .stat-value { animation-delay: 0.36s; }
.stats-modal .stat-item:nth-child(4) .stat-value { animation-delay: 0.44s; }
.stats-modal .stat-item:nth-child(5) .stat-value { animation-delay: 0.52s; }

.stats-modal .stat-value.stat-pop-reset {
  animation: none;
  transform: scale(0.7);
  opacity: 0.4;
}

.stats-modal .stat-value.stat-pop {
  opacity: 1;
  transform: scale(1);
  animation: statPopUpdate 0.35s ease-out;
}

@keyframes statPop {
  to { opacity: 1; transform: scale(1); }
}

@keyframes statPopUpdate {
  0% { transform: scale(0.7); opacity: 0.4; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.stats-modal .stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-modal .guess-distribution {
  text-align: left;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-modal .distribution-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: rgba(255, 255, 255, 0.9);
}

.stats-modal .bars-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
}

.stats-modal .bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.stats-modal .bar-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  min-height: 1.2em;
}

.stats-modal .bar-track {
  width: 100%;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stats-modal .bar-fill {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, rgb(98, 165, 92), rgb(83, 141, 78));
  border-radius: 6px 6px 0 0;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: barGrow 0.5s ease-out forwards;
}

@keyframes barGrow {
  to {
    transform: scaleY(1);
  }
}

.stats-modal .bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
}

/* How to Play modal */
.help-modal {
  max-width: 480px;
  text-align: left;
}

.help-modal .modal-title {
  text-align: center;
}

.help-modal .help-content {
  margin-bottom: 8px;
}

.help-modal .help-intro {
  margin: 0 0 20px 0;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  opacity: 0;
  animation: helpFadeIn 0.4s ease-out 0.05s forwards;
}

.help-modal .help-section {
  margin-bottom: 20px;
}

.help-modal .help-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.95);
}

.help-modal .help-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-modal .help-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateX(-8px);
  animation: helpItemIn 0.35s ease-out forwards;
}

.help-modal .help-list li:nth-child(1) { animation-delay: 0.15s; }
.help-modal .help-list li:nth-child(2) { animation-delay: 0.25s; }
.help-modal .help-list li:nth-child(3) { animation-delay: 0.35s; }
.help-modal .help-list li:nth-child(4) { animation-delay: 0.45s; }
.help-modal .help-list li:nth-child(5) { animation-delay: 0.55s; }

@keyframes helpItemIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes helpFadeIn {
  to {
    opacity: 1;
  }
}

.help-modal .help-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgb(83, 141, 78);
  font-weight: bold;
}

.help-modal .help-icon {
  margin-right: 6px;
}

.help-modal .help-letter.green {
  color: rgb(83, 141, 78);
  font-weight: 600;
}

.help-modal .help-letter.yellow {
  color: rgb(181, 159, 59);
  font-weight: 600;
}

.help-modal .help-tip {
  margin: 0;
  padding: 12px 14px;
  background: rgba(83, 141, 78, 0.15);
  border-radius: 10px;
  font-size: 0.95rem;
  opacity: 0;
  animation: helpFadeIn 0.4s ease-out 0.65s forwards;
  color: rgba(255, 255, 255, 0.9);
}

.help-modal .modal-back-button {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Timebox */
.timebox {
  display: none;
  justify-content: center;
  margin-top: 28px;
}

.timebox p {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}


.timebox .countdown-text {
  margin-right: 4px;
}

.timebox .js-hours,
.timebox .js-minutes,
.timebox .js-seconds {
  font-family: "Courier Prime", monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgb(98, 165, 92);
  min-width: 1.6ch;
  text-align: center;
}

.timebox .colon-text {
  font-family: "Courier Prime", monospace;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
}

/*Fade animation*/
@keyframes fadeInText {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-text {
  animation: fadeInText 0.5s ease-in forwards;
}

.credit {
  opacity: 0.7;
}

/*Adjusting for screens under 1201px wide*/
@media (max-width: 1200px) {

  h1 {
    font-size: 50px;
  }

  .element {
    width: 200px;
    height: 200px;
    padding: 10px;
  }

  .element-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .atomic-number,
  .family {
    font-size: 16px;
  }

  .symbol {
    font-size: 64px;
  }

  .container {
    padding: 10px;
  }

  .modal-card {
    max-width: 95%;
    padding: 24px 20px;
  }

  .navbar {
    font-size: 30px;
  }
}

@media (max-width: 700px){
  .navbar {
    font-size: 25px;
  }
}

/* Wikipedia and Share buttons on mobile */
@media (max-width: 599px) {
  .correct-guess-container {
    align-items: stretch;
    gap: 12px;
  }

  .js-additional-info,
  .js-share-button {
    flex: 1;
    min-width: 0;
    display: flex;
  }

  a.additional-info,
  .share-button {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .share-button {
    width: 100%;
  }
}

/*Adjusting for screens under 451px wide*/
@media (max-width: 450px) {
  .guess-form {
    max-width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .guess-input {
    font-size: 1.1rem;
    padding: 10px 28px 10px 12px;
    flex: 1;
    min-width: 0;
  }

  .guess-button {
    width: 72px;
    font-size: 0.88rem;
    padding: 10px 0;
  }

  .hint-button {
    width: 38px;
  }

  .element {
    width: 150px;
    height: 150px;
    padding: 8px;
  }

  .element-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 8px;
  }

  .atomic-number,
  .family {
    font-size: 12px;
  }

  .symbol {
    font-size: 48px;
  }

  .stats-modal .stats-grid {
    gap: 12px;
  }
  
  .stats-modal .stat-value {
    font-size: 1.5rem;
  }
  
  .modal-card {
    max-width: 95%;
    padding: 20px 16px;
  }

  .navbar {
    font-size: 24px;
  }
  
  .nav-button {
    font-size: 10px;
    margin: 0 5px;
  }
}

/* Auth / profile */
.auth-overlay {
  z-index: 1001;
}

.auth-modal-wide {
  max-width: 400px;
  text-align: left;
}

.auth-modal-brand {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.is-active {
  background: rgba(83, 141, 78, 0.25);
  color: #fff;
  font-weight: 600;
}

.auth-tab:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auth-panel.is-hidden {
  display: none;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-label:first-of-type {
  margin-top: 0;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: rgb(42, 42, 42);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: rgb(83, 141, 78);
  box-shadow: 0 0 0 3px rgba(83, 141, 78, 0.2);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset !important;
  box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset, 0 0 0 3px rgba(83, 141, 78, 0.2) !important;
  box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset, 0 0 0 3px rgba(83, 141, 78, 0.2) !important;
  border: 2px solid rgb(83, 141, 78) !important;
}

.auth-input:autofill {
  box-shadow: 0 0 0 1000px rgb(42, 42, 42) inset;
  color: #fff;
}

.auth-error {
  min-height: 1.25em;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #f87171;
}

.auth-error.auth-success {
  color: rgb(98, 165, 92);
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-forgot-link {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.auth-forgot-link:hover {
  color: #fff;
}

.auth-help-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 10px;
  line-height: 1.4;
}

.reset-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 1.05rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.auth-btn-primary {
  background: rgb(83, 141, 78);
  color: #fff;
  font-weight: 600;
}

.auth-btn-primary:hover {
  background: rgb(98, 165, 92);
}

.auth-btn-primary:active {
  transform: scale(0.96);
  transition-duration: 0.05s;
}

.auth-btn-primary:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.auth-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpinner 0.7s linear infinite;
  vertical-align: -0.15em;
  margin-right: 6px;
}

@keyframes authSpinner {
  to { transform: rotate(360deg); }
}

.auth-error-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.auth-btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.25);
  margin-top: 16px;
}

.auth-btn-outline:hover {
  border-color: #8ec987;
  color: #8ec987;
}

.auth-btn-outline.js-auth-logout:hover {
  border-color: #f87171;
  color: #f87171;
}

.auth-btn-outline:active {
  transform: scale(0.96);
  transition-duration: 0.05s;
}

.auth-close-muted {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-close-muted:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-account-card {
  text-align: center;
  padding: 8px 0 20px;
}

.auth-account-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 0;
  background: linear-gradient(145deg, rgb(83, 141, 78), rgb(50, 90, 48));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.auth-account-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-account-email {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  word-break: break-all;
}


/* Leaderboard */
.stats-modal {
  display: flex;
  flex-direction: column;
}

.stats-modal .modal-back-button {
  flex-shrink: 0;
}

/* Stats modal header w/ fire toggle */
.stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.stats-modal-header .modal-title {
  margin: 0;
}

.stats-fire-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.stats-fire-btn:hover {
  background: rgba(249, 115, 22, 0.25);
  color: rgb(251, 146, 60);
  transform: scale(1.08);
}

.stats-fire-btn:active {
  transform: scale(0.92);
  transition-duration: 0.05s;
}

.stats-fire-btn.is-active {
  background: linear-gradient(180deg, rgb(249, 115, 22), rgb(194, 65, 12));
  color: #fff;
  animation: fireBtnGlow 1.8s ease-in-out infinite alternate;
}

@keyframes fireBtnGlow {
  from { box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }
  to   { box-shadow: 0 0 18px rgba(249, 115, 22, 0.7), 0 0 32px rgba(249, 115, 22, 0.25); }
}

/* Swipe mechanism */
.stats-swipe-viewport {
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.stats-swipe-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.stats-swipe-track.is-leaderboard-view {
  transform: translateX(-50%);
}

.stats-swipe-panel {
  width: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.leaderboard-panel-view {
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.leaderboard-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.leaderboard-back-btn:hover {
  background: rgba(83, 141, 78, 0.25);
  color: #fff;
}

.leaderboard-back-btn:active {
  transform: scale(0.9);
}

.leaderboard-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.leaderboard-title i {
  color: rgb(251, 146, 60);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(8px);
  animation: leaderboardRowIn 0.35s ease-out forwards;
  animation-delay: calc(var(--row-i, 0) * 0.05s + 0.05s);
}

@keyframes leaderboardRowIn {
  to { opacity: 1; transform: translateY(0); }
}

.leaderboard-row.is-current-user {
  background: rgba(83, 141, 78, 0.16);
  border-color: rgba(98, 165, 92, 0.45);
  box-shadow: 0 0 0 1px rgba(83, 141, 78, 0.15);
}

.leaderboard-row.is-current-user .leaderboard-username {
  color: rgb(186, 230, 182);
}

.leaderboard-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.leaderboard-row.rank-1 .leaderboard-rank {
  background: linear-gradient(145deg, #ffd76a, #d69b1f);
  color: #1a1a1a;
}
.leaderboard-row.rank-2 .leaderboard-rank {
  background: linear-gradient(145deg, #e2e2e2, #a3a3a3);
  color: #1a1a1a;
}
.leaderboard-row.rank-3 .leaderboard-rank {
  background: linear-gradient(145deg, #d38a54, #9c5a2c);
  color: #1a1a1a;
}

.leaderboard-username {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-streak {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 1rem;
  color: rgb(251, 146, 60);
  flex-shrink: 0;
}

.leaderboard-streak i {
  font-size: 0.9rem;
}

.leaderboard-loading,
.leaderboard-empty,
.leaderboard-error {
  text-align: center;
  padding: 24px 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.2s steps(4, end) infinite;
}

/* Fire icon flicker + ember sparks */
.stats-fire-btn {
  position: relative;
  overflow: visible; /* let sparks escape the button bounds */
}

.stats-fire-btn i {
  position: relative;
  z-index: 2;
  animation: fireIconFlicker 2.4s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes fireIconFlicker {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
  }
  20% {
    transform: scale(1.05) rotate(-2deg);
    filter: brightness(1.15);
  }
  45% {
    transform: scale(0.96) rotate(1deg);
    filter: brightness(0.95);
  }
  70% {
    transform: scale(1.04) rotate(-1deg);
    filter: brightness(1.1);
  }
}

/* Ember sparks: small glowing dots drifting upward off the icon */
.stats-fire-btn::before,
.stats-fire-btn::after {
  content: '';
  position: absolute;
  bottom: 55%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgb(251, 146, 60);
  box-shadow: 0 0 4px 1px rgba(251, 146, 60, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.stats-fire-btn::before {
  animation: emberRise1 1.8s ease-out infinite;
  animation-delay: 0.2s;
}

.stats-fire-btn::after {
  animation: emberRise2 2.2s ease-out infinite;
  animation-delay: 1s;
}

@keyframes emberRise1 {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translate(-140%, -34px) scale(0.3);
  }
}

@keyframes emberRise2 {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5);
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translate(60%, -30px) scale(0.25);
  }
}

/* Extra spark using a span we can inject, OR simulate with a radial glow pulse instead */
.stats-fire-btn.is-active {
  animation: fireBtnGlow 1.8s ease-in-out infinite alternate;
}

.stats-fire-btn.is-active i {
  animation: fireIconFlicker 1.4s ease-in-out infinite;
}

@keyframes loadingDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* Navigation now uses ordinary page links. */
.nav-icon-btn, .nav-dropdown-item { color: inherit; text-decoration: none; }

@keyframes mobileProfileArrive {
  from { opacity:0; transform:translateY(6px) scale(.8) rotate(-12deg); }
  to { opacity:1; transform:translateY(0) scale(1) rotate(0); }
}
@media (prefers-reduced-motion:reduce) {
  .nav-dropdown:not([hidden]):not(.nav-dropdown-closing) .js-mobile-profile-avatar > * { animation:none; }
  .nav-dropdown-profile-avatar { transition:none; }
}

@media (prefers-reduced-motion:reduce) {
  .element { transition:none; }
  .element:not(.guessed-element).next-slot { animation:none; border-color:#538d4e; }
}

/* Hint confirmation stays beside the game instead of opening a browser dialog. */
.hint-confirmation strong { display:block; font-size:1.1rem; }
.hint-confirmation p { margin:6px 0 14px; font-size:.9rem; color:#c9d6c7; }
.hint-confirmation-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.hint-confirmation-actions button { min-height:42px; padding:9px 15px; border:1px solid #71916d; border-radius:8px; background:#263126; color:#e9f1e7; font:inherit; font-size:.9rem; cursor:pointer; }
.hint-confirmation-actions .hint-reveal { background:#538d4e; border-color:#8ec987; color:white; }
.hint-confirmation-actions button:hover { filter:brightness(1.15); }
.hint-confirmation-actions button:focus-visible { outline:2px solid #b0dfa7; outline-offset:3px; }

/* The daily post-game coach entry. */
.elbot-brand { color: rgb(83, 141, 78); }
.correct-guess-container.has-game-analysis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:fit-content; max-width:100%; margin-left:auto; margin-right:auto; }
.has-game-analysis .js-analysis-button { grid-column:1 / -1; grid-row:1; width:100%; margin:0; gap:8px; box-sizing:border-box; }
.has-game-analysis .js-additional-info,.has-game-analysis .js-share-button { min-width:0; }
.has-game-analysis .additional-info,.has-game-analysis .js-share-button .share-button { width:100%; box-sizing:border-box; }
/* Match the two guess cards, including the space between them. */
@media(max-width:599px) {
  .correct-guess-container,
  .correct-guess-container.has-game-analysis {
    width:min(100%,420px);
    column-gap:20px;
    margin-left:auto;
    margin-right:auto;
  }
}
@media(max-width:450px) {
  .correct-guess-container,
  .correct-guess-container.has-game-analysis {
    width:min(100%,308px);
    column-gap:8px;
  }
}

.has-game-analysis .share-button,.has-game-analysis .additional-info { height:44px; min-height:44px; box-sizing:border-box; }
.analysis-button-icon { width:24px; height:24px; flex:0 0 24px; object-fit:contain; image-rendering:pixelated; }
@media(max-width:599px) { .has-game-analysis .share-button,.has-game-analysis .additional-info { height:48px; min-height:48px; } }

/* Reveal the finished-game controls once; syncing never restarts their entrance. */
.correct-guess-container.post-game-ready { animation:postGameEnter .38s ease-out both; }
.timebox.post-game-ready { animation:postGameEnter .38s ease-out .08s both; }
.timebox .js-hours,.timebox .js-minutes,.timebox .js-seconds { width:2ch; min-width:2ch; font-variant-numeric:tabular-nums; }
@keyframes postGameEnter { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .correct-guess-container.post-game-ready,.timebox.post-game-ready { animation:none; } }

.leaderboard-username { display:flex; align-items:center; gap:7px; }
.leaderboard-name-text { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.leaderboard-lab-icon { width:18px; height:18px; flex-shrink:0; object-fit:contain; border-radius:4px; }

.game-loading .element:not(.guessed-element)::after { display:block; }
@media (prefers-reduced-motion:reduce) { .element.shimmer::after,.game-loading .element:not(.guessed-element)::after { animation:none; } }
.hint-button.hint-loading { cursor:wait; position:relative; }
.hint-button.hint-loading svg, .hint-button.hint-loading img { opacity:.25; }
.hint-button.hint-loading::after { content:""; position:absolute; width:16px; height:16px; left:calc(50% - 10px); top:calc(50% - 10px); border:2px solid #8ec98755; border-top-color:#8ec987; border-radius:50%; animation:hintLoadingSpin .75s linear infinite; }
@keyframes hintLoadingSpin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .hint-button.hint-loading::after { animation:none; } }
/* Keep the answer reveal in the same compact, neutral style as game controls. */
.reveal-answer-container:has(.reveal-answer) { margin:24px 0; }
.reveal-answer-container:has(.reveal-answer) + .grid-container { margin-top:0; }
.reveal-answer { display:flex; width:max-content; min-width:min(320px,100%); max-width:100%; box-sizing:border-box; margin:0 auto; padding:10px 16px; gap:16px; text-align:left; background:#2a2a2a; border:1px solid #ffffff1a; box-shadow:none; border-radius:10px; animation:answerRevealEnter .3s ease-out both; }
.reveal-answer .reveal-answer-badge { width:52px; height:56px; box-sizing:border-box; border-radius:7px; background:#538d4e; }
.reveal-answer .reveal-answer-badge-num { margin:0 0 5px; font-size:.65rem; font-variant-numeric:tabular-nums; }
.reveal-answer .reveal-answer-badge-symbol { font-size:1.4rem; }
.reveal-answer-copy { min-width:0; }
.reveal-answer-eyebrow { color:#a7a7a7; font-size:.7rem; font-weight:400; margin-bottom:3px; }
.reveal-answer .reveal-answer-name { font-size:1.1rem; line-height:1.2; white-space:nowrap; font-weight:600; }
.reveal-answer .reveal-answer-label { margin-top:3px; color:#999; font-size:.75rem; line-height:1.4; white-space:nowrap; }
@keyframes answerRevealEnter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .reveal-answer { animation:none; } }

@media(max-width:600px) { .popup { top:max(16px,env(safe-area-inset-top)); padding:12px 16px; font-size:1rem; line-height:1.4; } }

/* Arabic text flows right to left; chemical symbols and scientific grids do not. */
html[dir="rtl"] .home-logo,
html[dir="rtl"] .grid-container,
html[dir="rtl"] .periodic-table,
html[dir="rtl"] .cell-symbol,
html[dir="rtl"] .symbol,
html[dir="rtl"] .reveal-answer-symbol,
html[dir="rtl"] .atomic-number,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] .auth-account-email { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .cell-name { direction: rtl; }
html[dir="rtl"] .auth-label { letter-spacing: normal; }
html[dir="rtl"] .help-article,
html[dir="rtl"] .account-billing,
html[dir="rtl"] .elo-help-tooltip,
html[dir="rtl"] .elelo-tiers li,
html[dir="rtl"] .elelo-tiers li span,
html[dir="rtl"] .elelo-tiers small,
html[dir="rtl"] .element-properties caption,
html[dir="rtl"] .element-properties th,
html[dir="rtl"] .element-properties td,
html[dir="rtl"] .guess-turn { text-align: start; }

.game-result-dialog {box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #505050;border-radius:20px;background:#202020;color:#f5f5f5;box-shadow:0 24px 80px #0009;text-align:center;animation:game-result-in .3s ease-out;font-family:inherit;overflow:auto;}
.game-result-dialog::backdrop {background:#0007;backdrop-filter:blur(5px);animation:game-result-backdrop .3s ease-out;}
.game-result-content {padding:28px;display:flex;flex-direction:column;align-items:stretch;gap:16px;}
.game-result-eyebrow {color:#aaa;font-size:12px;letter-spacing:1.4px;text-transform:uppercase;margin:0;}
.game-result-content h2 {margin:0;font-size:28px;}
.game-result-detail {color:#bbb;font-size:14px;margin:0;line-height:1.5;}
.game-result-elo {padding:20px 12px;border-radius:14px;background:#ffffff07;}
.game-result-elo-label {display:block;color:#bbb;font-size:14px;}
.game-result-rating {display:block;margin:6px 0;font-size:42px;line-height:1.2;font-variant-numeric:tabular-nums;}
.game-result-change {display:inline-flex;gap:6px;align-items:center;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;}
.game-result-change[hidden] {display:none;}
.game-result-change.gain {color:#77bd70;}
.game-result-change.loss {color:#f08080;}
.game-result-change.unchanged {color:#aaa;}
.game-result-rating-note {margin:12px 0 0;color:#aaa;font-size:13px;line-height:1.5;}
.game-result-rating-note a {color:#77bd70;}
.game-result-analysis,.game-result-close {box-sizing:border-box;display:flex;justify-content:center;align-items:center;gap:9px;padding:12px;border-radius:10px;font:inherit;font-weight:600;text-decoration:none;cursor:pointer;}
.game-result-analysis {color:#fff;background:#538d4e;border:1px solid #538d4e;}
.game-result-analysis img {object-fit:contain;}
.game-result-close {background:#ffffff08;color:#ddd;border:1px solid #555;}
.game-result-analysis:hover {background:#64a05e;}
.game-result-close:hover {background:#ffffff15;}
.game-result-dialog :focus-visible {outline:2px solid #a4d19e;outline-offset:3px;}
.game-result-dialog.closing {animation:game-result-out .18s ease-in forwards;}
.game-result-dialog.closing::backdrop {animation:game-result-backdrop .18s ease-in reverse forwards;}
@keyframes game-result-in {from {opacity:0;transform:translateY(18px) scale(.96);}to {opacity:1;transform:translateY(0) scale(1);}}
@keyframes game-result-out {to {opacity:0;transform:translateY(12px) scale(.97);}}
@keyframes game-result-backdrop {from {opacity:0;}to {opacity:1;}}
@media(prefers-reduced-motion:reduce) {.game-result-dialog,.game-result-dialog::backdrop {animation:none!important;}}

body:has(.game-result-dialog[open]) {overflow:hidden;}
.game-result-analysis[hidden],.game-result-view[hidden] {display:none;}
.game-result-view {display:block;padding:13px;border-radius:10px;background:#538d4e;color:white;text-decoration:none;font-weight:600;}
.game-result-view:hover {background:#64a05e;}

.signup-nudge {
  position: fixed;
  inset: 0;
  width: min(400px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 38px 28px 26px;
  border: 1px solid #41483f;
  border-radius: 20px;
  background: #20231f;
  color: #f5f7f3;
  box-shadow: 0 24px 80px #0008;
  text-align: center;
}

.signup-nudge::backdrop { background: rgb(0 0 0 / 45%); backdrop-filter: blur(3px); }
.signup-nudge[open] { animation: signup-popup-in 180ms ease-out; }
@keyframes signup-popup-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .signup-nudge[open] { animation: none; } }
.signup-nudge h2 { margin: 0 0 12px; font-size: 30px; font-weight: 400; }
.signup-nudge p { color: #d1d7cf; font-size: 19px; line-height: 1.4; }
.signup-nudge small { display: block; color: #b4bdb1; font-size: 16px; line-height: 1.4; }
.signup-nudge-actions { display: flex; flex-direction: column; gap: 4px; margin: 24px 0 10px; }
.signup-nudge-link { padding: 11px 16px; border-radius: 8px; background: #a9cf9e; color: #172015; text-decoration: none; font-size: 19px; }
.signup-nudge-link:hover { background: #bddfaf; }
.signup-nudge-link { display: block; width: 100%; }
.signup-nudge-later, .signup-nudge-dismiss { background: transparent; border: 0; color: #d1d7cf; }
.signup-nudge-later { min-height: 44px; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; }
.signup-nudge-dismiss { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; font-size: 26px; }
.signup-nudge :focus-visible { outline: 2px solid #c5e8b8; outline-offset: 3px; }

.freeplay-nav { font-size: 29px; }
.lab-nav { text-decoration: none; }
.nav-dropdown-divider { height: 1px; margin: 7px 16px; background: rgba(255, 255, 255, .15); }
.lab-nav-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.lab-nav:hover .nav-icon-circle, .lab-nav:focus-visible .nav-icon-circle { background: #b88a2a; color: #ffe4a0; }
.nav-dropdown-item.lab-nav:hover, .nav-dropdown-item.lab-nav:focus-visible { background: #b88a2a; color: #fff4d1; }
.lab-archives { position: relative; overflow: hidden; max-width: 600px; margin: 50px auto 32px; padding: 28px; border: 1px solid #538d4e; border-radius: 20px; background: linear-gradient(135deg,#242424ee,#191919f5); color:#c9d6c7; box-shadow: 0 0 45px #62a55c12; }
.lab-archives::before { content:''; position:absolute; inset:0; pointer-events:none; background: repeating-linear-gradient(0deg,transparent 0 39px,#62a55c08 40px); }
.lab-orbit { position:absolute; right:-20px; top:0; width:180px; height:180px; color:#62a55c12; animation:lab-spin 28s linear infinite; pointer-events:none; }
.lab-heading,.lab-controls { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.lab-heading small,.lab-status { font: 10px monospace; letter-spacing:2px; color:#62a55c; }
.lab-heading h2 { margin:8px 0; font-size:28px; }
.lab-status { animation:lab-pulse 3s ease-in-out infinite; }
.lab-archives p { font-size:14px; line-height:1.6; }
.lab-controls { margin:24px 0 16px; }
.lab-controls h3 { margin:0; font-size:18px; }
.lab-controls button,.lab-days button { color:#c9d6c7; background:#252f24; border:1px solid #538d4e; border-radius:8px; cursor:pointer; min-height:42px; }
.lab-controls button { width:42px; }
.lab-week,.lab-days { position:relative; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; text-align:center; }
.lab-week { margin-bottom:12px; color:#8ec987; font:12px monospace; }
.lab-days button { transition:background .2s,box-shadow .2s,transform .2s; }
.lab-days button:hover:not(:disabled) { background:#354b32; box-shadow:0 0 15px #62a55c55; transform:translateY(-2px); }
.lab-days button.complete { border-color:#62a55c; }
.lab-days button:disabled,.lab-controls button:disabled { opacity:.3; cursor:default; }
.lab-archives > small { font-size:12px; color:#bdbdbd; }
@keyframes lab-spin { to { transform:rotate(360deg); } }
@keyframes lab-pulse { 50% { opacity:.4; } }
@media(min-width:1000px) { .lab-archives { max-width:640px; padding:32px; } }
@media(max-width:600px) { .lab-archives { margin:28px 12px; padding:18px; } .lab-heading { flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { .lab-orbit,.lab-status { animation:none; } .lab-days button { transition:none; } }
/* Modes use the same dark surfaces and periodic green as the daily lab. */
.home-logo { color:inherit; text-decoration:none; }
.mode-badge { display:block; font:10px "Courier Prime",monospace; letter-spacing:2px; color:#62a55c; margin-top:2px; }
.mode-badge[hidden],.mode-tools[hidden],.practice-sync[hidden] { display:none; }
.freeplay-nav[aria-current="page"] .nav-icon-circle { color:#62a55c; background:#538d4e; }
.mode-tools { max-width:860px; margin:18px auto -32px; padding:0 20px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px 24px; color:#8c968a; font-size:13px; }
.mode-file { font:11px "Courier Prime",monospace; letter-spacing:1px; }
.mode-tools a { color:#8ec987; text-decoration:none; border-bottom:1px solid #538d4e55; }
.mode-tools a:hover { border-color:#62a55c; }
body[data-mode="freeplay"] .mode-tools a { display:none; }
.practice-sync { background:#252f24; color:#c9d6c7; border:1px solid #538d4e; padding:5px 10px; border-radius:6px; }
.lab-days button.today { border-color:#8ec987; box-shadow:inset 0 0 0 1px #62a55c; background:#354b32; }
.practice-scenery { position:fixed; inset:90px 0 0; overflow:hidden; pointer-events:none; color:#62a55c; z-index:-1; }
.practice-scenery svg { display:none; position:absolute; width:clamp(220px,28vw,440px); opacity:.15; }
body[data-mode="archive"] .archive-scenery { display:block; bottom:5vh; left:0; }
body[data-mode="freeplay"] .freeplay-scenery { display:block; right:0; top:10vh; }
.archive-light { stroke:#8ec987; animation:lab-pulse 5s ease-in-out infinite; }
.archive-files { animation:file-hover 7s ease-in-out infinite; transform-origin:280px 355px; }
.lab-bubble { transform-box:fill-box; transform-origin:center; animation:bubble-rise 4s linear infinite; }
.bubble-two { animation-delay:-2s; }
.infinity-current { stroke:#8ec987; stroke-width:4; stroke-dasharray:30 70; animation:infinite-flow 14s linear infinite; }
.cycle-molecule { transform-origin:250px 170px; animation:lab-spin 100s linear infinite; opacity:.4; }
.share-button:disabled { opacity:.6; cursor:wait; }
.home-logo:focus-visible,.mode-tools a:focus-visible { outline:2px solid #8ec987; outline-offset:4px; }
@keyframes infinite-flow { to { stroke-dashoffset:-1000; } }
@keyframes bubble-rise { 0% { transform:translateY(5px); opacity:0; } 25% { opacity:1; } 100% { transform:translateY(-45px); opacity:0; } }
@keyframes file-hover { 50% { transform:translateY(-3px) rotate(-1deg); } }
@media(max-width:1100px) { .practice-scenery svg { opacity:.07; width:260px; } body[data-mode="freeplay"] .freeplay-scenery { right:-65px; top:25vh; } body[data-mode="archive"] .archive-scenery { left:-65px; } }
@media(max-width:600px) { .mode-tools { margin:14px 0 -34px; gap:10px; font-size:12px; } .mode-file { font-size:10px; } .mode-badge { font-size:9px; letter-spacing:1px; } .practice-scenery svg { width:220px; opacity:.06; } }
@media(prefers-reduced-motion:reduce) { .practice-scenery * { animation:none !important; } }
body[data-mode="freeplay"] .element.card-flip,body[data-mode="archive"] .element.card-flip { animation:cardFlip .18s ease-out forwards; }
body[data-mode="freeplay"] .element.correct-card.card-flip,body[data-mode="archive"] .element.correct-card.card-flip { animation:cardFlip .18s ease-out forwards,winGlow 2s ease-in-out .18s infinite alternate; }
body[data-mode="freeplay"] .fade-in-text,body[data-mode="archive"] .fade-in-text { animation-duration:.12s; }
@media(prefers-reduced-motion:reduce) { body[data-mode="freeplay"] .element.card-flip,body[data-mode="archive"] .element.card-flip { animation:none; opacity:1; transform:none; } }

/* Pair each lab with a second scene, keeping all artwork behind the game. */
.practice-scenery svg { width:clamp(210px,24vw,380px); opacity:.18; }
body[data-mode="archive"] .archive-companion { left:auto; right:0; bottom:auto; top:8vh; }
body[data-mode="freeplay"] .freeplay-companion { right:auto; left:0; top:16vh; }
.cycle-rings { transform-origin:220px 188px; animation:lab-spin 48s linear infinite; }
.reaction-stream { stroke-dasharray:8 6; animation:infinite-flow 24s linear infinite; }
.archive-scan { animation:archive-scan 6s ease-in-out infinite; stroke:#8ec987; }
.mode-tools { min-height:24px; }
.mode-file,.mode-tools a { display:inline-flex; align-items:center; min-height:24px; font:11px/24px "Courier Prime",monospace; }
.mode-tools a { border-bottom:0; box-shadow:0 1px 0 #538d4e55; }
@keyframes archive-scan { 50% { transform:translateY(20px); opacity:.3; } }
@media(max-width:1100px) {
  .practice-scenery svg { width:240px; opacity:.10; }
  body[data-mode="archive"] .archive-companion { right:-70px; top:15vh; }
  body[data-mode="freeplay"] .freeplay-companion { left:-70px; top:30vh; }
}
@media(max-width:600px) {
  .practice-scenery svg { width:180px; opacity:.065; }
  .mode-file,.mode-tools a { font-size:10px; line-height:24px; }
  body[data-mode="archive"] .archive-companion { right:-75px; top:22vh; }
  body[data-mode="freeplay"] .freeplay-companion { left:-75px; top:32vh; }
}

.archives-back { display:flex; justify-content:center; margin:0 12px 32px; }

.archive-terminal-lines path { stroke-dasharray:110; stroke-dashoffset:110; animation:archive-terminal-type 6s steps(12,end) infinite; }
.archive-terminal-lines path:nth-child(2) { animation-delay:.3s; }
.archive-terminal-lines path:nth-child(3) { animation-delay:.6s; }
.archive-terminal-lines path:nth-child(4) { animation-delay:.9s; }
.archive-terminal-lines path:nth-child(5) { animation-delay:1.2s; }
.archive-terminal-cursor { animation:archive-cursor-blink 1s steps(2,end) infinite; }
.archive-computer-scan { opacity:.35; animation:archive-screen-scan 7s linear infinite; }
.archive-computer-led { animation:lab-pulse 3s ease-in-out infinite; }
.archive-screen-molecule { transform-origin:257px 301px; animation:lab-spin 32s linear infinite; }
.archive-screen-signal { stroke-dasharray:90; animation:archive-signal 3s linear infinite; }
@keyframes archive-terminal-type { 0%,10% { stroke-dashoffset:110; } 50%,90% { stroke-dashoffset:0; } 100% { stroke-dashoffset:110; } }
@keyframes archive-cursor-blink { 50% { opacity:0; } }
@keyframes archive-screen-scan { to { transform:translateY(135px); } }
@keyframes archive-signal { to { stroke-dashoffset:-180; } }

.lab-orbit svg { display:block; width:100%; height:100%; }

/* Font Awesome Free 6.6.0 icons, CC BY 4.0; see images/icons/LICENSE.txt. */
.fa-solid,.fa-brands { display:inline-block; width:1em; height:1em; vertical-align:-.125em; background-color:currentColor; -webkit-mask:var(--site-icon) center/contain no-repeat; mask:var(--site-icon) center/contain no-repeat; }
.fa-github { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20496%20512%22%3E%3Cpath%20d%3D%22M165.9%20397.4c0%202-2.3%203.6-5.2%203.6-3.3.3-5.6-1.3-5.6-3.6%200-2%202.3-3.6%205.2-3.6%203-.3%205.6%201.3%205.6%203.6zm-31.1-4.5c-.7%202%201.3%204.3%204.3%204.9%202.6%201%205.6%200%206.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2%202.3zm44.2-1.7c-2.9.7-4.9%202.6-4.6%204.9.3%202%202.9%203.3%205.9%202.6%202.9-.7%204.9-2.6%204.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8%208C106.1%208%200%20113.3%200%20252c0%20110.9%2069.8%20205.8%20169.5%20239.2%2012.8%202.3%2017.3-5.6%2017.3-12.1%200-6.2-.3-40.4-.3-61.4%200%200-70%2015-84.7-29.8%200%200-11.4-29.1-27.8-36.6%200%200-22.9-15.7%201.6-15.4%200%200%2024.9%202%2038.6%2025.8%2021.9%2038.6%2058.6%2027.5%2072.9%2020.9%202.3-16%208.8-27.1%2016-33.7-55.9-6.2-112.3-14.3-112.3-110.5%200-27.5%207.6-41.3%2023.6-58.9-2.6-6.5-11.1-33.3%202.6-67.9%2020.9-6.5%2069%2027%2069%2027%2020-5.6%2041.5-8.5%2062.8-8.5s42.8%202.9%2062.8%208.5c0%200%2048.1-33.6%2069-27%2013.7%2034.7%205.2%2061.4%202.6%2067.9%2016%2017.7%2025.8%2031.5%2025.8%2058.9%200%2096.5-58.9%20104.2-114.8%20110.5%209.2%207.9%2017%2022.9%2017%2046.4%200%2033.7-.3%2075.4-.3%2083.6%200%206.5%204.6%2014.4%2017.3%2012.1C428.2%20457.8%20496%20362.9%20496%20252%20496%20113.3%20383.5%208%20244.8%208zM97.2%20352.9c-1.3%201-1%203.3.7%205.2%201.6%201.6%203.9%202.3%205.2%201%201.3-1%201-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7%201.3.3%202.9%202.3%203.9%201.6%201%203.6.7%204.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4%2035.6c-1.6%201.3-1%204.3%201.3%206.2%202.3%202.3%205.2%202.6%206.5%201%201.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6%201-1.6%203.6%200%205.9%201.6%202.3%204.3%203.3%205.6%202.3%201.6-1.3%201.6-3.9%200-6.2-1.4-2.3-4-3.3-5.6-2z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-x-twitter { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M389.2%2048h70.6L305.6%20224.2%20487%20464H345L233.7%20318.6%20106.5%20464H35.8L200.7%20275.5%2026.8%2048H172.4L272.9%20180.9%20389.2%2048zM364.4%20421.8h39.1L151.1%2088h-42L364.4%20421.8z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-reddit { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M0%20256C0%20114.6%20114.6%200%20256%200S512%20114.6%20512%20256s-114.6%20256-256%20256L37.1%20512c-13.7%200-20.5-16.5-10.9-26.2L75%20437C28.7%20390.7%200%20326.7%200%20256zM349.6%20153.6c23.6%200%2042.7-19.1%2042.7-42.7s-19.1-42.7-42.7-42.7c-20.6%200-37.8%2014.6-41.8%2034c-34.5%203.7-61.4%2033-61.4%2068.4l0%20.2c-37.5%201.6-71.8%2012.3-99%2029.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33%200-59.8%2026.8-59.8%2059.8c0%2024%2014.1%2044.6%2034.4%2054.1c2%2069.4%2077.6%20125.2%20170.6%20125.2s168.7-55.9%20170.6-125.3c20.2-9.6%2034.1-30.2%2034.1-54c0-33-26.8-59.8-59.8-59.8c-13.7%200-26.3%204.6-36.4%2012.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4%2018.9-46.5%2043.4-49.9l0%200c4.4%2018.8%2021.3%2032.8%2041.5%2032.8zM177.1%20246.9c16.7%200%2029.5%2017.6%2028.5%2039.3s-13.5%2029.6-30.3%2029.6s-31.4-8.8-30.4-30.5s15.4-38.3%2032.1-38.3zm190.1%2038.3c1%2021.7-13.7%2030.5-30.4%2030.5s-29.3-7.9-30.3-29.6c-1-21.7%2011.8-39.3%2028.5-39.3s31.2%2016.6%2032.1%2038.3zm-48.1%2056.7c-10.3%2024.6-34.6%2041.9-63%2041.9s-52.7-17.3-63-41.9c-1.2-2.9%20.8-6.2%203.9-6.5c18.4-1.9%2038.3-2.9%2059.1-2.9s40.7%201%2059.1%202.9c3.1%20.3%205.1%203.6%203.9%206.5z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-discord { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20640%20512%22%3E%3Cpath%20d%3D%22M524.531%2C69.836a1.5%2C1.5%2C0%2C0%2C0-.764-.7A485.065%2C485.065%2C0%2C0%2C0%2C404.081%2C32.03a1.816%2C1.816%2C0%2C0%2C0-1.923.91%2C337.461%2C337.461%2C0%2C0%2C0-14.9%2C30.6%2C447.848%2C447.848%2C0%2C0%2C0-134.426%2C0%2C309.541%2C309.541%2C0%2C0%2C0-15.135-30.6%2C1.89%2C1.89%2C0%2C0%2C0-1.924-.91A483.689%2C483.689%2C0%2C0%2C0%2C116.085%2C69.137a1.712%2C1.712%2C0%2C0%2C0-.788.676C39.068%2C183.651%2C18.186%2C294.69%2C28.43%2C404.354a2.016%2C2.016%2C0%2C0%2C0%2C.765%2C1.375A487.666%2C487.666%2C0%2C0%2C0%2C176.02%2C479.918a1.9%2C1.9%2C0%2C0%2C0%2C2.063-.676A348.2%2C348.2%2C0%2C0%2C0%2C208.12%2C430.4a1.86%2C1.86%2C0%2C0%2C0-1.019-2.588%2C321.173%2C321.173%2C0%2C0%2C1-45.868-21.853%2C1.885%2C1.885%2C0%2C0%2C1-.185-3.126c3.082-2.309%2C6.166-4.711%2C9.109-7.137a1.819%2C1.819%2C0%2C0%2C1%2C1.9-.256c96.229%2C43.917%2C200.41%2C43.917%2C295.5%2C0a1.812%2C1.812%2C0%2C0%2C1%2C1.924.233c2.944%2C2.426%2C6.027%2C4.851%2C9.132%2C7.16a1.884%2C1.884%2C0%2C0%2C1-.162%2C3.126%2C301.407%2C301.407%2C0%2C0%2C1-45.89%2C21.83%2C1.875%2C1.875%2C0%2C0%2C0-1%2C2.611%2C391.055%2C391.055%2C0%2C0%2C0%2C30.014%2C48.815%2C1.864%2C1.864%2C0%2C0%2C0%2C2.063.7A486.048%2C486.048%2C0%2C0%2C0%2C610.7%2C405.729a1.882%2C1.882%2C0%2C0%2C0%2C.765-1.352C623.729%2C277.594%2C590.933%2C167.465%2C524.531%2C69.836ZM222.491%2C337.58c-28.972%2C0-52.844-26.587-52.844-59.239S193.056%2C219.1%2C222.491%2C219.1c29.665%2C0%2C53.306%2C26.82%2C52.843%2C59.239C275.334%2C310.993%2C251.924%2C337.58%2C222.491%2C337.58Zm195.38%2C0c-28.971%2C0-52.843-26.587-52.843-59.239S388.437%2C219.1%2C417.871%2C219.1c29.667%2C0%2C53.307%2C26.82%2C52.844%2C59.239C470.715%2C310.993%2C447.538%2C337.58%2C417.871%2C337.58Z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-bars { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cpath%20d%3D%22M0%2096C0%2078.3%2014.3%2064%2032%2064l384%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032L32%20128C14.3%20128%200%20113.7%200%2096zM0%20256c0-17.7%2014.3-32%2032-32l384%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032L32%20288c-17.7%200-32-14.3-32-32zM448%20416c0%2017.7-14.3%2032-32%2032L32%20448c-17.7%200-32-14.3-32-32s14.3-32%2032-32l384%200c17.7%200%2032%2014.3%2032%2032z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-fire { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cpath%20d%3D%22M159.3%205.4c7.8-7.3%2019.9-7.2%2027.7%20.1c27.6%2025.9%2053.5%2053.8%2077.7%2084c11-14.4%2023.5-30.1%2037-42.9c7.9-7.4%2020.1-7.4%2028%20.1c34.6%2033%2063.9%2076.6%2084.5%20118c20.3%2040.8%2033.8%2082.5%2033.8%20111.9C448%20404.2%20348.2%20512%20224%20512C98.4%20512%200%20404.1%200%20276.5c0-38.4%2017.8-85.3%2045.4-131.7C73.3%2097.7%20112.7%2048.6%20159.3%205.4zM225.7%20416c25.3%200%2047.7-7%2068.8-21c42.1-29.4%2053.4-88.2%2028.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2%2029.3c-6.6%207.6-18.5%207.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8%2042.5-50.8%2069.3-50.8%2099.4C112%20375.4%20162.6%20416%20225.7%20416z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-arrow-left { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cpath%20d%3D%22M9.4%20233.4c-12.5%2012.5-12.5%2032.8%200%2045.3l160%20160c12.5%2012.5%2032.8%2012.5%2045.3%200s12.5-32.8%200-45.3L109.2%20288%20416%20288c17.7%200%2032-14.3%2032-32s-14.3-32-32-32l-306.7%200L214.6%20118.6c12.5-12.5%2012.5-32.8%200-45.3s-32.8-12.5-45.3%200l-160%20160z%22%2F%3E%3C%2Fsvg%3E"); }
.fa-trophy { --site-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20576%20512%22%3E%3Cpath%20d%3D%22M400%200L176%200c-26.5%200-48.1%2021.8-47.1%2048.2c.2%205.3%20.4%2010.6%20.7%2015.8L24%2064C10.7%2064%200%2074.7%200%2088c0%2092.6%2033.5%20157%2078.5%20200.7c44.3%2043.1%2098.3%2064.8%20138.1%2075.8c23.4%206.5%2039.4%2026%2039.4%2045.6c0%2020.9-17%2037.9-37.9%2037.9L192%20448c-17.7%200-32%2014.3-32%2032s14.3%2032%2032%2032l192%200c17.7%200%2032-14.3%2032-32s-14.3-32-32-32l-26.1%200C337%20448%20320%20431%20320%20410.1c0-19.6%2015.9-39.2%2039.4-45.6c39.9-11%2093.9-32.7%20138.2-75.8C542.5%20245%20576%20180.6%20576%2088c0-13.3-10.7-24-24-24L446.4%2064c.3-5.2%20.5-10.4%20.7-15.8C448.1%2021.8%20426.5%200%20400%200zM48.9%20112l84.4%200c9.1%2090.1%2029.2%20150.3%2051.9%20190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1%20254.3c-22.4%2021.8-48.3%2037.3-73.2%2048.3c22.7-40.3%2042.8-100.5%2051.9-190.6l84.4%200c-5.1%2066.3-31.1%20111.2-63%20142.3z%22%2F%3E%3C%2Fsvg%3E"); }
footer {
  margin-top: 100px;
  background-color: #111;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgb(83, 141, 78), rgb(98, 165, 92), rgb(83, 141, 78), transparent) 1;
  font-family: "Iceland", sans-serif;
}

.footer-container {
  width: 100%;
  padding: 20px 16px 16px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.social-icons a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease;
}

.social-icons a::before {
  position: absolute;
  inset: 2px;
  background: #111;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  content: '';
}

.social-icons a i {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  transition: color 0.25s ease;
}

.social-icons a:hover {
  background: rgb(83, 141, 78);
  transform: scale(1.1);
}

.social-icons a:hover i {
  color: #fff;
}

.footer-nav { display: grid; gap: 4px; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav ul li { margin: 0; }
.footer-nav ul li a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: white;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  opacity: .75;
  text-decoration: none;
  transition: opacity .3s ease, color .3s ease;
}

.footer-nav ul li a::after {
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgb(98, 165, 92);
  border-radius: 1px;
  content: '';
  transition: width 0.3s ease;
}

.footer-nav ul li a:hover,
.footer-nav ul li a:focus-visible {
  color: rgb(98, 165, 92);
  opacity: 1;
}

.footer-nav ul li a:hover::after,
.footer-nav ul li a:focus-visible::after {
  width: 100%;
}

.footer-bottom {
  padding: 12px 16px;
  background-color: #000;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: white;
}

footer a:focus-visible { outline: 2px solid #8ec987; outline-offset: 4px; }
@media (max-width: 480px) {
  .footer-nav ul { column-gap: 16px; }
}

.result-notice { position:fixed; z-index:10000; top:22px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:14px; width:max-content; max-width:calc(100vw - 32px); box-sizing:border-box; padding:16px 18px; border:1px solid #538d4e; border-radius:16px; background:linear-gradient(120deg,#263625f5,#1b211ff5); color:#f2f6f1; box-shadow:0 12px 38px #0006; backdrop-filter:blur(12px); animation:notice-arrive .25s ease-out; }
.result-notice-icon { font-size:28px; color:#95cd8c; }
.result-notice > div { min-width:0; flex:1; overflow-wrap:anywhere; }
.result-notice-icon,.result-notice button { flex-shrink:0; }
@media(max-width:600px) { .result-notice { top:max(16px,env(safe-area-inset-top)); padding:12px 14px; gap:10px; } .result-notice strong { font-size:16px; } }
.result-notice strong,.result-notice span:not(.result-notice-icon) { display:block; }
.result-notice strong { font-size:18px; margin-bottom:4px; }
.result-notice div span { font-size:13px; line-height:1.5; color:#c9d6c7; }
.result-notice button { color:#b7c4ba; font-size:24px; background:none; border:0; cursor:pointer; padding:4px; }
.notice-freeze { border-color:#b3cfde; background:linear-gradient(120deg,#293a46f5,#202930f5); }
.notice-freeze .result-notice-icon { color:#c4dce9; }
.notice-loss { border-color:#bd8383; }
.notice-loss .result-notice-icon { color:#e4a6a6; }
.streak-calendar { border-color:#7594a4; color:#dde6ec; }
.freeze-summary { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:0 0 12px; }
.freeze-count { font-size:25px; color:#c4dce9; white-space:nowrap; }
.freeze-count small { font-size:13px; color:#b5c4cd; }
.freeze-progress { width:100%; height:8px; accent-color:#b3cfde; }
.streak-calendar .lab-days button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; cursor:default; background:#262d32; border-color:#414e56; min-height:56px; }
.streak-calendar .lab-days button:hover { transform:none; box-shadow:none; background:#262d32; }
.streak-calendar .day-symbol { font-size:19px; line-height:1; }
.streak-calendar .solved .day-symbol,.calendar-legend .solved { color:#8ec987; }
.streak-calendar .missed .day-symbol,.calendar-legend .missed { color:#92999e; }
.streak-calendar .failed .day-symbol,.calendar-legend .failed { color:#ee8585; }
.streak-calendar .frozen .day-symbol,.calendar-legend .frozen { color:#c4dce9; }
.streak-calendar .frozen { border-color:#9bb7c8 !important; background:#2b3b46 !important; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:10px 16px; font-size:12px; margin-top:16px; }
.streak-calendar [hidden] { display:none; }
@keyframes notice-arrive { from { opacity:0; top:12px; } }
@media(prefers-reduced-motion:reduce) { .result-notice { animation:none; } }

.freeze-progress { appearance:none; border:0; border-radius:6px; overflow:hidden; background:#424e57; }
.freeze-progress::-webkit-progress-bar { background:#424e57; border-radius:6px; }
.freeze-progress::-webkit-progress-value { background:linear-gradient(90deg,#8baec4,#d0e2ed); border-radius:6px; }
.freeze-progress::-moz-progress-bar { background:#c4dce9; border-radius:6px; }
.streak-calendar .lab-week { color:#afc5d3; }
.freeze-count strong { cursor:help; }

/* Reserve six weeks in both calendars so month changes never resize the boxes. */
.stats-layout { display:flex; flex-direction:column; box-sizing:border-box; }
.stats-layout .js-stats-page > .page-card { padding:0; }
.stats-section-divider { width:100%; height:0; flex:none; margin:20px 0; border:0; border-top:1px solid rgba(255,255,255,.1); }
.js-stats-status:empty { display:none; }
.stats-layout .stats-calendar { box-sizing:border-box; width:100%; max-width:none; margin:0; padding:28px 28px 14px; text-align:left; }
.stats-layout .elelo-card { margin-block:0; }
.stats-layout .stats-section-divider + .stats-calendar { padding-top:0; }
.stats-calendar .lab-heading { height:44px; margin-bottom:16px; }
.stats-calendar .lab-heading h2 { margin:0; font-size:28px; }
.stats-calendar .calendar-body { display:grid; grid-template-rows:var(--calendar-intro-height,180px) 42px 16px 366px var(--calendar-legend-height,18px); gap:16px; }
.stats-calendar .calendar-body[hidden] { display:none; }
.stats-calendar .calendar-intro { position:relative; min-width:0; }
.stats-calendar .calendar-intro p { margin:12px 0; }
.stats-calendar .calendar-intro > p:first-child { margin-top:0; }
.stats-calendar .calendar-intro small { font-size:12px; line-height:1.6; color:#bdbdbd; }
.stats-calendar .lab-controls,.stats-calendar .lab-week,.stats-calendar .calendar-legend { margin:0; }
.stats-calendar .lab-days { grid-template-rows:repeat(6,56px); align-content:start; }
.stats-calendar .lab-days button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; height:56px; min-height:56px; padding:4px; }
.stats-calendar .day-number { font-size:13px; line-height:16px; }
.stats-calendar .day-symbol { display:block; height:20px; font-size:19px; line-height:20px; }
.stats-calendar .complete .day-symbol { color:#8ec987; }
.stats-calendar .in-progress .day-symbol,.calendar-legend .in-progress { color:#c4dce9; }
.stats-calendar .today .day-symbol,.calendar-legend .today-marker { color:#afc5d3; }
.stats-calendar .calendar-legend { align-content:start; align-items:start; gap:8px 12px; line-height:18px; }
.stats-calendar .calendar-status { margin:0; min-height:22px; font-size:12px; }
.freeze-scenery { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.freeze-scenery span { position:absolute; top:-70px; font-size:64px; color:#c4dce9; opacity:0; animation:freeze-drift 16s linear infinite; }
.freeze-scenery span:nth-child(1) { left:12%; }
.freeze-scenery span:nth-child(2) { left:52%; animation-delay:-5s; font-size:40px; }
.freeze-scenery span:nth-child(3) { left:80%; animation-delay:-10s; font-size:54px; }
@keyframes freeze-drift { 0% { transform:translate(0,0) rotate(0); opacity:0; } 15%,75% { opacity:.07; } 100% { transform:translate(24px,650px) rotate(100deg); opacity:0; } }
@media (max-width:600px) {
  .stats-layout .stats-calendar { padding:18px 18px 12px; }
  .stats-calendar .lab-heading { flex-wrap:nowrap; }
  .freeze-summary { flex-wrap:wrap; gap:8px; }
}
@media (max-width:380px) {
  .stats-calendar .lab-heading h2 { font-size:24px; }
  .stats-calendar .calendar-legend { font-size:11px; gap:6px 10px; }
}
@media (prefers-reduced-motion:reduce) { .freeze-scenery span { animation:none; opacity:.05; top:20px; } }
.stats-calendar .lab-days button { background:#262d32; border-color:#414e56; }
.stats-calendar .lab-days button:is(.solved,.complete) { border-color:#62a55c; }
.stats-calendar .lab-days button.today { border-color:#8ec987; }
.stats-calendar .today.solved .day-symbol { color:#8ec987; }
.stats-calendar .today.failed .day-symbol { color:#ee8585; }
.stats-calendar .today.frozen .day-symbol { color:#c4dce9; }
.stats-calendar .calendar-status { height:22px; line-height:22px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

.stats-calendar .calendar-intro-content { display:flow-root; }

.stats-calendar .calendar-status:empty { display:none; }
.stats-calendar .calendar-status:not(:empty) { margin-top:8px; }


/* Completed main games open their saved elBot analysis. */
.streak-calendar .lab-days button.analyzable { position:relative; cursor:pointer; }
.streak-calendar .lab-days button.analyzable:hover,.streak-calendar .lab-days button.analyzable:focus-visible { background:#34412f; border-color:#a2c691; box-shadow:0 0 0 1px #91b780; }
.streak-calendar .analysis-magnifier { position:absolute; top:4px; right:4px; width:12px; height:12px; line-height:0; color:#e7f4df; opacity:0; transition:opacity .15s; }
.streak-calendar .analyzable:hover .analysis-magnifier,.streak-calendar .analyzable:focus-visible .analysis-magnifier { opacity:1; }
@media(hover:none) { .streak-calendar .analysis-magnifier { opacity:.8; } }
.js-freeze-guest a { color: #8ec987; }
.js-freeze-guest a:hover, .js-freeze-guest a:focus-visible { color: #c7edc2; }

.streak-calendar .analysis-magnifier svg { display:block; width:100%; height:100%; }
@media (max-width:600px) {
  .streak-calendar .analysis-magnifier { top:3px; right:3px; width:clamp(8px,2.4vw,12px); height:clamp(8px,2.4vw,12px); }
  .streak-calendar .analyzable .day-number { transform:translateX(-4px); }
}

#archive-days button.archive-available { border-color:#62a55c; background:#2a382b; }
#archive-days button.archive-checking:disabled,#archive-days button.archive-unverified:disabled { opacity:.85; position:relative; overflow:hidden; border-style:dashed; }
#archive-days button.archive-checking::after { content:""; position:absolute; inset:0; background:linear-gradient(100deg,transparent 20%,#8ec98733 50%,transparent 80%); background-size:250% 100%; animation:statsShine 1.5s linear infinite; }
#archive-days button.archive-unverified { border-color:#b59f3b; }
.calendar-legend .archive-playable { color:#8ec987; }
.archive-retry { border:0; background:transparent; color:#8ec987; padding:0 4px; font:inherit; text-decoration:underline; cursor:pointer; }
#lab-archives .calendar-status:not(:empty) { height:auto; min-height:22px; white-space:normal; overflow:visible; }
@media (prefers-reduced-motion:reduce) { #archive-days button.archive-checking::after { animation:none; } }

.lab-access-locked { overflow: hidden; }
.lab-access-gate {
  position: fixed; inset: 0; z-index: 30000;
  display: grid; place-items: center; overflow-y: auto;
  padding: 24px; background: rgba(8, 15, 10, .7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: lab-access-fade .3s ease both;
}
.lab-access-box {
  box-sizing: border-box; width: 100%; max-width: 440px;
  margin: auto; padding: 34px 28px; text-align: center;
  color: #e7eee3; background: linear-gradient(145deg, #273424, #161e17);
  border: 1px solid #8ec98766; border-radius: 20px;
  box-shadow: 0 24px 90px #0008, 0 0 45px #62a55c15;
  font-family: inherit; animation: lab-access-rise .45s cubic-bezier(.2,.7,.2,1) both;
}
.lab-access-box > img { object-fit: contain; border-radius: 12px; }
.lab-access-box:focus { outline: none; }
.lab-access-eyebrow { color: #8ec987; font: 11px monospace; letter-spacing: 3px; margin: 18px 0 12px; }
.lab-access-box h2 { font-size: clamp(23px, 5vw, 29px); line-height: 1.25; margin: 0 0 16px; }
#lab-access-description { color: #bfccbb; font-size: 15px; line-height: 1.65; margin: 0 0 26px; }
.lab-access-subscribe, .lab-access-retry {
  display: block; width: 100%; box-sizing: border-box;
  border: 0; padding: 14px 18px; border-radius: 9px;
  color: #162515; background: #8ec987; text-decoration: none;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .2s;
}
.lab-access-subscribe:hover, .lab-access-retry:hover { background: #a8dfa1; transform: translateY(-1px); }
.lab-access-back { display: inline-block; margin-top: 20px; color: #bfccbb; font-size: 14px; text-underline-offset: 4px; }
.lab-access-back:hover { color: #8ec987; }
.lab-access-box a:focus-visible, .lab-access-box button:focus-visible { outline: 2px solid #e1f6d9; outline-offset: 4px; }
.lab-access-gate [hidden] { display: none !important; }
.lab-access-gate[data-state="checking"] .lab-access-box > img { animation:lab-access-breathe 1.6s ease-in-out infinite; }
.lab-access-gate[data-state="checking"] h2::before { content:""; display:inline-block; width:16px; height:16px; margin-right:10px; border:2px solid #8ec98744; border-top-color:#8ec987; border-radius:50%; vertical-align:1px; animation:lab-access-spin .8s linear infinite; }
.lab-access-gate[data-state="checking"] .lab-access-box { position:relative; overflow:hidden; }
.lab-access-gate[data-state="checking"] .lab-access-box::after { content:""; position:absolute; left:0; bottom:0; width:40%; height:2px; background:#8ec987; animation:lab-access-sweep 1.5s ease-in-out infinite; }
@keyframes lab-access-spin { to { transform:rotate(360deg); } }
@keyframes lab-access-breathe { 50% { opacity:.65; transform:scale(.96); } }
@keyframes lab-access-sweep { from { transform:translateX(-100%); } to { transform:translateX(350%); } }
@keyframes lab-access-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lab-access-rise { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .lab-access-gate { padding: 18px; } .lab-access-box { padding: 28px 22px; } }
@media (prefers-reduced-motion: reduce) { .lab-access-gate, .lab-access-box { animation: none; } .lab-access-subscribe, .lab-access-retry { transition: none; } }
@media(prefers-reduced-motion:reduce) { .lab-access-gate[data-state="checking"] .lab-access-box > img,.lab-access-gate[data-state="checking"] h2::before,.lab-access-gate[data-state="checking"] .lab-access-box::after { animation:none; } }
