:root {
  --black: #0a0b0e;
  --black-soft: #111318;
  --surface: #14161c;
  --surface-hover: #1a1d26;
  --border: #2a2e3a;
  --border-focus: #3b82f6;
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --cyan-glow: rgba(34, 211, 238, 0.25);
  --orange: #f97316;
  --orange-hover: #ea580c;
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.2);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.2);
  --yellow: #facc15;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
}

/* Background with character */
.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(34, 211, 238, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--black) 0%, var(--black-soft) 100%);
  pointer-events: none;
  z-index: 0;
}

.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  background-color: var(--black);
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header with logo + countdown */
.app-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
}

.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.countdown {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.05em;
}

.countdown.countdown-over {
  color: var(--red);
}

/* Views */
.view {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.view[hidden] {
  display: none !important;
}

.view-head {
  margin-bottom: 2rem;
}

.view-title {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Status badges (View 2 & 3) */
.status-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: inline-block;
}

.status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 20px var(--green-glow);
}

.status-fail {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 20px var(--red-glow);
}

/* Quiz form + dropdowns */
.quiz-form {
  text-align: left;
  width: 100%;
}

.quiz-section {
  margin-bottom: 1.5rem;
}

.quiz-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quiz-select {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cyan);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.quiz-select:hover {
  background-color: var(--surface-hover);
  border-color: var(--cyan-dim);
}

.quiz-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.quiz-select option {
  background: var(--black-soft);
  color: var(--cyan);
}

.submit-btn {
  width: 100%;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* View 2: Success */
.view-success .success-message {
  color: var(--green);
  font-size: 1.1em;
  margin-bottom: 1rem;
}

.view-success .flag-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--yellow);
  padding: 1rem 1.5rem;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 8px;
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

/* View 3: Documents destroyed (popup) */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: popupFadeIn 0.2s ease-out;
}

