/*----------------------------------------------*\
    GLOBAL
	======

	@package yaybrigade

\*----------------------------------------------*/
/*----------------------------------------------*\
    COMPONENTS
	==========

	@package yaybrigade

\*----------------------------------------------*/
/* 
 *
 * / Variables
------------------------------------------------*/
/* Colors */
/* Breakpoints */
/* Variables */
:root {
  --color-questions: #FECF63;
  --color-text: #000000;
  --color-bg: #7D7771;
  --color-button-bg: #E0A533;
  --color-key-bg: #2681D6;
  --color-key-text: #FFFFFF;
  --color-digit-correct: #A6BF48;
  --color-digit-incorrect: #F55F48;
  --color-key-bg: #2681D6;
  --color-key-bg-inactive: #6C7075;
  font-size: 1rem;
}
@media screen and (min-width: 27rem) {
  :root {
    font-size: 1.1rem;
  }
}
@media screen and (min-width: 36rem) {
  :root {
    font-size: 1.2rem;
  }
}
@media screen and (min-width: 48rem) {
  :root {
    font-size: 1.3rem;
  }
}
@media screen and (min-width: 64rem) {
  :root {
    font-size: 1.4rem;
  }
}
@media screen and (min-width: 77rem) {
  :root {
    font-size: 1.5rem;
  }
}

body {
  font-family: "Yrsa", serif;
  background: var(--color-bg);
  min-height: 100vh;
  margin: 0;
}

.wrapper {
  max-width: 30rem;
  margin: 0 auto 4rem;
  padding: 1rem;
}
@media screen and (min-width: 27rem) {
  .wrapper {
    padding: 2rem;
  }
}

.title {
  font-size: 1.1em;
  color: var(--color-text);
  font-weight: 400;
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
}

.question-container {
  margin-top: clamp(3rem, 8vw, 6rem);
}
.question-container:first-of-type {
  margin-top: 0;
}

.category-label {
  font-size: 0.8rem;
  font-family: "ibm plex mono", monospace;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 2rem;
  color: var(--color-questions);
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 2rem;
}

