:root {
  /* Mochi Flow Pixel Art palette */
  --blush: #fce4ec; /* primary accent */
  --lav: #e3d4fa; /* soft accent */
  --mint: #d7f5e8; /* outline/accent */
  --cream: #fff9ee; /* background base */
  --pxgray: #a0a0a0; /* text/outline */
  --ink: #444;
  --pixel-border: #8b8b8b; /* pixel art border */
  --pixel-shadow: #d0d0d0; /* pixel art shadow */
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Courier New", monospace, system-ui;
  color: var(--ink);
  background: radial-gradient(
      1200px 600px at 50% -10%,
      var(--blush) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, var(--cream), #ffffff);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.brand {
  font-family: "Cherry Bomb One", cursive;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0;
  text-transform: lowercase;
  color: #f2c9d0;
  font-size: 1.8em;
  text-shadow: 0.5px 0.5px 0px var(--pixel-shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mochi-icon {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(1px 1px 0px var(--pixel-shadow));
  animation: mochi-bounce 2s ease-in-out infinite;
}

@keyframes mochi-bounce {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}
.tagline {
  margin: 0;
  color: #6b6b6b;
}

.wins-card {
  background: #fff;
  border: 3px solid var(--pixel-border);
  border-radius: 0px;
  padding: 20px;
  box-shadow: 2px 2px 0px var(--pixel-shadow);
  position: relative;
}

.win-form {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}
.win-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--pixel-border);
  border-radius: 0px;
  background: #fff;
  font-size: 16px;
  font-family: "Courier New", monospace;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
}
.win-input:focus {
  outline: none;
  border-color: var(--blush);
  box-shadow: 1px 1px 0px var(--blush);
}
.btn {
  border: 2px solid var(--pixel-border);
  background: var(--blush);
  padding: 12px 16px;
  border-radius: 0px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  font-family: "Courier New", monospace;
  font-size: 14px;
  transition: all 0.1s ease;
}
.btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0px var(--pixel-shadow);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--pixel-shadow);
}
.btn-secondary {
  background: #fff;
  border-color: var(--mint);
}
.btn-ghost {
  background: #fff;
  border-color: #bbb;
}

.win-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.win-item {
  background: #fff;
  border: 2px solid var(--pixel-border);
  border-radius: 0px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  font-family: "Courier New", monospace;
}
.win-item .text {
  flex: 1;
}
.win-item .remove {
  border: 2px solid var(--pixel-border);
  background: #fff;
  color: #a33;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0px;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  font-family: "Courier New", monospace;
  font-weight: bold;
}
.win-item .remove:hover {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0px var(--pixel-shadow);
}

.hearts {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 0 8px;
}
.heart {
  width: 32px;
  height: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='6' y='8' width='4' height='4' fill='%23A0A0A0'/><rect x='10' y='6' width='4' height='4' fill='%23A0A0A0'/><rect x='14' y='6' width='4' height='4' fill='%23A0A0A0'/><rect x='18' y='8' width='4' height='4' fill='%23A0A0A0'/><rect x='4' y='12' width='4' height='4' fill='%23A0A0A0'/><rect x='8' y='10' width='4' height='4' fill='%23A0A0A0'/><rect x='12' y='10' width='4' height='4' fill='%23A0A0A0'/><rect x='16' y='10' width='4' height='4' fill='%23A0A0A0'/><rect x='20' y='10' width='4' height='4' fill='%23A0A0A0'/><rect x='24' y='12' width='4' height='4' fill='%23A0A0A0'/><rect x='2' y='16' width='4' height='4' fill='%23A0A0A0'/><rect x='6' y='14' width='4' height='4' fill='%23A0A0A0'/><rect x='10' y='14' width='4' height='4' fill='%23A0A0A0'/><rect x='14' y='14' width='4' height='4' fill='%23A0A0A0'/><rect x='18' y='14' width='4' height='4' fill='%23A0A0A0'/><rect x='22' y='14' width='4' height='4' fill='%23A0A0A0'/><rect x='26' y='16' width='4' height='4' fill='%23A0A0A0'/><rect x='4' y='20' width='4' height='4' fill='%23A0A0A0'/><rect x='8' y='18' width='4' height='4' fill='%23A0A0A0'/><rect x='12' y='18' width='4' height='4' fill='%23A0A0A0'/><rect x='16' y='18' width='4' height='4' fill='%23A0A0A0'/><rect x='20' y='18' width='4' height='4' fill='%23A0A0A0'/><rect x='24' y='20' width='4' height='4' fill='%23A0A0A0'/><rect x='8' y='22' width='4' height='4' fill='%23A0A0A0'/><rect x='12' y='22' width='4' height='4' fill='%23A0A0A0'/><rect x='16' y='22' width='4' height='4' fill='%23A0A0A0'/><rect x='20' y='22' width='4' height='4' fill='%23A0A0A0'/><rect x='12' y='26' width='4' height='4' fill='%23A0A0A0'/><rect x='16' y='26' width='4' height='4' fill='%23A0A0A0'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border: 2px solid var(--pixel-border);
  box-shadow: 1px 1px 0px var(--pixel-shadow);
}
.heart.filled {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect x='6' y='8' width='4' height='4' fill='%23FCE4EC'/><rect x='10' y='6' width='4' height='4' fill='%23FCE4EC'/><rect x='14' y='6' width='4' height='4' fill='%23FCE4EC'/><rect x='18' y='8' width='4' height='4' fill='%23FCE4EC'/><rect x='4' y='12' width='4' height='4' fill='%23FCE4EC'/><rect x='8' y='10' width='4' height='4' fill='%23FCE4EC'/><rect x='12' y='10' width='4' height='4' fill='%23FCE4EC'/><rect x='16' y='10' width='4' height='4' fill='%23FCE4EC'/><rect x='20' y='10' width='4' height='4' fill='%23FCE4EC'/><rect x='24' y='12' width='4' height='4' fill='%23FCE4EC'/><rect x='2' y='16' width='4' height='4' fill='%23FCE4EC'/><rect x='6' y='14' width='4' height='4' fill='%23FCE4EC'/><rect x='10' y='14' width='4' height='4' fill='%23FCE4EC'/><rect x='14' y='14' width='4' height='4' fill='%23FCE4EC'/><rect x='18' y='14' width='4' height='4' fill='%23FCE4EC'/><rect x='22' y='14' width='4' height='4' fill='%23FCE4EC'/><rect x='26' y='16' width='4' height='4' fill='%23FCE4EC'/><rect x='4' y='20' width='4' height='4' fill='%23FCE4EC'/><rect x='8' y='18' width='4' height='4' fill='%23FCE4EC'/><rect x='12' y='18' width='4' height='4' fill='%23FCE4EC'/><rect x='16' y='18' width='4' height='4' fill='%23FCE4EC'/><rect x='20' y='18' width='4' height='4' fill='%23FCE4EC'/><rect x='24' y='20' width='4' height='4' fill='%23FCE4EC'/><rect x='8' y='22' width='4' height='4' fill='%23FCE4EC'/><rect x='12' y='22' width='4' height='4' fill='%23FCE4EC'/><rect x='16' y='22' width='4' height='4' fill='%23FCE4EC'/><rect x='20' y='22' width='4' height='4' fill='%23FCE4EC'/><rect x='12' y='26' width='4' height='4' fill='%23FCE4EC'/><rect x='16' y='26' width='4' height='4' fill='%23FCE4EC'/></svg>");
  animation: pixel-pop 0.3s ease-out;
  border-color: var(--blush);
}
@keyframes pixel-pop {
  0% {
    transform: scale(0.8);
    box-shadow: 1px 1px 0px var(--pixel-shadow);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 3px 3px 0px var(--pixel-shadow);
  }
  100% {
    transform: scale(1);
    box-shadow: 1px 1px 0px var(--pixel-shadow);
  }
}

