@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

body {
  background-image: url('/assets/images/bg_main.png');
  background-repeat: repeat;
  background-attachment: fixed;
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ── */

header {
  background: linear-gradient(to bottom, #2a2e2a 0%, #181c18 40%, #0a0c0a 100%);
  border-bottom: 4px solid #000;
  box-shadow: 0 2px 0 #3a3a3a, inset 0 -1px 0 #000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 26px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000, 4px 4px 0 #000;
  text-decoration: none;
  letter-spacing: 2px;
}

nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav a {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #c8c8c8;
  text-decoration: none;
  padding: 9px 13px;
  background: #3a3a3a;
  border: 3px solid;
  border-color: #5a5a5a #1a1a1a #1a1a1a #5a5a5a;
  text-shadow: 1px 1px 0 #000;
}

nav a:hover {
  background: #4a7a4a;
  color: #fff;
  border-color: #7ec850 #2a4a2a #2a4a2a #7ec850;
}

/* ── Panel ── */

.panel {
  background: rgba(58, 58, 58, 0.95);
  border: 4px solid #000;
  box-shadow:
    inset 2px 2px 0 #4e4e4e,
    inset -2px -2px 0 #000,
    0 4px 16px rgba(0, 0, 0, 0.6);
  padding: 28px;
  margin-bottom: 20px;
}

/* ── Section titles ── */

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: #ffd700;
  text-shadow: 2px 2px 0 #7a6000, 1px 1px 0 #000;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #111;
  letter-spacing: 1px;
}

/* ── Hero ── */

#join {
  padding: 32px 0 0;
}

#about,
#rules {
  scroll-margin-top: 32px;
}

.hero-row-top {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.hero-row-bottom {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 4px;
}

.hero-art {
  height: 200px;
  flex-shrink: 0;
  image-rendering: pixelated;
  align-self: center;
  padding-top: 10px;
}

.hero-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #666;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 16px;
  letter-spacing: 3px;
}

.server-ip-box {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.server-ip {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: #fff;
  background: #050505;
  border: 4px solid;
  border-color: #111 #555 #555 #111;
  padding: 14px 20px;
  flex: 1;
  min-width: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  user-select: all;
  display: flex;
  align-items: center;
}

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 12px 50px;
  background: #555;
  border: 4px solid;
  border-color: #888 #222 #222 #888;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  line-height: 1;
}

.btn:hover {
  background: #6c8c6c;
  border-color: #aaffaa #2a5a2a #2a5a2a #aaffaa;
}

.btn:active {
  background: #4a6a4a;
  border-color: #2a5a2a #aaffaa #aaffaa #2a5a2a;
  transform: translateY(1px);
}

.btn-green {
  background: #3d7a27;
  border-color: #7ec850 #1a3a10 #1a3a10 #7ec850;
}

.btn-green:hover {
  background: #4d9a37;
}


.server-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 16px;
  background: #050505;
  border: 3px solid;
  border-color: #111 #3a3a3a #3a3a3a #111;
  flex-shrink: 0;
}

.status-signal {
  image-rendering: pixelated;
  height: 24px;
  width: auto;
  flex-shrink: 0;
}

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

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.status-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}

