/* Global Styles */
body {
  background-color: #fafafa;
  color: #111;
  font-family: 'Georgia', serif;
  padding: 40px;
  max-width: 800px;
  margin: auto;
}

h1, h2 {
  font-family: 'Verdana', sans-serif;
}

footer {
  font-size: 0.8em;
  color: #777;
  margin-top: 100px;
  border-top: 1px solid #ccc;
  padding-top: 20px;
}

/* Header Glitch Effect */
.glitch {
  color: #333;
  position: relative;
}
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  color: #d33;
  z-index: -1;
  opacity: 0.6;
}

/* Navigation Bar */
.fake-nav {
  margin-top: 20px;
  padding: 10px 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.fake-nav a {
  margin: 0 10px;
  color: #555;
  text-decoration: none;
}
.fake-nav a:hover {
  text-decoration: underline;
}

/* Amenities Box */
.amenities {
  background: #f3f3f3;
  padding: 20px;
  border: 1px solid #ddd;
}

/* CTA Button */
.cta {
  display: block;
  margin: 40px auto;
  padding: 12px 24px;
  background-color: #222;
  color: white;
  font-size: 1.2em;
  text-align: center;
  width: fit-content;
  text-decoration: none;
  border: 1px solid #444;
}

/* Booking Form */
form {
  margin-top: 30px;
  background: #f3f3f3;
  padding: 20px;
  border: 1px solid #ccc;
}
label {
  display: block;
  margin-top: 15px;
}
input {
  padding: 8px;
  width: 100%;
  font-size: 1em;
  margin-top: 5px;
  border: 1px solid #aaa;
}
button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  border: none;
  font-size: 1em;
  cursor: pointer;
}

/* Confirmation Receipt */
.receipt {
  background: #f3f3f3;
  padding: 30px;
  border: 1px solid #ccc;
  font-family: monospace;
  white-space: pre-wrap;
  margin-top: 30px;
}

/* Secret Hint Box */
.secret {
  margin-top: 20px;
  background: #1a1a1a;
  color: #ccc;
  padding: 15px;
  border-left: 5px solid #aa3333;
  font-family: Georgia, serif;
  display: none;
}

/* Force reveal secret */
.secret.show {
  display: block;
}

/* See More Button */
.see-more {
  display: block;
  margin: 40px auto;
  padding: 10px 20px;
  background: #333;
  color: white;
  font-family: monospace;
  text-decoration: none;
  border: 1px solid #999;
  cursor: pointer;
  position: relative;
}
.see-more:hover {
  background: #444;
}

/* Optional flicker animation */
.glitch-button::after {
  content: "See More Entries";
  position: absolute;
  left: 2px;
  top: 0;
  color: #c33;
  opacity: 0.6;
  z-index: -1;
  animation: flicker 1s infinite alternate;
}
@keyframes flicker {
  0% { opacity: 0.6; left: 2px; }
  100% { opacity: 0.2; left: -2px; }
}

/* Guestbook Entries */
.guestbook-entries {
  margin-top: 30px;
}
.entry {
  background: #f9f9f9;
  border-left: 4px solid #aaa;
  padding: 15px 20px;
  margin-bottom: 20px;
}
.glitch-link {
  display: block;
  text-align: center;
  margin: 50px auto;
  font-weight: bold;
  text-decoration: none;
  color: #111;
  position: relative;
}
.glitch-link::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  color: red;
  opacity: 0.5;
  z-index: -1;
}

/* Guestbook Form (Fake) */
.guestbook-form {
  margin-top: 30px;
  background: #f3f3f3;
  padding: 20px;
  border: 1px solid #ccc;
}
.guestbook-form label {
  display: block;
  margin-top: 15px;
}
.guestbook-form input,
.guestbook-form textarea {
  padding: 8px;
  width: 100%;
  font-size: 1em;
  margin-top: 5px;
  border: 1px solid #aaa;
  font-family: Georgia, serif;
}
.guestbook-form button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  border: none;
  font-size: 1em;
  cursor: pointer;
  font-family: 'Georgia', serif;
}

/* White Text Utility */
.white-text {
  color: white;
}

.see-more-fake {
  display: block;
  margin: 50px auto 30px auto;
  padding: 12px 28px;
  background-color: #222;
  border: 1px solid #111;
  color: white;
  font-family: 'Georgia', serif;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  width: fit-content;
  transition: background-color 0.3s ease;
}

.see-more-fake:hover {
  background-color: #333;
}

.missing-page {
  cursor: crosshair;
}

.flicker-scope {
  animation: cursorFlicker 1.2s infinite;
}

