/* reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fcfcfc;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  padding: 30px 20px;
  text-align: center;
}

header {
  margin-bottom: 40px;
}

.main-title {
  font-size: 32px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stretch {
  letter-spacing: 2px;
}

.subtitle {
  font-size: 18px;
  color: #666;
}

.gallery-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 50px;
}

.gallery-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  object-fit: contain;
}

.label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  word-wrap: break-word;
}

footer {
  font-size: 13px;
  color: #999;
  margin-top: 50px;
}

/* rainbow gradient text */
.rainbow {
  background: linear-gradient(90deg, violet, indigo);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

#secret-btn {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 9999;
}

#password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

#password-modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  text-align: center;
}

.modal-content input {
  padding: 6px;
  margin: 10px 0;
  width: 160px;
}

.modal-content button {
  padding: 6px 12px;
  cursor: pointer;
}

#error-msg {
  color: red;
  font-size: 12px;
}

.blurred body > *:not(#password-modal) {
  filter: blur(5px);
}

.secret-page.blurred::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9997;
}

.play-mode .gallery-wrapper {
  position: relative;
  height: 200px;
  transition: all 0.6s ease;
}

.gallery-item.brick {
  position: absolute;
  transition: transform 0.6s ease, opacity 0.6s ease;
  width: 128px;
  height: 128px;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.gallery-item.brick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item.broken {
  opacity: 0;
  transform: scale(0.8) rotate(6deg);
  pointer-events: none;
  filter: blur(2px);
}

#paddle {
  position: fixed;
  bottom: 30px;
  width: 100px;
  height: 14px;
  background: linear-gradient(to right, violet, indigo);
  border-radius: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  box-shadow: 0 0 10px violet, 0 0 20px indigo;
  transition: all 0.2s ease;
}

#ball {
  position: fixed;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top left, indigo, violet);
  border-radius: 50%;
  z-index: 999;
  box-shadow: 0 0 8px violet;
  transition: all 0.2s ease;
}