.input-boxes {
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.digit-box {
  font-size: 1.5em;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  line-height: 0;
  aspect-ratio: 1/1;
  border-radius: 50%;
  padding: 1.2rem;
  border: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 0.3s;
}
@media screen and (min-width: 48rem) {
  .digit-box {
    font-size: 2em;
  }
}

.digit-box.active {
  outline: 1.5px solid white;
  outline-offset: -2.5px;
}

.digit-box.correct {
  background: var(--color-digit-correct);
  color: white;
  border-color: var(--color-digit-correct);
}

.digit-box.incorrect {
  background: var(--color-digit-incorrect);
  color: white;
  border-color: var(--color-digit-incorrect);
}

.correct-answer {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 5px;
}

.correct-digit {
  width: 50px;
  text-align: center;
  font-size: 0.85em;
  color: #333;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 10rem;
  margin: 40px auto 0;
}

.key {
  font-size: 1em;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  aspect-ratio: 1/1;
  padding: 0.8rem;
  border: none;
  border-radius: 50%;
  background: var(--color-key-bg);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

@media (hover: hover) and (pointer: fine) {
  .key:hover:not(.disabled) {
    background: #4d6a8a;
    transform: translateY(-1px);
  }
}
.key:active:not(.disabled) {
  transform: translateY(0);
}

.key.disabled {
  background: var(--color-key-bg-inactive);
  color: #898784;
  cursor: not-allowed;
}

.key.zero {
  grid-column: 2;
}

.game-over {
  margin-top: 4rem;
  padding: 30px;
  text-align: center;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.game-over h2 {
  color: #333;
  font-size: 2em;
  margin-bottom: 15px;
}

.game-over p {
  font-size: 1.3em;
  color: #333;
}

.emoji-grid {
  font-size: 1.5em;
  line-height: 1.8;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 1rem;
  text-align: left;
  display: inline-block;
}

.emoji-row {
  margin-bottom: 8px;
}

.share-btn {
  font-size: 1rem;
  font-family: "ibm plex mono", monospace;
  background: var(--color-button-bg);
  color: white;
  border: none;
  padding: 2rem;
  max-width: 10rem;
  margin-inline: auto;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  aspect-ratio: 1/1;
}

.share-btn:hover {
  transform: scale(1.05);
}

.restart-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  display: block;
  width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.restart-btn:hover {
  background: #5568d3;
  transform: scale(1.05);
}

.tomorrow-message {
  font-size: 1.1em;
  color: #666;
  margin-top: 20px;
  margin-bottom: 0;
  text-align: center;
}

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

.countdown-time {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  color: #333;
  letter-spacing: 2px;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95em;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

/* Splash Page Styles */
.splash-container {
  text-align: center;
  padding-left: 2rem;
  padding-right: 2rem;
}

.character-container {
  position: relative;
  text-align: center;
}

.character-image {
  max-width: clamp(150px, 17vw, 250px);
  height: auto;
  position: relative;
  z-index: 2;
  padding: 0 20px;
  mix-blend-mode: multiply;
}
.character-image--splash {
  animation: wave 1.25s cubic-bezier(0.22, 0.61, 0.36, 1) 1;
}
.character-image--celebrate {
  animation: celebrate 0.3s ease-in-out 3;
}
@keyframes celebrate {
  0%, 100% {
    translate: 0;
    scale: 1 1;
  }
  50% {
    translate: 0 -10px;
    scale: 1 0.98;
  }
}
@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
    transform-origin: bottom center;
  }
  50% {
    transform: rotate(6deg);
    transform-origin: bottom center;
  }
}

.splash-subtitle {
  font-size: 2rem;
  color: var(--color-questions);
  margin-bottom: 60px;
  font-weight: 300;
  line-height: 1.3;
}

.splash-date {
  color: rgba(255, 255, 255, 0.85);
  font-family: "ibm plex mono", monospace;
  font-size: 0.65em;
  margin-bottom: 1rem;
}

.start-btn {
  font-size: 1rem;
  font-family: "ibm plex mono", monospace;
  background: var(--color-button-bg);
  color: white;
  border: none;
  padding: 5rem;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  aspect-ratio: 1/1;
}

.start-btn:hover {
  transform: scale(1.05);
}

.start-btn:active {
  transform: scale(0.95);
}

/* Wikipedia Links Styles */
.wiki-links {
  margin-top: 4rem;
  padding: 0 2rem;
}

.wiki-links-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #e0a533;
  border: 1px solid #e0a533;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s;
}
.wiki-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.wiki-link:hover {
  background: #e0a533;
  color: #333333;
}

/* Perfect Game Celebration Styles */
.celebration-datey {
  position: fixed;
  width: 70px;
  height: auto;
  z-index: 9999;
  top: -100px;
  pointer-events: none;
  animation: rainFall linear forwards;
  mix-blend-mode: multiply;
}

@keyframes rainFall {
  0% {
    top: -100px;
    transform: rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    top: calc(100vh + 100px);
    transform: rotate(360deg);
    opacity: 0;
  }
}
/* Timeline Styles */
.timeline {
  margin-top: 3rem;
  padding: 0 1rem;
  text-align: left;
}
.timeline__heading {
  color: #333;
  font-size: 2em;
  margin-bottom: 1.5rem;
  text-align: center;
}
.timeline__items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-top: 2rem;
  padding-bottom: 1rem;
}
@media screen and (min-width: 27rem) {
  .timeline__items {
    margin-left: 4rem;
  }
}
@media screen and (min-width: 36rem) {
  .timeline__items {
    margin-left: 9rem;
  }
}
.timeline__items::before {
  content: "";
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ddd;
}
.timeline__item {
  position: relative;
  padding-left: 4rem;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 1.55rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--color-button-bg);
}
.timeline__date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: #333;
  position: absolute;
  left: -2rem;
}
.timeline__event {
  font-family: "yrsa", serif;
  font-size: 1rem;
  color: #333;
  line-height: 1.1;
}
.timeline__event a {
  text-decoration: none;
}
.timeline__event a:hover {
  text-decoration: underline;
}

/* Hint Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 25rem;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.modal-message {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.25;
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.modal-button {
  font-size: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  background: var(--color-button-bg);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.modal-button:hover {
  background: #c89129;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.modal-button:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.footer {
  text-align: center;
  margin-top: 4rem;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: "ibm plex mono", monospace;
  font-size: 0.65em;
  margin-bottom: 1rem;
}
.footer a {
  color: currentColor;
}