
/* --- FONTS --- */
@font-face {
  font-family: 'SOV_PokOn';
  src: url('FOnt/SOV_PokOn.ttf') format('truetype');
  font-weight: normal;
}
@font-face {
  font-family: 'SOV_PokOn';
  src: url('FOnt/SOV_PokOn-Bold.ttf') format('truetype');
  font-weight: bold;
}

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=UnifrakturMaguntia&family=Special+Elite&family=Press+Start+2P&display=swap');

/* --- CSS RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  cursor: crosshair;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Kanit', 'SOV_PokOn', sans-serif;
  color: #b0b0b0;
  background: #0a0008;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* --- DARK STARFIELD BACKGROUND --- */
.starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -10;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(80, 0, 30, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(40, 0, 60, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at center, #0a0008 0%, #050004 50%, #000000 100%);
}

/* --- GOTHIC NEON TEXT GLOW --- */
.neon-text {
  font-family: 'UnifrakturMaguntia', 'SOV_PokOn', cursive;
  color: #cc0000;
  text-shadow:
    0 0 7px #cc0000,
    0 0 15px #880000,
    0 0 30px #660000,
    0 0 50px #440000;
  animation: redFlicker 4s infinite alternate;
}

.neon-text-purple {
  color: #9944cc;
  text-shadow:
    0 0 7px #9944cc,
    0 0 15px #662288,
    0 0 30px #441166;
  animation: redFlicker 3.5s infinite alternate;
}

@keyframes redFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 7px #cc0000,
      0 0 15px #880000,
      0 0 30px #660000,
      0 0 50px #440000;
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: 0 0 4px #550000;
    opacity: 0.7;
  }
}

