/* ===== STARFIELD BACKGROUND ===== */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes twinkle2 {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.1; }
}
@keyframes blink {
  0%, 49% { visibility: visible; }
  50%, 100% { visibility: hidden; }
}
@keyframes rainbow {
  0% { color: #ff0000; }
  16% { color: #ff8800; }
  33% { color: #ffff00; }
  50% { color: #00ff00; }
  66% { color: #0088ff; }
  83% { color: #8800ff; }
  100% { color: #ff0000; }
}
@keyframes rainbowBg {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes constructionSlide {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}
@keyframes cursor-blink {
  0%, 49% { border-right-color: #00ff00; }
  50%, 100% { border-right-color: transparent; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  0%, 100% { text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff; }
  50% { text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff; }
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: #000011;
  color: #00ff00;
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield layers */
body::before, body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 10% 20%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 20% 80%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 30% 10%, #ffffaa 100%, transparent),
    radial-gradient(1px 1px at 40% 60%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 50% 40%, #aaffff 100%, transparent),
    radial-gradient(1px 1px at 60% 90%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 70% 30%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 80% 70%, #ffaaff 100%, transparent),
    radial-gradient(1px 1px at 90% 50%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 15% 45%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 25% 95%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 35% 55%, #aaffaa 100%, transparent),
    radial-gradient(1px 1px at 45% 15%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 55% 75%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 65% 25%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 75% 85%, #ffffaa 100%, transparent),
    radial-gradient(1px 1px at 85% 45%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 95% 65%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 5% 70%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 48% 88%, #ffffff 100%, transparent);
  animation: twinkle 3s ease-in-out infinite;
}
body::after {
  background-image:
    radial-gradient(1px 1px at 12% 35%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 22% 65%, #ffaaaa 100%, transparent),
    radial-gradient(1px 1px at 32% 85%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 42% 25%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 52% 55%, #aaaaff 100%, transparent),
    radial-gradient(1px 1px at 62% 15%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 72% 75%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 82% 35%, #aaffaa 100%, transparent),
    radial-gradient(1px 1px at 92% 95%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 8% 52%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 18% 12%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 28% 42%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 38% 72%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 58% 32%, #ffffaa 100%, transparent),
    radial-gradient(1px 1px at 68% 62%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 78% 8%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 88% 52%, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 98% 28%, #ffffff 100%, transparent);
  animation: twinkle2 4s ease-in-out infinite;
}

.geocities-wrapper {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

/* ===== CONSTRUCTION BANNER ===== */
.construction-banner {
  background: repeating-linear-gradient(
    -45deg,
    #ffcc00,
    #ffcc00 10px,
    #000000 10px,
    #000000 20px
  );
  animation: constructionSlide 1s linear infinite;
  padding: 4px;
  margin-bottom: 10px;
}
.construction-banner-inner {
  background: #ffcc00;
  text-align: center;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: bold;
  color: #000;
}
.construction-banner-inner span {
  margin: 0 6px;
}

/* ===== RAINBOW HR ===== */
.rainbow-hr {
  border: none;
  height: 4px;
  background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0000);
  background-size: 200% 100%;
  animation: rainbowBg 3s linear infinite;
  margin: 12px 0;
}

/* ===== HEADER ===== */
.geo-header {
  text-align: center;
  padding: 15px 10px;
}
.geo-header h1 {
  font-size: clamp(28px, 7vw, 48px);
  margin: 0;
  animation: rainbow 4s linear infinite;
  text-shadow: 2px 2px 0 #000;
  line-height: 1.2;
}
.geo-header .subtitle {
  color: #ffff00;
  font-size: clamp(12px, 3vw, 16px);
  margin-top: 6px;
  animation: glow 2s ease-in-out infinite;
}
.blink {
  animation: blink 1s step-start infinite;
}
.star-decoration {
  font-size: 18px;
  animation: spin 4s linear infinite;
  display: inline-block;
}

/* ===== MARQUEE ===== */
.marquee-container {
  overflow: hidden;
  background: #000066;
  border: 2px inset #808080;
  padding: 6px 0;
  margin: 10px 0;
}
.marquee-text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 15s linear infinite;
  color: #ffff00;
  font-weight: bold;
  font-size: 16px;
}

/* ===== CONTENT TABLE ===== */
.geo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 3px ridge #808080;
  background: rgba(0, 0, 50, 0.85);
  margin: 10px 0;
}
.geo-table td {
  padding: 12px 15px;
  border: 1px ridge #404080;
  vertical-align: top;
}
.geo-table td.sidebar {
  width: 30%;
  text-align: center;
  border-right: 2px ridge #808080;
}

/* ===== LINKS ===== */
a {
  color: #00ffff;
}
a:visited {
  color: #ff88ff;
}
a:hover {
  color: #ffff00;
  text-decoration: underline overline;
}

/* ===== BUTTONS ===== */
.geo-button {
  display: inline-block;
  background: linear-gradient(180deg, #6666ff 0%, #0000aa 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 12px 30px;
  border: 3px outset #8888ff;
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(16px, 4vw, 22px);
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  cursor: pointer;
  transition: none;
  animation: bounce 2s ease-in-out infinite;
}
.geo-button:hover {
  background: linear-gradient(180deg, #8888ff 0%, #2222cc 100%);
  border-style: inset;
}
.geo-button:active {
  border-style: inset;
  transform: translateY(2px);
  animation: none;
}

/* ===== VISITOR COUNTER ===== */
.visitor-counter {
  display: inline-block;
  background: #000;
  border: 2px inset #808080;
  padding: 3px 8px;
  font-family: 'Courier New', monospace;
  font-size: 20px;
  color: #00ff00;
  letter-spacing: 3px;
}

/* ===== GUESTBOOK ===== */
.guestbook-link {
  display: inline-block;
  background: #220044;
  border: 2px outset #8800ff;
  padding: 6px 15px;
  color: #ff88ff !important;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 13px;
}
.guestbook-link:hover {
  background: #440066;
  border-style: inset;
}

/* ===== WEBRING ===== */
.webring {
  text-align: center;
  background: rgba(0, 0, 80, 0.7);
  border: 2px ridge #808080;
  padding: 10px;
  margin: 10px 0;
  font-size: 12px;
  color: #aaaaaa;
}
.webring a {
  margin: 0 10px;
}

/* ===== BADGES ===== */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 31px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: bold;
  font-family: 'Verdana', 'Geneva', sans-serif;
  border: 1px solid #555;
  text-decoration: none !important;
  letter-spacing: 0.5px;
}
.badge-nn { background: linear-gradient(180deg, #003366 0%, #001a33 100%); color: #88ccff; border-color: #004488; }
.badge-ie { background: linear-gradient(180deg, #003399 0%, #001166 100%); color: #66bbff; border-color: #0044aa; }
.badge-html { background: linear-gradient(180deg, #cc6600 0%, #993300 100%); color: #ffcc88; border-color: #cc6600; }
.badge-noframes { background: linear-gradient(180deg, #660000 0%, #330000 100%); color: #ff8888; border-color: #880000; }
.badge-free { background: linear-gradient(180deg, #006600 0%, #003300 100%); color: #88ff88; border-color: #008800; }
.badge-ruby { background: linear-gradient(180deg, #cc0000 0%, #880000 100%); color: #ffaaaa; border-color: #cc0000; }

/* ===== EMAIL LINK ===== */
.email-bounce span {
  display: inline-block;
  animation: bounce 0.6s ease-in-out infinite;
}
.email-bounce span:nth-child(2) { animation-delay: 0.05s; }
.email-bounce span:nth-child(3) { animation-delay: 0.1s; }
.email-bounce span:nth-child(4) { animation-delay: 0.15s; }
.email-bounce span:nth-child(5) { animation-delay: 0.2s; }
.email-bounce span:nth-child(6) { animation-delay: 0.25s; }
.email-bounce span:nth-child(7) { animation-delay: 0.3s; }
.email-bounce span:nth-child(8) { animation-delay: 0.35s; }
.email-bounce span:nth-child(9) { animation-delay: 0.4s; }
.email-bounce span:nth-child(10) { animation-delay: 0.45s; }

/* ===== ASCII ART ===== */
.ascii-art {
  font-family: 'Courier New', monospace;
  font-size: clamp(6px, 1.5vw, 12px);
  line-height: 1.15;
  color: #00ff88;
  white-space: pre;
  text-align: center;
  margin: 10px auto;
  overflow-x: auto;
}

/* ===== MIDI PLAYER ===== */
.midi-player {
  margin-top: 4px;
}
.midi-btn {
  background: linear-gradient(180deg, #333366 0%, #111133 100%);
  color: #00ff00;
  border: 2px outset #666699;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 1px;
}
.midi-btn:hover {
  background: linear-gradient(180deg, #444477 0%, #222244 100%);
  color: #88ff88;
}
.midi-btn:active {
  border-style: inset;
}
.midi-btn.playing {
  color: #ffff00;
  border-color: #ffff00;
}
.midi-eq {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: #00ff00;
  letter-spacing: 1px;
}

/* ===== FOOTER ===== */
.geo-footer {
  text-align: center;
  padding: 15px 10px;
  font-size: 11px;
  color: #666699;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .geo-table td.sidebar {
    display: block;
    width: 100%;
    border-right: none;
    border-bottom: 2px ridge #808080;
  }
  .geo-table td.main-content {
    display: block;
    width: 100%;
  }
  .geo-table tr {
    display: block;
  }
}
