* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
  color: #fff;
  background:
    repeating-linear-gradient(45deg, #1a0033 0 20px, #2a0050 20px 40px);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
}

#stars {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 80%, #ff0, transparent),
    radial-gradient(2px 2px at 40% 60%, #0ff, transparent),
    radial-gradient(1px 1px at 90% 20%, #f0f, transparent),
    radial-gradient(2px 2px at 10% 90%, #fff, transparent),
    radial-gradient(1px 1px at 60% 40%, #fff, transparent);
  animation: twinkle 2s steps(2) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#cursor-trail {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
}

.trail-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  pointer-events: none;
  animation: fade 800ms ease-out forwards;
}

@keyframes fade {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.2) rotate(360deg); }
}

.top-marquee, .bottom-marquee {
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 200% 100%;
  animation: slide-bg 4s linear infinite;
  color: #000;
  font-weight: bold;
  padding: 10px 0;
  font-size: 18px;
  border-top: 4px ridge #fff;
  border-bottom: 4px ridge #fff;
  position: relative; z-index: 2;
}

@keyframes slide-bg {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px 20px 20px;
}

h1 {
  font-size: 72px;
  margin: 0;
  text-shadow: 4px 4px 0 #000, 8px 8px 0 rgba(255,0,255,0.5);
  letter-spacing: 4px;
}

h2 {
  font-size: 22px;
  margin: 10px 0;
  color: #ffff66;
  text-shadow: 2px 2px 0 #000;
}

.rainbow {
  background: linear-gradient(90deg, #ff0000, #ff8800, #ffee00, #00ff44, #00ddff, #4400ff, #ff00ff, #ff0000);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-move 3s linear infinite;
}

.rainbow-inline {
  background: linear-gradient(90deg, #ff0000, #ffee00, #00ff44, #00ddff, #ff00ff, #ff0000);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-move 2s linear infinite;
  font-weight: bold;
}

@keyframes rainbow-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

.wobble {
  display: inline-block;
  animation: wobble 1.5s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg) skewX(-2deg); }
  50% { transform: rotate(3deg) skewX(2deg); }
}

.blink {
  animation: blink 1s steps(2) infinite;
}

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

.construction {
  margin-top: 14px;
  font-size: 22px;
  font-weight: bold;
  color: #ffcc00;
  text-shadow: 2px 2px 0 #000;
}

.cone {
  display: inline-block;
  animation: bounce 0.8s ease-in-out infinite;
  font-size: 30px;
}

.cone:last-child { animation-delay: 0.4s; }

.under-text {
  display: inline-block;
  animation: shake 0.4s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes shake {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-2px, 1px); }
  75% { transform: translate(2px, -1px); }
}

.nav-bar {
  position: relative; z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  background: linear-gradient(180deg, #000080, #4040ff);
  border-top: 3px outset #8080ff;
  border-bottom: 3px outset #8080ff;
}

.nav-bar a {
  color: #fff;
  background: #000;
  border: 2px outset #ccc;
  padding: 6px 14px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.1s;
}

.nav-bar a:hover {
  background: #ffff00;
  color: #ff00ff;
  border-style: inset;
  transform: scale(1.1) rotate(-2deg);
}

main {
  position: relative; z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: rgba(0, 0, 60, 0.85);
  border: 3px ridge #ff00ff;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.card.center { text-align: center; }

.section-title {
  font-size: 26px;
  margin: 0 0 14px;
  color: #00ffff;
  text-shadow: 2px 2px 0 #ff00ff, 3px 3px 0 #000;
  border-bottom: 2px dashed #ffff00;
  padding-bottom: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.bouncing-photo {
  flex: 0 0 auto;
  animation: bounce 1.4s ease-in-out infinite;
}

.emoji-portrait {
  font-size: 100px;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #ffcc00, #ff6600);
  border: 5px ridge #fff;
  border-radius: 50%;
  box-shadow: 0 0 20px #ff0;
}

.bio { flex: 1 1 300px; font-size: 17px; line-height: 1.6; }

.sparkle {
  font-weight: bold;
  color: #ffff00;
  text-shadow: 0 0 6px #fff, 0 0 12px #ff0;
  animation: blink 0.6s steps(2) infinite;
}

.float { display: inline-block; animation: float 2s ease-in-out infinite; font-size: 28px; }
.float.d2 { animation-delay: 0.2s; }
.float.d3 { animation-delay: 0.4s; }
.float.d4 { animation-delay: 0.6s; }
.float.d5 { animation-delay: 0.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.links { list-style: none; padding: 0; font-size: 17px; line-height: 2; }
.links a { color: #00ffff; text-decoration: underline; }
.links a:hover { color: #ffff00; background: #ff00ff; }
.bullet { color: #ffff00; animation: blink 0.8s steps(2) infinite; }

.big-button {
  font-family: inherit;
  font-size: 28px;
  font-weight: bold;
  padding: 20px 40px;
  background: linear-gradient(180deg, #ff3333, #aa0000);
  color: #fff;
  border: 6px outset #ff8888;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 0 0 20px #f00;
  animation: pulse 0.8s ease-in-out infinite;
}

.big-button:hover { transform: scale(1.05); }
.big-button:active { border-style: inset; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px #f00; }
  50% { box-shadow: 0 0 40px #ff0, 0 0 60px #f0f; }
}

.hidden { display: none; }

#button-msg {
  margin-top: 16px;
  font-size: 22px;
  color: #ffff00;
  animation: shake 0.3s infinite;
}

.guestbook { margin-bottom: 14px; }
.entry {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid #00ffff;
  padding: 8px 12px;
  margin: 6px 0;
  font-size: 15px;
}
.entry b { color: #ffff66; }

#guestbook-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#guestbook-form input {
  font-family: inherit;
  padding: 8px 10px;
  border: 3px inset #888;
  background: #fff;
  color: #000;
  font-size: 15px;
  flex: 1 1 140px;
}

#guestbook-form button {
  font-family: inherit;
  padding: 8px 18px;
  background: linear-gradient(180deg, #00ff00, #008800);
  color: #000;
  font-weight: bold;
  border: 3px outset #88ff88;
  cursor: pointer;
  font-size: 15px;
}

#guestbook-form button:hover { background: #ffff00; }

.webring-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 18px;
  flex-wrap: wrap;
}
.webring-row a {
  color: #fff;
  background: #ff00ff;
  padding: 8px 16px;
  border: 3px ridge #fff;
  text-decoration: none;
  font-weight: bold;
}
.webring-row a:hover {
  background: #00ffff;
  color: #000;
}

footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 24px 12px 40px;
  font-size: 14px;
  color: #ccccff;
}

.badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  background: linear-gradient(180deg, #444, #111);
  color: #00ff00;
  border: 2px outset #888;
  padding: 4px 10px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

#visitor-count {
  background: #000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  padding: 0 6px;
  border: 2px inset #888;
}

body.flash { animation: flash-bg 200ms ease-out; }
@keyframes flash-bg {
  0% { background: #fff; }
  100% { background: inherit; }
}

body.party {
  animation: party-hue 1s linear infinite;
}
@keyframes party-hue {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@media (max-width: 600px) {
  h1 { font-size: 44px; }
  h2 { font-size: 16px; }
}