.popup-overlay[hidden] {
  display: none;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.popup-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: popupSlideIn 0.25s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-destroyed {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-secured {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-secured .popup-title {
  color: var(--green);
}

.popup-flag {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--yellow);
  padding: 0.75rem 1rem;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.popup-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 0.75rem;
}

.popup-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.popup-dismiss {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.popup-dismiss:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

body.popup-open {
  overflow: hidden;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  transition: background-color 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: center;
  position: relative;
}

.red-flash {
  animation: flash-red 0.5s ease-in-out 5;
}

@keyframes flash-red {
  0%,
  100% {
    background-color: transparent;
  }

  50% {
    background-color: rgba(255, 0, 0, 0.3);
  }
}

.box {
  margin-top: 20px;
  padding: 20px;
  background-color: #1e2329;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid #2a2f36;
  transition: transform 0.2s ease;
}

.box:hover {
  transform: translateY(-2px);
}

.login-box,
.welcome-box {
  background-color: #1e2329;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  margin: 50px auto;
  border: 1px solid #2a2f36;
}

h1 {
  color: #ee6127;
  margin-top: -20px;
  margin-bottom: 10px;
  font-size: 2.2em;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid #2a2f36;
  border-radius: 8px;
  box-sizing: border-box;
  background-color: #151921;
  color: #ffffff;
  font-size: 1em;
  transition: border-color 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #ee6127;
}

button {
  background-color: #ee6127;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 1.1em;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #d4551f;
}

.alert {
  background-color: rgba(238, 97, 39, 0.1);
  color: #ee6127;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(238, 97, 39, 0.2);
}

.logout {
  margin-top: 30px;
}

a {
  color: #ee6127;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 8px 16px;
  border-radius: 6px;
  background-color: rgba(238, 97, 39, 0.1);
  border: 1px solid rgba(238, 97, 39, 0.2);
}

a:hover {
  color: #d4551f;
  background-color: rgba(238, 97, 39, 0.2);
  text-decoration: none;
}

p {
  color: #a0a0a0;
  margin-bottom: 25px;
  font-size: 1.1em;
}

/* Pixel Art Campfire Animation */
.campfire-container {
  position: relative;
  width: 300px;
  height: 150px;
  min-height: 250px;
  margin: 20px auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Fire glow effect */
.fire-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(238, 97, 39, 0.3) 0%,
    rgba(238, 97, 39, 0.1) 50%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(10px);
  z-index: 0;
  transition: opacity 0.5s ease;
}

/* Pixel flame container */
.pixel-flame {
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Pixel rows */
.pixel-row {
  display: flex;
  justify-content: center;
  gap: 2px;
}

/* Individual pixels */
.pixel {
  width: 8px;
  height: 8px;
  transition: opacity 0.5s ease;
}

/* Pixel colors */
.red {
  background-color: #ee6127;
}

.orange {
  background-color: #ff8c42;
}

.yellow-orange {
  background-color: #ffa64d;
}

.yellow {
  background-color: #ffcc66;
}

.bright-yellow {
  background-color: #ffeb99;
}

/* Logs styling */
.logs {
  position: absolute;
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 15%;
  z-index: 10;
}

.log-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.log {
  width: 48px;
  height: 18px;
  background: linear-gradient(90deg, #a9744f 0%, #6b3e26 100%);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 2px solid #4e2e1f;
  z-index: 21;
}

.brown-dark {
  background-color: #2a2f36;
}

.brown-light {
  background-color: #3a3f46;
}

/* Animation for flame flicker */
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

.pixel-flame .pixel {
  animation: flicker 0.5s infinite alternate;
}

.pixel-flame .pixel:nth-child(2n) {
  animation-delay: 0.2s;
}

.pixel-flame .pixel:nth-child(3n) {
  animation-delay: 0.4s;
}

/* Shrinking animation */
.pixel-flame.shrinking {
  transform-origin: bottom center;
}

.fire-glow.shrinking {
  transform-origin: center;
}

/* Countdown Timer */
.countdown-container {
  text-align: center;
  margin: 1vh 0 0vh 0;
}

.countdown {
  font-size: 2.5em;
  color: #ee6127;
  font-weight: bold;
  margin: 5px 0;
  font-family: "Courier New", monospace;
}

.start-button {
  background-color: #ee6127;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  width: auto;
  min-width: 120px;
  display: inline-block;
}

.start-button:hover {
  background-color: #d4551f;
  transform: translateY(-2px);
}

.start-button:disabled {
  background-color: #666;
  cursor: not-allowed;
  transform: none;
}

/* Disable all buttons when countdown is over */
.countdown-over button,
.countdown-over a {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.countdown-over input {
  pointer-events: none;
  opacity: 0.5;
}

.login-box {
  background-color: #1e2329;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 70%; /* Adjust to a percentage for responsiveness */
  margin: 0 auto;
  border: 1px solid #2a2f36;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.extinguishers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 200px;
  z-index: 10;
}
.extinguisher {
  height: 100%;
}
.extinguisher img {
  width: 100%;
  height: auto;
  max-width: 140px;
  max-height: 100%;
  object-fit: contain;
  margin-top: -1px;
}

canvas#smokeCanvas {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Remove any stray flame-text styles */
.flame-text {
  display: none !important;
}

.pixel-campfire {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.pixel-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  height: 18px;
}

.pixel {
  width: 18px;
  height: 18px;
  border: 2px solid #222;
  box-sizing: border-box;
}

.red {
  background: #c0392b;
}

.orange {
  background: #ee6127;
}

.yellow {
  background: #ffe066;
}

.white {
  background: #fffbe6;
}

.log-pixel {
  background: #6b3e26;
  border-color: #222;
}

.empty {
  background: transparent;
  border-color: transparent;
}

.pixel-flame-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}

.pixel-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.pixel {
  width: 12px;
  height: 12px;
  border: 1px solid #222;
  box-sizing: border-box;
}

.red {
  background: #c0392b;
}

.orange {
  background: #ee6127;
}

.yellow {
  background: #ffe066;
}

.white {
  background: #fffbe6;
}

.empty {
  background: transparent;
  border-color: transparent;
}

.pixel-logs-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 2px;
  margin-bottom: 8px;
}

.flicker {
  animation: pixel-flicker 0.7s infinite alternate;
}

.flicker:nth-child(2) {
  animation-delay: 0.1s;
}

.flicker:nth-child(3) {
  animation-delay: 0.2s;
}

.flicker:nth-child(4) {
  animation-delay: 0.3s;
}

.flicker:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes pixel-flicker {
  0% {
    opacity: 1;
    filter: brightness(1);
  }

  30% {
    opacity: 0.7;
    filter: brightness(1.2);
  }

  60% {
    opacity: 0.85;
    filter: brightness(0.9);
  }

  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.pixel-flame-art-hires {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}

.pixel-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  height: 5px;
}

.pixel {
  width: 5px;
  height: 5px;
  border: 1px solid #222;
  box-sizing: border-box;
}

.red {
  background: #c0392b;
}

.orange {
  background: #ee6127;
}

.yellow {
  background: #ffe066;
}

.white {
  background: #fffbe6;
}

.empty {
  background: transparent;
  border-color: transparent;
}

.logs-angled-base-hires {
  position: relative;
  width: 80px;
  height: 60px;
  margin: 0 auto 8px auto;
}

.log-pixel-group {
  position: absolute;
  top: 0;
  left: 0;
}

.log-left-hires .pixel {
  background: #8d5524;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: rotate(-35deg);
}

.log-vertical-hires .pixel {
  background: #a9744f;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: rotate(0deg);
}

.log-right-hires .pixel {
  background: #8d5524;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: rotate(35deg);
}

.log-brown {
  background: #8d5524;
}

/* Logs */
.logs-base {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 2px;
  gap: 2px;
}

.log {
  width: 48px;
  height: 12px;
  background: #8d5524;
  border: 2px solid #222;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.log-left {
  transform: rotate(-35deg);
  margin-right: -12px;
  z-index: 1;
}

.log-center {
  transform: rotate(0deg);
  z-index: 2;
}

.log-right {
  transform: rotate(35deg);
  margin-left: -12px;
  z-index: 1;
}

.fire-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px auto;
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 0;
}

.fire {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 200px;
  width: 200px;
  pointer-events: none;
  --flame-size: 0;
  transition: all 3s ease-in-out;
}

.fire.logged-in {
  --flame-size: 1;
  transform: translate(-50%, -50%) scale(1);
}

.fire .flames {
  position: absolute;
  left: 0%;
  bottom: 25%;
  width: 60%;
  height: 60%;
  transform-origin: bottom center;
  transform: rotate(45deg);
  transition: all 3s ease-in-out;
  z-index: 5;
}

.fire.logged-in .flames {
  transform: rotate(45deg) scale(1);
}

.fire .flames .flame {
  position: absolute;
  right: 0%;
  bottom: 0%;
  width: calc(var(--flame-size, 0) * 100%);
  height: calc(var(--flame-size, 0) * 100%);
  background-color: var(--yellow);
  border-radius: 10px;
  transition: all 3s ease-in-out;
}

.fire.logged-in .flames .flame {
  width: 100%;
  height: 100%;
}

.fire.no-flame .flames {
  opacity: 0;
  pointer-events: none;
}

.logs .smoke {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  opacity: 1;
  pointer-events: none;
  z-index: 1000;
  animation: smoke-rise 2.2s linear infinite;
  animation-play-state: running;
  background: red;
  transition: opacity 0.3s;
  transform: rotate(45deg);
}

.logs .smoke.smoke1 {
  width: 30px;
  height: 30px;
  animation-delay: 0s;
  background: radial-gradient(circle, #bbb 60%, #888 100%);
}

.logs .smoke.smoke2 {
  width: 22px;
  height: 22px;
  left: 60%;
  animation-delay: 0.4s;
  background: radial-gradient(circle, #ccc 60%, #aaa 100%);
}

.logs .smoke.smoke3 {
  width: 18px;
  height: 18px;
  left: 40%;
  animation-delay: 0.8s;
  background: radial-gradient(circle, #eee 60%, #bbb 100%);
}

.logs .smoke.smoke4 {
  width: 14px;
  height: 14px;
  left: 55%;
  animation-delay: 1.1s;
  background: radial-gradient(circle, #ddd 60%, #aaa 100%);
}

@keyframes smoke-rise {
  0% {
    opacity: 1;
    transform: rotate(45deg) scale(0.7) translateY(0);
  }

  60% {
    opacity: 0.7;
    transform: rotate(45deg) scale(1.1) translateY(-30%);
  }

  100% {
    opacity: 0;
    transform: rotate(45deg) scale(1.3) translateY(-100%);
  }
}

.fire .flames .flame:nth-child(2n + 1) {
  animation: flameodd var(--animationtime) ease-in infinite;
}

.fire .flames .flame:nth-child(2n) {
  animation: flameeven var(--animationtime) ease-in infinite;
}

.fire .flames .flame:nth-child(1) {
  animation-delay: 0s;
}

.fire .flames .flame:nth-child(2) {
  animation-delay: calc(var(--animationtime) / 4);
}

.fire .flames .flame:nth-child(3) {
  animation-delay: calc(var(--animationtime) / 4 * 2);
}

.fire .flames .flame:nth-child(4) {
  animation-delay: calc(var(--animationtime) / 4 * 3);
}

.fire .logs:before,
.fire .logs:after {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(20deg);
  height: 100%;
  width: 100%;
  border-radius: 1vw;
  background-color: var(--brownl);
}

.fire .logs:before {
  transform: translate(-50%, -50%) rotate(-20deg);
  background-color: var(--brownd);
}

@keyframes flameodd {
  0%,
  100% {
    width: 0%;
    height: 0%;
  }

  25% {
    width: calc(var(--flame-size, 1) * 100%);
    height: calc(var(--flame-size, 1) * 100%);
    transform: rotate(90deg);
  }

  0% {
    background-color: var(--yellow);
    z-index: 1000000;
  }

  40% {
    background-color: var(--orange);
    z-index: 1000000;
  }

  100% {
    background-color: var(--red);
    z-index: -10;
  }

  0% {
    right: 0%;
    bottom: 0%;
  }

  25% {
    right: 1%;
    bottom: 2%;
  }

  100% {
    right: 150%;
    bottom: 170%;
  }
}

@keyframes flameeven {
  0%,
  100% {
    width: 0%;
    height: 0%;
  }

  25% {
    width: calc(var(--flame-size, 1) * 100%);
    height: calc(var(--flame-size, 1) * 100%);
    transform: rotate(90deg);
  }

  0% {
    background-color: var(--yellow);
    z-index: 1000000;
  }

  40% {
    background-color: var(--orange);
    z-index: 1000000;
  }

  100% {
    background-color: var(--red);
    z-index: -10;
  }

  0% {
    right: 0%;
    bottom: 0%;
  }

  25% {
    right: 2%;
    bottom: 1%;
  }

  100% {
    right: 170%;
    bottom: 150%;
  }
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toast {
  padding: 15px 25px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 200px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background-color: #dc3545;
}

.toast.success {
  background-color: #28a745;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Flag Text */
.flag-text {
  color: var(--yellow);
  font-size: 1.5em;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 220, 1, 0.5);
  margin: 20px 0;
  text-align: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 220, 1, 0.3);
}

.fire.logged-in {
  --flame-size: 1;
  transform: translate(-50%, -50%) scale(1);
}
