/* Rubik: поўная падтрымка беларускай (і, ё, ў) */
@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@500;700&family=Rubik+Mono:wght@500;700&display=swap");

:root {
  --hot-pink: #ff3399;
  --sun: #ffcc00;
  --cyan: #33ccff;
  --brick: #c44d2a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rubik", "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    linear-gradient(135deg, #ffe8f0 0%, #fff5d6 40%, #e8f4ff 100%);
  color: #2a1520;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(2px 2px at 15% 25%, rgba(255, 51, 153, 0.5), transparent),
    radial-gradient(2px 2px at 75% 60%, rgba(255, 204, 0, 0.5), transparent),
    radial-gradient(2px 2px at 50% 80%, rgba(51, 204, 255, 0.4), transparent);
  animation: twinkle 2s step-end infinite;
}

@keyframes twinkle {
  50% { opacity: 0.35; }
}

.ie-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 7px 12px;
  background: linear-gradient(#2a3a6e, #1a2548);
  color: #a8d8ff;
  font-family: "Rubik", Tahoma, Arial, sans-serif;
  font-size: 12px;
  border-bottom: 3px solid var(--sun);
  z-index: 10;
  position: relative;
}

.spin-at {
  display: inline-block;
  font-size: 22px;
  color: var(--sun);
  animation: spin 2s linear infinite;
}

.visitor {
  color: #7fff7f;
  font-family: "Rubik Mono", "Rubik", "Courier New", monospace;
  font-size: 9px;
}

.banner {
  background: repeating-linear-gradient(
    -45deg,
    var(--brick),
    var(--brick) 10px,
    #8b3a22 10px,
    #8b3a22 20px
  );
  border-bottom: 4px dashed var(--hot-pink);
  position: relative;
  z-index: 10;
}

.banner marquee {
  font-family: "Rubik Mono", "Rubik", "Courier New", monospace;
  font-size: clamp(7px, 1.8vw, 10px);
  color: #fff8e0;
  text-shadow: 1px 1px #000;
  padding: 5px 0;
}

.banner-2 {
  background: #1a1020;
  color: #ff9933 !important;
}

.stage {
  position: relative;
  z-index: 5;
  max-width: 620px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.popup-fake {
  width: 100%;
  max-width: 360px;
  padding: 0.7rem 2rem 0.7rem 0.85rem;
  background: #c0c0c0;
  border: 3px outset #eee;
  font-family: "Rubik", Tahoma, Arial, sans-serif;
  font-size: 13px;
  position: relative;
}

.popup-fake.hidden { display: none; }

.popup-title { margin: 0 0 0.3rem; color: #000080; font-weight: bold; }
.popup-small { font-size: 11px; color: #555; margin: 0.35rem 0 0; }

.popup-close {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 22px;
  height: 22px;
  border: 2px outset #ddd;
  background: #c0c0c0;
  cursor: pointer;
}

.title {
  font-family: "Rubik Mono", "Rubik", "Courier New", monospace;
  font-size: clamp(11px, 3.2vw, 20px);
  text-align: center;
  line-height: 1.65;
  color: var(--hot-pink);
  text-shadow: 3px 3px var(--sun), -1px -1px var(--cyan);
  margin: 0;
}

.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
}

.glitch::before {
  color: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 38%, 0 38%);
  animation: glitch-a 0.35s infinite;
}

.glitch::after {
  color: #ff6666;
  clip-path: polygon(0 62%, 100% 62%, 100% 100%, 0 100%);
  animation: glitch-b 0.35s infinite;
}

@keyframes glitch-a {
  50% { transform: translate(-2px, 1px); }
}

@keyframes glitch-b {
  50% { transform: translate(2px, -1px); }
}

.rainbow-hr {
  width: 100%;
  height: 6px;
  border: none;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, violet, red);
  background-size: 200% 100%;
  animation: rainbow-move 2s linear infinite;
}

@keyframes rainbow-move {
  to { background-position: 200% 0; }
}

.subtitle {
  font-size: 1.35rem;
  background: var(--sun);
  color: #2a1520;
  padding: 0.35rem 1.1rem;
  border: 4px ridge var(--hot-pink);
  box-shadow: 5px 5px 0 #2a1520;
  margin: 0;
}

.wobble {
  animation: wobble 1s ease-in-out infinite;
}

@keyframes wobble {
  50% { transform: rotate(2deg) scale(1.03); }
}

.spin-emoji {
  display: inline-block;
  animation: spin 3s linear infinite;
}

.spin-emoji.reverse {
  animation-direction: reverse;
}

.surprise-zone {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 200px;
}