@keyframes cursorFlicker {
  0%, 10%, 100% {
    opacity: 1;
    cursor: crosshair;
  }
  5%, 95% {
    opacity: 0.2;
    cursor: none;
  }
}

.flicker-body {
  background-color: #0a0a0a;
  color: #e0e0e0;
  font-family: monospace;
  animation: flickerAnim 1.3s infinite;
  text-shadow:
    0 0 1px #ff0000,
    1px 0 1px #00ffff,
    -1px 0 1px #ff00ff;
  filter: contrast(1.2) brightness(1.05);
}

@keyframes flickerAnim {
  0%   { opacity: 0.95; transform: translate(0, 0); }
  15%  { opacity: 0.4; transform: translate(-1px, 0); }
  30%  { opacity: 0.85; transform: translate(1px, 1px); }
  45%  { opacity: 0.3; transform: translate(-2px, 1px); }
  60%  { opacity: 0.8; transform: translate(1px, -1px); }
  75%  { opacity: 0.5; transform: translate(0, 2px); }
  100% { opacity: 0.92; transform: translate(0, 0); }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.photo {
  position: relative;
  border: 2px solid #111;
  background: #f2f2f2;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%) contrast(220%) brightness(70%) blur(1px);
  transition: 0.3s ease;
}

.photo:hover img {
  filter: none;
}

.caption {
  font-family: monospace;
  font-size: 0.9rem;
  color: #666;
  margin: 0.5rem 0 1rem;
}

.fragment-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 10, 0.9);
  color: #00ffff;
  padding: 6px 10px;
  font-size: 1.4rem;
  font-family: monospace;
  border: 1px solid #444;
  box-shadow: 0 0 6px #ff00ff;
  text-shadow: 0 0 2px #00ffff, 1px 1px 2px #ff00ff;
  pointer-events: none;
  z-index: 2;
}

.caption {
  font-size: 0.9em;
  color: #555;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

@keyframes glitch-out {
  0% {
    transform: translate(0, 0);
    filter: none;
  }
  20% {
    transform: translate(-2px, 1px);
    filter: hue-rotate(90deg) contrast(200%) brightness(150%);
  }
  40% {
    transform: translate(2px, -2px);
    filter: grayscale(100%) blur(1px);
  }
  60% {
    transform: translate(1px, 2px);
    filter: sepia(1) saturate(2);
  }
  80% {
    transform: translate(-1px, 0);
    filter: contrast(120%) hue-rotate(-45deg);
  }
  100% {
    transform: translate(0, 0);
    filter: none;
  }
}

.glitch-flash {
  animation: glitch-out 0.6s ease-in-out;
}

.glitch-fail {
  animation: glitch-fail-anim 0.4s ease-in-out;
}

@keyframes glitch-fail-anim {
  0% {
    transform: none;
    filter: none;
  }
  20% {
    transform: translate(1px, -1px);
    filter: grayscale(1) brightness(1.4) hue-rotate(20deg);
  }
  40% {
    transform: translate(-2px, 2px);
    filter: contrast(2) blur(1px);
  }
  60% {
    transform: translate(2px, -1px);
    filter: hue-rotate(-30deg) grayscale(0.5);
  }
  80% {
    transform: translate(-1px, 1px);
    filter: brightness(0.9) contrast(1.2);
  }
  100% {
    transform: none;
    filter: none;
  }
}

.glitch-success {
  animation: glitch-success-anim 0.6s ease-in-out;
}

@keyframes glitch-success-anim {
  0% {
    transform: none;
    filter: none;
  }
  20% {
    transform: translate(1px, 1px);
    filter: hue-rotate(45deg) brightness(1.3);
  }
  40% {
    transform: translate(-2px, -2px);
    filter: contrast(2) blur(1px);
  }
  60% {
    transform: translate(2px, 0px);
    filter: hue-rotate(-30deg) brightness(0.8);
  }
  80% {
    transform: translate(-1px, 1px);
    filter: grayscale(1) contrast(1.5);
  }
  100% {
    transform: none;
    filter: none;
  }
}

#loading-overlay {
  pointer-events: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  color: #00ffcc;
  font-family: monospace;
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

#loading-overlay.show {
  font-family: monospace;
  letter-spacing: 0.05em;
  text-shadow: 0 0 2px #0ff, 0 0 5px #f0f, 1px 1px 2px #000;
  background: #000;
  animation: flickerScreen 1.4s infinite;
}

@keyframes flickerScreen {
  0%   { background-color: #000; }
  20%  { background-color: #111; }
  40%  { background-color: #000; }
  60%  { background-color: #222; }
  80%  { background-color: #000; }
  100% { background-color: #111; }
}