/* --- DARK GRADIENT TEXT --- */
.rainbow-text {
  background: linear-gradient(90deg, #cc0000, #8b0000, #4a0033, #660066, #8b0000, #cc0000);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: darkShift 5s linear infinite;
}

@keyframes darkShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* --- MARQUEE BANNER --- */
.marquee-banner {
  background: linear-gradient(90deg, #1a0011, #330022, #1a0011, #220033, #1a0011);
  background-size: 300% 100%;
  animation: marqueeGradient 6s linear infinite;
  padding: 8px 0;
  font-size: 16px;
  font-weight: bold;
  color: #cc0000;
  border-top: 2px solid #8b0000;
  border-bottom: 2px solid #8b0000;
  text-shadow: 0 0 8px #8b0000;
  overflow: hidden;
  white-space: nowrap;
}

@keyframes marqueeGradient {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* --- BLINKING TEXT --- */
.blink {
  animation: blinkAnim 1.2s step-end infinite;
}

@keyframes blinkAnim {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* --- PAGE LAYOUT --- */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px;
}

.main-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* --- SIDEBARS & CONTENT --- */
.sidebar-left {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-center {
  flex: 1;
  min-width: 0;
}

.sidebar-right {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- GOTHIC BORDERED BOX --- */
.neon-box {
  border: 1px solid #8b0000;
  box-shadow:
    0 0 5px rgba(139, 0, 0, 0.4),
    inset 0 0 8px rgba(139, 0, 0, 0.05);
  padding: 12px;
  background: rgba(10, 0, 5, 0.85);
  position: relative;
}

.neon-box::before,
.neon-box::after {
  content: '✦';
  position: absolute;
  color: #8b0000;
  font-size: 10px;
  opacity: 0.6;
}
.neon-box::before { top: 2px; left: 5px; }
.neon-box::after  { bottom: 2px; right: 5px; }

.neon-box-purple {
  border-color: #6a0dad;
  box-shadow: 0 0 5px rgba(106, 13, 173, 0.4), inset 0 0 8px rgba(106, 13, 173, 0.05);
}
.neon-box-purple::before, .neon-box-purple::after { color: #6a0dad; }

.neon-box-silver {
  border-color: #555;
  box-shadow: 0 0 5px rgba(100, 100, 100, 0.3), inset 0 0 8px rgba(100, 100, 100, 0.05);
}
.neon-box-silver::before, .neon-box-silver::after { color: #555; }

.neon-box-crimson {
  border-color: #dc143c;
  box-shadow: 0 0 5px rgba(220, 20, 60, 0.4), inset 0 0 8px rgba(220, 20, 60, 0.05);
}
.neon-box-crimson::before, .neon-box-crimson::after { color: #dc143c; }

.neon-box h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  text-align: center;
  color: #cc0000;
  text-shadow: 0 0 8px #8b0000;
  font-family: 'UnifrakturMaguntia', cursive;
}

.neon-box-purple h3 { color: #9944cc; text-shadow: 0 0 8px #6a0dad; }
.neon-box-silver h3 { color: #999; text-shadow: 0 0 8px #555; }
.neon-box-crimson h3 { color: #dc143c; text-shadow: 0 0 8px #dc143c; }

/* --- PROFILE & AVATAR FRAME --- */
.avatar-container {
  text-align: center;
  margin: 10px 0;
}

.avatar-frame {
  display: inline-block;
  padding: 4px;
  border: 3px solid #8b0000;
  position: relative;
}

.avatar-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* --- BOUNCING & FLOATING ANIMATION --- */
.sunfish-float {
  width: 70px;
  height: auto;
  image-rendering: pixelated;
  animation: ghostFloat 7s ease-in-out infinite;
}

@keyframes ghostFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
  25%      { transform: translate(5px, -12px) rotate(3deg); opacity: 0.9; }
  50%      { transform: translate(-3px, -20px) rotate(-2deg); opacity: 0.6; }
  75%      { transform: translate(-8px, -8px) rotate(2deg); opacity: 0.85; }
}

/* --- DIVIDER --- */
.gothic-divider {
  text-align: center;
  color: #8b0000;
  letter-spacing: 6px;
  margin: 15px 0;
  font-size: 14px;
  opacity: 0.7;
}

/* --- UNDER CONSTRUCTION --- */
.under-construction {
  text-align: center;
  padding: 10px;
  background: repeating-linear-gradient(45deg, #0a0008, #0a0008 10px, #1a0012 10px, #1a0012 20px);
  border: 2px solid #8b0000;
  margin: 15px 0;
  font-size: 14px;
}

.under-construction span {
  background: #0a0008;
  color: #cc0000;
  padding: 4px 12px;
  font-weight: bold;
  text-shadow: 0 0 10px #8b0000;
  display: inline-block;
}

/* --- VISITOR COUNTER --- */
.visitor-counter {
  text-align: center;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 10px;
  color: #8b0000;
}

.counter-display {
  display: inline-block;
  background: #0a0005;
  border: 1px inset #8b0000;
  padding: 4px 10px;
  letter-spacing: 3px;
  color: #cc0000;
  text-shadow: 0 0 6px #8b0000;
  font-size: 14px;
}

/* --- RETRO PLAYER --- */
.retro-player {
  background: #0a0005;
  border: 1px inset #333;
  padding: 8px;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}

.retro-player .player-btns {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}

.retro-player .player-btns button {
  background: #1a0011;
  color: #cc0000;
  border: 1px solid #8b0000;
  padding: 4px 8px;
  cursor: pointer;
}

/* --- GUESTBOOK BUTTON --- */
.guestbook-btn {
  display: inline-block;
  background: linear-gradient(180deg, #330011 0%, #1a0008 100%);
  color: #cc0000;
  border: 1px solid #8b0000;
  padding: 8px 16px;
  font-family: 'SOV_PokOn', cursive;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  text-shadow: 0 0 5px #8b0000;
  transition: all 0.3s;
}

.guestbook-btn:hover {
  background: linear-gradient(180deg, #550022 0%, #330011 100%);
  color: #ff3333;
  box-shadow: 0 0 12px rgba(139, 0, 0, 0.5);
}

/* --- COOL LINKS --- */
.cool-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cool-links li {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
  font-size: 13px;
}

.cool-links li::before {
  content: '†';
  position: absolute;
  left: 0;
  color: #8b0000;
}

.cool-links a {
  color: #9944cc;
  text-decoration: underline;
}

.cool-links a:hover {
  color: #cc0000;
}

/* --- RETRO TABLE --- */
.retro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
}

.retro-table td {
  border: 1px solid #8b0000;
  padding: 8px;
  background: rgba(10, 0, 5, 0.7);
  color: #b0b0b0;
  font-size: 13px;
}

/* --- WEBRING BADGE --- */
.webring-badge {
  text-align: center;
  font-size: 11px;
  color: #888;
}

.webring-badge a {
  color: #9944cc;
}

/* --- HEADER TITLE --- */
.site-header {
  text-align: center;
  padding: 15px 10px;
}

.site-title {
  font-family: 'UnifrakturMaguntia', 'SOV_PokOn', cursive;
  font-size: 32px;
  margin: 8px 0;
}

.site-subtitle {
  font-size: 14px;
  color: #9944cc;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 800px) {
  .main-layout {
    flex-direction: column;
  }
  .sidebar-left, .sidebar-right {
    width: 100%;
  }
}

/* --- SEARCH & CATEGORY FILTER --- */
.search-container {
  margin-bottom: 15px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: #0a0008;
  border: 2px solid #dc143c;
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
  border-radius: 4px;
  outline: none;
  box-shadow: 0 0 8px rgba(220, 20, 60, 0.3);
}

.search-input:focus {
  border-color: #ff3366;
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.6);
}

.category-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.category-btn {
  background: #1a0011;
  color: #b0b0b0;
  border: 1px solid #8b0000;
  padding: 4px 10px;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}

.category-btn:hover, .category-btn.active {
  background: #dc143c;
  color: #ffffff;
  border-color: #ff3366;
  box-shadow: 0 0 8px rgba(220, 20, 60, 0.5);
}

/* --- GAMES GRID STYLES --- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.game-grid-card {
  background: rgba(10, 0, 5, 0.9);
  border: 2px solid #8b0000;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  text-decoration: none;
  display: block;
}

.game-grid-card:hover {
  transform: translateY(-4px);
  border-color: #ff3366;
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
}

.game-grid-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #8b0000;
}

.game-grid-title {
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 5px 4px 5px;
}

.game-grid-tag {
  display: inline-block;
  font-size: 10px;
  background: #8b0000;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* --- GUESTBOOK STYLES --- */
.guestbook-section {
  margin-top: 20px;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.guestbook-form input,
.guestbook-form select,
.guestbook-form textarea {
  width: 100%;
  padding: 8px;
  background: #0a0008;
  border: 1px solid #8b0000;
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  border-radius: 4px;
}

.guestbook-form input:focus,
.guestbook-form select:focus,
.guestbook-form textarea:focus {
  border-color: #ff3366;
  outline: none;
}

.guestbook-entry {
  border-left: 3px solid #dc143c;
  background: rgba(20, 0, 15, 0.85);
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
}

.guestbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: bold;
}

.guestbook-author {
  color: #ff3366;
}

.guestbook-meta {
  font-size: 11px;
  color: #888;
  display: flex;
  gap: 12px;
}

.guestbook-msg {
  color: #dddddd;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* --- GUESTBOOK REPLIES STYLES --- */
.guestbook-replies-list {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px dashed #9944cc;
}

.guestbook-reply-item {
  background: rgba(30, 0, 30, 0.8);
  border-left: 2px solid #9944cc;
  padding: 6px 10px;
  margin-top: 6px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}

.reply-btn-toggle {
  background: transparent;
  color: #9944cc;
  border: 1px solid #6a0dad;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 3px;
  margin-top: 6px;
  font-family: 'Kanit', sans-serif;
  transition: all 0.2s;
}

.reply-btn-toggle:hover {
  background: #6a0dad;
  color: #ffffff;
}

.reply-form-box {
  margin-top: 8px;
  padding: 8px;
  background: rgba(10, 0, 8, 0.9);
  border: 1px solid #6a0dad;
  border-radius: 4px;
}

.reply-form-box input,
.reply-form-box textarea {
  width: 100%;
  padding: 5px 8px;
  margin-bottom: 6px;
  background: #000000;
  border: 1px solid #6a0dad;
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  border-radius: 3px;
}