/* Miku Colors */
:root {
  --miku-teal: #39c5bb;
  --miku-dark: #1a6f7b;
  --miku-pink: #ff7eb9;
  --miku-white: #f8faff;
  --miku-gray: #e0f7fa;
}

body {
  font-family: 'Segoe UI', 'Noto Sans JP', Arial, sans-serif;
  background: var(--miku-white);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

header,
.white-header {
  background: var(--miku-teal);
  color: white;
  padding: 1.2em 0 1em 0;
  text-align: center;
  letter-spacing: 2px;
  box-shadow: none;
}
.white-header h1 {
  margin: 0;
  color: white;
  font-family: inherit;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: none;
}

nav {
  background: var(--miku-dark);
  padding: 0.7em 0;
  text-align: center;
  box-shadow: none;
}
nav a {
  color: white;
  margin: 0 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
  padding: 7px 16px;
  border-radius: 16px;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
nav a:hover, nav a:focus {
  background: var(--miku-pink);
  color: var(--miku-dark);
  text-decoration: none;
}

h1, h2 {
  text-align: center;
  color: var(--miku-teal);
  font-family: inherit;
  font-weight: 800;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  letter-spacing: 1px;
}

button {
  padding: 10px 22px;
  background: var(--miku-teal);
  color: white;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 1em;
  font-weight: 600;
  box-shadow: none;
  transition: background 0.2s, transform 0.1s;
}
button:hover {
  background: var(--miku-pink);
  color: var(--miku-dark);
  transform: translateY(-1px) scale(1.03);
}

#currency {
  text-align: center;
  font-size: 1.1em;
  margin-top: 10px;
  color: var(--miku-dark);
  font-weight: 600;
  letter-spacing: 1px;
}

.image-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  transition: box-shadow 0.2s;
  /* Allow container to grow wider for landscape images */
  height: 180px;
  min-width: 120px;
  max-width: 320px;
}
.image-container:hover {
  box-shadow: 0 2px 8px rgba(57,197,187,0.10);
}

.image {
  height: 180px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  display: block;
  background: var(--miku-gray);
  transition: filter 0.2s;
  box-shadow: none;
  object-fit: contain;
}

.locked {
  filter: grayscale(1) blur(4px) brightness(0.85);
  opacity: 0.6;
}

#viewer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

#clicker {
  display: block;
  margin: 32px auto 0 auto;
  border-radius: 50%;
  box-shadow: none;
  transition: transform 0.1s;
  max-width: 90vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.fullscreen-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); /* Slightly transparent black */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fullscreen-img {
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
  border: none;
}

.favorite-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--miku-pink);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
  z-index: 2;
  box-shadow: none;
  transition: background 0.2s;
}
.favorite-btn.favorited {
  background: gold;
  color: #333;
}
.favorite-btn:hover {
  background: var(--miku-teal);
  color: white;
}

::-webkit-scrollbar {
  width: 8px;
  background: var(--miku-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--miku-teal);
  border-radius: 8px;
}

/* Center the random button */
#showRandom {
  display: block;
  margin: 20px auto;
}

#menuIcon span, #menuIcon span:before, #menuIcon span:after {
  background: #fff !important;
}

#questMenuOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1000;
}
#questMenu,
#statsMenu {
  position: fixed;
  top: 80px; /* was 60px */
  right: 100px;
  background: #fff;
  color: #222;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 24px 32px;
  min-width: 260px;
  z-index: 1001;
  font-size: 1rem;
  display: none;
}
#questMenu h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #39c5bb;
  font-size: 1.15em;
}
#questMenuClose {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3em;
  color: #888;
  cursor: pointer;
}
#questMenuIcon {
  position: absolute;
  top: 20px;
  right: 80px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#questMenuIcon svg {
  width: 28px;
  height: 28px;
  display: block;
}
@media (max-width: 600px) {
  #questMenu {
    right: 10px;
    left: 10px;
    min-width: unset;
    padding: 18px 8px;
  }
  #questMenuIcon {
    right: 60px !important;
  }
}