/* ~*~ geckok0mori — black & green retro stylesheet ~*~ */

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

:root {
  --black: #000000;
  --bg: #050805;
  --surface: #0d120d;
  --surface-light: #141a14;
  --border-dark: #1a2e1a;
  --border-light: #3d6b3d;
  --green-bright: #00ff41;
  --green: #33ff66;
  --green-muted: #228b22;
  --green-dim: #1a5c1a;
  --green-dark: #0d3d0d;
  --green-glow: #00ff4180;
  --text: #00cc33;
  --text-muted: #448844;
  --text-dim: #2a662a;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: var(--text);
  background: var(--black);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='14' x='4' y='1' fill='%2300ff41'/%3E%3C/svg%3E"), auto;
}

/* Background image */

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 8, 0, 0.65)),
    url("background.png") center / cover no-repeat fixed;
}

/* Title bar */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #4a0080, #6a0dad);
  color: #ffffff;
  padding: 3px 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  border-bottom: 1px solid #8b3dcc;
}

.title-bar-buttons {
  letter-spacing: 2px;
  color: #ffffff;
}

.welcome-marquee {
  background: var(--black);
  color: var(--green-bright);
  font-weight: bold;
  padding: 4px 0;
  border-bottom: 3px ridge var(--border-light);
  text-shadow: 0 0 8px var(--green-glow);
}

/* Layout */

.page-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 900px;
  margin: 16px auto;
  padding: 0 12px;
}

.sidebar {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Windows-style boxes — dark with green bevel */

.winbox {
  border: 2px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--black), 0 0 12px #00ff4115;
}

.winbox-title {
  background: linear-gradient(90deg, var(--green-dark), var(--green-dim));
  color: var(--green-bright);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  text-shadow: 0 0 6px var(--green-glow);
}

.winbox-body {
  padding: 12px;
  background: var(--surface);
  color: var(--text);
}

/* Links */

a {
  color: var(--green-bright);
  text-decoration: underline;
}

a:visited {
  color: var(--green-muted);
}

a:hover {
  color: var(--black);
  background: var(--green-bright);
  text-shadow: none;
}

/* Sidebar nav */

.nav-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-box a {
  font-weight: bold;
}

.webring {
  text-align: center;
  font-size: 12px;
}

.under-construction .winbox-body {
  background: var(--surface-light);
}

.construction-icon {
  font-size: 2.5rem;
  animation: wiggle 0.5s ease-in-out infinite alternate;
  filter: hue-rotate(80deg);
}