.mystery-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.frame-spin {
  padding: 10px;
  background: conic-gradient(from 0deg, #f06, #fc0, #6f6, #3cf, #66f, #f6f, #f06);
  animation: spin 3s linear infinite;
}

.photo-bevel {
  border: 5px inset #bbb;
  background: #888;
  line-height: 0;
}

.mystery-img {
  display: block;
  width: min(280px, 80vw);
  height: min(280px, 80vw);
  object-fit: cover;
}

.hint {
  display: block;
  margin-top: 8px;
  font-family: "Rubik Mono", "Rubik", "Courier New", monospace;
  font-size: 10px;
  color: var(--hot-pink);
}

.blink-hard,
.blink,
.hint.blink {
  animation: blink 0.55s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0.35; }
}

.reveal {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

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

.reveal.is-open {
  display: flex;
  animation: fade-in 0.4s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-text {
  font-family: "Rubik", Impact, Arial, sans-serif;
  font-size: 1.8rem;
  margin: 0;
}

.rainbow {
  background: linear-gradient(90deg, #f06, #fc0, #6c6, #3cf, #93f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-move 2s linear infinite;
}

.reveal-frame {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, var(--hot-pink), var(--sun));
  border: 5px solid #fff;
  box-shadow: 0 0 24px rgba(255, 51, 153, 0.45);
}

.reveal-img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border: 4px double #fff;
  background: #fff;
}

.pop-in {
  animation: pop-in 0.75s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

@keyframes pop-in {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.maria-line {
  font-size: 1.15rem;
  background: linear-gradient(90deg, #ffd6e8, #fff3b0, #ffd6e8);
  border: 3px solid var(--sun);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin: 0;
  text-align: center;
}

.wave-letter {
  display: inline-block;
  animation: wave 0.55s ease-in-out infinite;
}

.wave-letter:nth-child(2) { animation-delay: 0.08s; }
.wave-letter:nth-child(3) { animation-delay: 0.16s; }
.wave-letter:nth-child(4) { animation-delay: 0.24s; }
.wave-letter:nth-child(5) { animation-delay: 0.32s; }

@keyframes wave {
  50% { transform: translateY(-6px); color: var(--hot-pink); }
}

.shake {
  animation: shake 0.4s ease-in-out infinite;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.reveal-marquee {
  width: 100%;
  background: #1a1020;
  color: #9f9;
  padding: 5px 0;
  font-weight: bold;
}

.fake-player {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(#555, #333);
  border: 3px inset #777;
  color: #afa;
  font-family: "Rubik", Tahoma, sans-serif;
  font-size: 12px;
}

.player-label {
  flex: 1;
}

.player-label--post {
  display: none;
}

body.revealed .player-label--pre {
  display: none;
}

body.revealed .player-label--post {
  display: inline;
}

.fake-eq {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}

.fake-eq span {
  width: 4px;
  background: #6f6;
  animation: eq 0.45s ease-in-out infinite alternate;
}

.fake-eq span:nth-child(2) { animation-delay: 0.1s; }
.fake-eq span:nth-child(3) { animation-delay: 0.2s; }
.fake-eq span:nth-child(4) { animation-delay: 0.15s; }
.fake-eq span:nth-child(5) { animation-delay: 0.05s; }

@keyframes eq {
  from { height: 4px; }
  to { height: 16px; }
}

.guestbook-fake {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.link-dead {
  color: #00c;
  background: #d4d4d4;
  border: 2px outset #eee;
  padding: 6px 14px;
  font-size: 13px;
  font-family: "Rubik", Arial, sans-serif;
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 0.5rem 0 1rem;
  font-size: 11px;
  color: #666;
}

body.revealed .fake-eq span {
  animation-duration: 0.2s;
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 800;
  overflow: hidden;
}

.firework {
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  left: 0;
  top: 0;
  box-shadow: 0 0 6px currentColor;
  animation: spark-fly 0.9s ease-out forwards;
}

@keyframes spark-fly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.2);
    opacity: 0;
  }
}

.congrats-burst {
  text-align: center;
  width: 100%;
  margin-bottom: 0.25rem;
}

.congrats-line {
  font-family: "Rubik", Impact, Arial, sans-serif;
  margin: 0.15rem 0;
  opacity: 0;
  transform: scale(0.5) translateY(20px);
}

.congrats-burst.is-active .line-1 {
  animation: congrats-pop 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) 0.1s forwards;
  color: var(--hot-pink);
  font-size: 2rem;
  text-shadow: 2px 2px var(--sun);
}

.congrats-burst.is-active .line-2 {
  animation: congrats-pop 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) 0.35s forwards;
  color: #ff6600;
  font-size: 1.6rem;
}

.congrats-burst.is-active .line-3 {
  animation: congrats-pop 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) 0.6s forwards;
  color: #3399ff;
  font-size: 1.6rem;
}

.congrats-burst.is-active .line-4 {
  animation: congrats-pop 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) 0.85s forwards;
  color: #9933cc;
  font-size: 1.3rem;
}

@keyframes congrats-pop {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -12px;
  z-index: 999;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(540deg);
    opacity: 0;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