.bloom {
  text-align: center;
  color: #4c855f;
  font-weight: bold;
  padding: 12px 0;
  font-family: "Courier New", monospace;
  font-size: 18px;
  text-shadow: 0.5px 0.5px 0px var(--pixel-shadow);
  border: 2px solid var(--mint);
  background: #fff;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  margin: 8px 0;
  animation: bloom-grow 0.6s ease-out;
}

@keyframes bloom-grow {
  0% {
    transform: scale(0.3);
    opacity: 0;
    box-shadow: 1px 1px 0px var(--pixel-shadow);
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
    box-shadow: 3px 3px 0px var(--pixel-shadow);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 1px 1px 0px var(--pixel-shadow);
  }
}
.hidden {
  display: none;
}

.controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.about {
  margin: 24px 0 16px;
  padding: 16px;
  background: #fff;
  border: 2px solid var(--pixel-border);
  box-shadow: 1px 1px 0px var(--pixel-shadow);
}
.about h2 {
  font-family: "Courier New", monospace;
  font-weight: bold;
  margin: 0 0 8px 0;
  text-shadow: 0.5px 0.5px 0px var(--pixel-shadow);
}
.about p {
  font-family: "Courier New", monospace;
  margin: 0;
  line-height: 1.4;
}

.footer {
  margin-top: 20px;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Courier New", monospace;
}
.footer a {
  color: var(--pxgray);
  text-decoration: none;
  border-bottom: 1px solid var(--pxgray);
}
.footer a:hover {
  color: var(--blush);
  border-bottom-color: var(--blush);
}

/* accessibility */
.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Password Screen */
.password-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      1200px 600px at 50% -10%,
      var(--blush) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, var(--cream), #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.password-container {
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.password-header {
  margin-bottom: 32px;
}

.password-title {
  font-family: "Cherry Bomb One", cursive;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 16px 0 0 0;
  text-transform: lowercase;
  color: #f2c9d0;
  font-size: 1.8em;
  text-shadow: 0.5px 0.5px 0px var(--pixel-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.password-card {
  background: #fff;
  border: 3px solid var(--pixel-border);
  border-radius: 0px;
  padding: 24px;
  box-shadow: 2px 2px 0px var(--pixel-shadow);
}

.password-card h2 {
  font-family: "Courier New", monospace;
  font-weight: bold;
  margin: 0 0 16px 0;
  text-shadow: 0.5px 0.5px 0px var(--pixel-shadow);
  color: var(--ink);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-input {
  padding: 12px 16px;
  border: 2px solid var(--pixel-border);
  border-radius: 0px;
  background: #fff;
  font-size: 16px;
  font-family: "Courier New", monospace;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  text-align: center;
}

.password-input:focus {
  outline: none;
  border-color: var(--blush);
  box-shadow: 1px 1px 0px var(--blush);
}

.password-error {
  color: #a33;
  font-family: "Courier New", monospace;
  font-weight: bold;
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  border: 2px solid #a33;
  background: #fff;
  box-shadow: 1px 1px 0px #a33;
}

.main-app.hidden {
  display: none;
}

.main-app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

.install-btn {
  border: 2px solid var(--pixel-border);
  background: var(--blush);
  padding: 8px 12px;
  border-radius: 0px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  box-shadow: 1px 1px 0px var(--pixel-shadow);
  font-family: "Courier New", monospace;
  font-size: 12px;
  transition: all 0.1s ease;
}

.install-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0px var(--pixel-shadow);
}

.install-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--pixel-shadow);
}