@keyframes wiggle {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

/* Hero */

.hero-body {
  text-align: center;
  background: linear-gradient(180deg, #0a0f0a 0%, #0d150d 50%, #050a05 100%);
  border-top: 1px solid var(--border-dark);
}

.hero-body h1 {
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 3rem;
  margin: 8px 0;
  color: var(--green-bright);
  text-shadow: 0 0 12px var(--green-glow);
  letter-spacing: 2px;
}

.tagline {
  font-style: italic;
  color: var(--green-muted);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.hot {
  color: var(--green-bright);
  font-weight: bold;
  text-shadow: 0 0 8px var(--green-glow);
}

/* Title bar pulse — smooth solid-color fade, no gradient jump */

.rainbow {
  animation: green-pulse 2s ease-in-out infinite;
}

@keyframes green-pulse {
  0%, 100% { background-color: var(--green-dark); }
  50%       { background-color: var(--green-dim); }
}

/* Blink */

.blink {
  animation: blink 1s step-start infinite;
}

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

/* Buttons */

.win-btn {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 16px;
  margin-top: 8px;
  background: var(--surface-light);
  color: var(--green-bright);
  border: 2px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  cursor: pointer;
  text-decoration: none;
}

.win-btn:hover {
  background: var(--green-dark);
  color: var(--green-bright);
  box-shadow: 0 0 10px var(--green-glow);
}

.win-btn:active {
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  padding: 5px 15px 3px 17px;
}

.win-btn.big {
  font-size: 15px;
  padding: 8px 20px;
}

.win-btn:disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}

/* About table */

.about-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Courier New", Courier, monospace;
}

.about-table strong {
  color: var(--green-bright);
}

.about-photo {
  width: 120px;
  vertical-align: top;
}

.avatar {
  display: block;
  width: 100%;
  height: auto;
}

.avatar-frame {
  border: 2px solid var(--green-muted);
  background: var(--black);
  padding: 4px;
  text-align: center;
}

/* Form — guestbook */

.guestbook-form fieldset {
  border: 2px groove var(--border-light);
  padding: 12px;
  background: var(--surface-light);
}

.guestbook-form legend {
  font-weight: bold;
  color: var(--green-bright);
  padding: 0 6px;
}

.guestbook-form label {
  display: block;
  margin-top: 8px;
  font-weight: bold;
  font-size: 13px;
  color: var(--green-muted);
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 4px;
  border: 2px inset var(--border-dark);
  background: var(--black);
  color: var(--green-bright);
  margin-top: 2px;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  outline: 1px solid var(--green-bright);
  box-shadow: 0 0 8px var(--green-glow);
}

.guestbook-form textarea {
  resize: vertical;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: var(--text-dim);
}

code {
  font-family: "Courier New", monospace;
  background: var(--black);
  color: var(--green-bright);
  padding: 1px 4px;
  border: 1px solid var(--border-dark);
}

/* MIDI player */

.midi-label {
  color: var(--green-bright);
  font-weight: bold;
  font-size: 12px;
}

.fake-equalizer {
  display: flex;
  justify-content: center;
  gap: 3px;
  height: 24px;
  align-items: flex-end;
  margin: 8px 0;
}

/* MIDI player */

.midi-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.midi-soundfont-label {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: bold;
  color: var(--green-muted);
}

.midi-soundfont {
  width: 100%;
  margin-top: 4px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 4px;
  background: var(--black);
  color: var(--green-bright);
  border: 2px inset var(--border-dark);
}

.midi-status {
  margin-top: 8px;
  min-height: 1.2em;
}

.fake-equalizer span {
  display: block;
  width: 6px;
  background: var(--green-bright);
  box-shadow: 0 0 4px var(--green-glow);
  height: 4px;
}

.fake-equalizer.playing span {
  animation: eq 0.6s ease-in-out infinite alternate;
}

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

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

/* Utilities */

.dotted {
  border: none;
  border-top: 2px dotted var(--border-light);
  margin: 10px 0;
}

.tiny {
  font-size: 11px;
  color: var(--text-muted);
}

.center {
  text-align: center;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 20px 12px 32px;
  color: var(--green-muted);
  font-size: 12px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  background: var(--surface);
  color: var(--green-bright);
  border: 2px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 6px 10px;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.3;
}

.footer-copy {
  color: var(--text-muted);
  margin: 8px 0;
}

.email-link a {
  color: var(--green-bright);
  font-weight: bold;
}

.email-link a:visited {
  color: var(--green-muted);
}

/* Blog */

.blog-header {
  margin-bottom: 0;
}

.fic-header {
  margin-bottom: 0;
}

.fic-entry .winbox-body p {
  margin-bottom: 0.75rem;
}

.fic-entry .winbox-body p:last-child {
  margin-bottom: 0;
}

.fic-meta {
  color: var(--green-muted);
  font-size: 12px;
  font-style: italic;
  margin-bottom: 0.75rem !important;
}

.fic-entry .win-btn {
  display: inline-block;
  margin-top: 0.25rem;
}

.fic-construction {
  margin: 0.5rem 0 1rem;
  text-align: center;
}

.fic-construction img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: none;
}

.fic-banner {
  margin: 0;
  text-align: center;
}

.fic-banner img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: none;
}

.blog-post .winbox-body p {
  margin-bottom: 0.75rem;
}

.blog-post .winbox-body p:last-child {
  margin-bottom: 0;
}

.blog-date {
  color: var(--green-muted);
  font-size: 12px;
  font-style: italic;
  margin-bottom: 0.75rem !important;
}

.blog-post .blog-img {
  margin: 0.75rem 0;
  text-align: center;
}

.blog-figure {
  margin: 0.75rem 0;
  text-align: center;
}

/* Keep blog photos readable — full column width blows up large uploads */
.blog-figure img,
.blog-post .blog-img img:not(.blog-img-manga) {
  display: block;
  width: auto;
  max-width: min(100%, 22rem);
  max-height: 18rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border: 2px solid var(--border-light);
}

.blog-caption {
  margin: 0.5rem 0 0;
  color: var(--green-muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.blog-post-nameday .blog-caption {
  max-width: 20rem;
}

.blog-post-nameday .blog-figure img {
  max-width: min(100%, 20rem);
  max-height: 16rem;
}

.blog-post .blog-img-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0.75rem 0;
  text-align: center;
}

.blog-post .blog-img-row img {
  height: 96px;
  width: auto;
  max-width: 30%;
  object-fit: contain;
  border: none;
}

.blog-post .blog-img img.blog-img-manga {
  height: 80px;
  width: auto;
  max-width: 100%;
  border: none;
  object-fit: contain;
}

.blog-post .blog-inline-emoji {
  display: inline;
  height: 1.5em;
  width: auto;
  vertical-align: -0.25em;
  margin-left: 0.15em;
  border: none;
}

/* Virtual Observer comments (iframe) */

.comments-body {
  background: var(--surface-light);
  padding: 0;
}

.comments-body .tiny {
  margin: 12px;
  margin-bottom: 0;
}

.comments-iframe {
  display: block;
  min-height: 520px;
  border: 0;
  background: transparent;
}

/* Responsive */

@media (max-width: 640px) {
  .sidebar {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar .winbox {
    flex: 1 1 140px;
  }

  .hero-body h1 {
    font-size: 2rem;
  }
}