.status-label.loading { color: #444; }
.status-label.online  { color: #7ec850; text-shadow: 1px 1px 0 #1a3a00; }
.status-label.offline { color: #cc4444; text-shadow: 1px 1px 0 #440000; }
.status-label.unknown { color: #888; }

.hero-tagline {
  flex: 1;
  min-width: 0;
  font-size: 26px;
  line-height: 1.55;
  color: #c8c8c8;
  text-shadow: 1px 1px 0 #000;
}

/* ── About ── */

.about-text {
  font-size: 22px;
  line-height: 1.65;
  color: #d0d0d0;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 22px;
}

.about-text:last-child {
  margin-bottom: 0;
}

.about-text a {
  color: #7ec850;
  text-decoration: none;
}

.about-text a:hover {
  color: #aaffaa;
}

/* ── Rules notice ── */

.rules-notice {
  background: #110e00;
  border: 3px solid #5a4400;
  box-shadow: inset 1px 1px 0 #2a2000, inset -1px -1px 0 #000;
  padding: 16px 20px;
  margin-bottom: 22px;
  font-size: 20px;
  color: #ffd700;
  text-shadow: 1px 1px 0 #3a2a00;
  line-height: 1.55;
}

.rules-notice::before {
  content: '⚠  ';
}


/* ── How to Join ── */

.steps {
  list-style: none;
  padding: 0;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 22px;
  color: #d0d0d0;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.5;
}

.steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #7ec850;
  text-shadow: 1px 1px 0 #1a3a00;
  background: #0d1a0d;
  border: 3px solid;
  border-color: #3a6a3a #0a1a0a #0a1a0a #3a6a3a;
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steps li strong {
  color: #fff;
}

.steps li code {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #7ec850;
  background: #050505;
  border: 2px solid #2a2a2a;
  padding: 2px 8px;
}

/* ── Rules ── */

.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 22px;
  color: #d0d0d0;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.5;
}

.rules-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rule-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #ffd700;
  text-shadow: 1px 1px 0 #7a6000;
  flex-shrink: 0;
  min-width: 30px;
}

/* ── Footer ── */

footer {
  background: rgba(0, 0, 0, 0.92);
  border-top: 4px solid #000;
  box-shadow: inset 0 2px 0 #2a2a2a;
  padding: 28px 0;
  margin-top: 8px;
  text-align: center;
}

footer p {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #666;
  text-shadow: 1px 1px 0 #000;
  line-height: 2.4;
}

footer a {
  color: #7ec850;
  text-decoration: none;
}

footer a:hover {
  color: #aaffaa;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .logo {
    font-size: 18px;
  }

  .header-inner {
    justify-content: center;
  }

  .hero-row-top {
    flex-direction: column;
  }

  .hero-row-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-art {
    align-self: center;
    padding-top: 4px;
  }

  nav a {
    font-size: 9px;
    padding: 7px 9px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .server-ip {
    font-size: 14px;
    padding: 12px 14px;
  }

  .panel {
    padding: 20px 16px;
  }
}

/* ── News listing ── */

#news,
#not-found {
  padding: 32px 0 0;
}

.section-title a {
  color: inherit;
  text-decoration: none;
}

.section-title a:hover {
  color: #ffe84d;
}

.news-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 2px solid #111;
}

.news-card-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.news-date {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #aaa;
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-card-image {
  margin-top: 14px;
  margin-bottom: 0;
}

.news-excerpt {
  margin: 12px 0 0;
}

.news-read-more {
  padding: 8px 20px;
  font-size: 10px;
  margin-top: 12px;
}

.news-empty {
  font-size: 20px;
  color: #c0c0c0;
}

/* ── Pagination ── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 32px;
}

.pagination-info {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #888;
  text-shadow: 1px 1px 0 #000;
}

.btn-disabled {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 12px 50px;
  background: #2a2a2a;
  border: 4px solid;
  border-color: #3a3a3a #111 #111 #3a3a3a;
  color: #444;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  line-height: 1;
  cursor: default;
  pointer-events: none;
}

/* ── Post page ── */

.post-back {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 18px;
}

.post-back a {
  color: #7ec850;
  text-decoration: none;
  text-shadow: 1px 1px 0 #1a3a00;
}

.post-back a:hover {
  color: #aaffaa;
}

.post-article {
  padding-top: 32px;
}

.post-card .post-body {
  margin-top: 16px;
}

.post-header-image {
  display: block;
  width: 100%;
  aspect-ratio: 1048 / 400;
  object-fit: cover;
  margin-top: 16px;
  border: 4px solid #000;
  box-shadow:
    inset 2px 2px 0 #4e4e4e,
    inset -2px -2px 0 #000,
    0 4px 16px rgba(0, 0, 0, 0.6);
  margin-bottom: 24px;
}

.post-body {
  font-size: 22px;
  line-height: 1.65;
  color: #d0d0d0;
  text-shadow: 1px 1px 0 #000;
}

.post-body p {
  margin-bottom: 18px;
}

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

.post-body h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #ffd700;
  text-shadow: 2px 2px 0 #7a6000, 1px 1px 0 #000;
  margin-bottom: 16px;
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
  letter-spacing: 1px;
}

.post-body h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #7ec850;
  text-shadow: 1px 1px 0 #1a3a00;
  margin-bottom: 12px;
  margin-top: 22px;
}

.post-body ul,
.post-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.post-body li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.post-body strong {
  color: #fff;
}

.post-body a {
  color: #7ec850;
  text-decoration: none;
}

.post-body a:hover {
  color: #aaffaa;
}

.post-body code {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #7ec850;
  background: #050505;
  border: 2px solid #2a2a2a;
  padding: 2px 8px;
}

@media (max-width: 600px) {
  .news-title {
    font-size: 10px;
  }

  .post-body h2 {
    font-size: 10px;
  }
}
