/* ===================================
   KALSERVERS.COM — Pixelated Grey-Bright Retro Theme
   =================================== */

/* Press Start 2P font loaded via <link> in head.ejs */

:root {
  --bg-primary: #d4d0c8;
  --bg-secondary: #c8c4bc;
  --bg-card: #e8e6e0;
  --bg-card-hover: #f0eeea;
  --bg-input: #ffffff;
  --bg-dark-panel: #2a2a2e;
  --border: #a0a0a0;
  --border-light: #b8b8b8;
  --border-dark: #808080;
  --border-highlight: #ffffff;
  --gold: #b8860b;
  --gold-dim: #996e09;
  --gold-glow: rgba(184, 134, 11, 0.15);
  --gold-text: #8b6914;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #707070;
  --text-link: #1a3a6a;
  --green: #2d8a2d;
  --red: #b22222;
  --orange: #cc7700;
  --blue: #1a5276;
  --radius: 2px;
  --radius-lg: 4px;
  --shadow: 1px 1px 0 #808080, -1px -1px 0 #ffffff;
  --shadow-lg: 2px 2px 0 #808080, -1px -1px 0 #ffffff;
  --shadow-inset: inset 1px 1px 2px #808080, inset -1px -1px 0 #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
  --font-pixel: 'Press Start 2P', monospace;
  --transition: 0.15s ease;
  --pixel-border: 2px solid #808080;
}

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

/* KAL Online custom cursors */
html { scroll-behavior: smooth; image-rendering: auto; cursor: url('/static/img/kal-cursor.png'), auto; }
a, button, .btn, [role="button"], input[type="submit"], .server-card-link, .hero-filter-pill, .trending-card, .pagination-btn {
  cursor: url('/static/img/kal-cursor-pointer.png'), pointer;
}
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,0.015) 1px, rgba(0,0,0,0.015) 2px),
    repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0,0,0,0.015) 1px, rgba(0,0,0,0.015) 2px);
  background-size: 4px 4px;
}

a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Pixelated image treatment */
.pixel-img { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ===== RETRO PANEL MIXIN ===== */
.retro-panel {
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 3px;
}
.retro-panel-inner {
  border: 1px solid;
  border-color: #a0a0a0 #dfdfdf #dfdfdf #a0a0a0;
  padding: 12px;
}

/* ===== NAVIGATION ===== */
.nav {
  background: var(--bg-secondary);
  border-bottom: 2px solid;
  border-bottom-color: #808080;
  box-shadow: 0 1px 0 #ffffff inset;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  flex-shrink: 0;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}
.nav-logo:hover { text-decoration: none; }
.nav-logo-icon { font-size: 1.3rem; image-rendering: pixelated; }
.nav-logo-yinyang { width: 24px; height: 24px; vertical-align: middle; margin-right: 2px; }
.nav-logo-dot { color: var(--text-muted); font-weight: 400; }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-link {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
  padding: 4px 10px;
  border: 2px solid transparent;
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: #ffffff #808080 #808080 #ffffff;
  text-decoration: none;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-user { color: var(--gold-text); font-size: 0.85rem; font-weight: 600; }
.nav-user-icon { margin-right: 4px; }
.nav-link-dim { color: var(--text-muted); }
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; flex-direction: column; position: absolute; top: 52px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 2px solid #808080; padding: 12px 24px; gap: 8px; }
  .nav-links.open, .nav-actions.open { display: flex; }
  .nav-mobile-toggle { display: block; margin-left: auto; }
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
  background: var(--gold);
  color: #fff;
  text-align: center;
  padding: 6px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: var(--bg-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  color: var(--text-primary);
}
.btn:hover { text-decoration: none; }
.btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 9px 15px 7px 17px;
}
.btn-gold {
  background: linear-gradient(180deg, #daa520 0%, #b8860b 100%);
  color: #fff;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
.btn-gold:hover { background: linear-gradient(180deg, #e6b422 0%, #cc9a0d 100%); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 2px solid var(--border); }
.btn-ghost:hover { background: var(--bg-card); }
.btn-vote {
  background: linear-gradient(180deg, #daa520 0%, #b8860b 100%);
  color: #fff;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
}
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-small { padding: 4px 10px; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn-details {
  padding: 3px 10px;
  font-size: 0.68rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  text-decoration: none;
  letter-spacing: 0.4px;
  font-family: var(--font-pixel);
}
.btn-details:hover { background: var(--bg-card); color: var(--text-primary); text-decoration: none; }
.server-card-name-link { color: inherit; text-decoration: none; }
.server-card-name-link:hover { color: #daa520; text-decoration: underline; }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: var(--bg-dark-panel);
  border-bottom: 3px solid #808080;
  padding: 0;
  text-align: center;
  overflow: hidden;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('/static/img/hero-bg.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.35) saturate(0.5) contrast(1.1);
  image-rendering: auto;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(42,42,46,0.4) 0%, rgba(42,42,46,0.7) 60%, rgba(42,42,46,0.95) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px);
  background-size: 100% 100%, 4px 4px;
}
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-content { position: relative; max-width: 720px; margin: 0 auto; padding: 16px 24px 6px; z-index: 2; }
.hero-title {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 6px;
  letter-spacing: 1px;
  color: #e0e0e0;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 rgba(255,255,255,0.1);
}
.hero-gold {
  color: #daa520;
  text-shadow: 2px 2px 0 #000, 0 0 20px rgba(218, 165, 32, 0.3);
}
.hero-subtitle { color: #b0b0b0; font-size: 0.85rem; margin-bottom: 10px; }

.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto 8px;
  gap: 0;
}
.hero-search-input {
  flex: 1;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
}
.hero-search-input:focus { border-color: var(--gold); }
.hero-search-btn { border-left: none; }

.hero-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; }
.hero-filter-pill {
  padding: 4px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #c0c0c0;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition);
}
.hero-filter-pill:hover { border-color: #daa520; color: #daa520; background: rgba(218,165,32,0.1); text-decoration: none; }

.hero-medallion {
  display: none;
}
.hero-medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #daa520;
  box-shadow: 0 0 20px rgba(218, 165, 32, 0.3), 2px 2px 0 #000;
  image-rendering: pixelated;
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 4px;
  padding: 6px 24px 12px;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  display: block;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  font-weight: 400;
  color: #daa520;
  text-shadow: 1px 1px 0 #000;
}
.hero-stat-label { color: #909090; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; }

.bottom-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

@media (max-width: 768px) {
  .hero { min-height: 400px; }
  .hero-title { font-size: 1rem; }
  .hero-search { flex-direction: column; gap: 6px; }
  .hero-stats { gap: 16px; }
  .hero-stat-value { font-size: 0.9rem; }
  .hero-medallion { width: 100px; height: 100px; }
}

/* ===== CHARACTER DECORATIONS ===== */
.hero-character-left, .hero-character-right {
  position: absolute;
  top: 0;
  z-index: 1;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0.25;
  filter: grayscale(0.5) brightness(0.8);
  image-rendering: pixelated;
  pointer-events: none;
}
#hero-monster-viewer {
  width: 280px;
  height: 100%;
  top: 0;
  opacity: 0.92;
  filter: none;
  pointer-events: auto;
  image-rendering: auto;
  z-index: 3;
}
#hero-monster-viewer canvas { display: block; }
.hero-character-left { left: 25%; }
.hero-character-right { right: 25%; transform: scaleX(-1); }
@media (max-width: 1024px) { .hero-character-left, .hero-character-right { display: none; } }

/* ===== MAIN & SECTIONS ===== */
.main { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 32px 0; }
.section-header { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; position: relative; }
.section-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0px, var(--border) 4px, transparent 4px, transparent 8px);
  max-width: 200px;
}
.section-icon { margin-right: 4px; }
.section-link { color: var(--gold-text); font-size: 0.85rem; font-weight: 600; position: absolute; right: 0; }
.section-count { color: var(--text-muted); font-size: 0.85rem; }

/* ===== SERVER CARDS ===== */
.server-list { display: flex; flex-direction: column; gap: 8px; max-width: 820px; margin-left: auto; margin-right: auto; }

.server-card-link { text-decoration: none; color: inherit; display: block; }
.server-card-link:hover { text-decoration: none; }

.server-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  transition: all var(--transition);
}
.server-card:hover { background: var(--bg-card-hover); }
.server-card-featured {
  border-color: #daa520;
  background: linear-gradient(135deg, rgba(218,165,32,0.05), var(--bg-card));
}

.server-rank { min-width: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.15); border-right: 1px solid var(--border); flex-shrink: 0; }
.rank-num {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.rank-badge { font-size: 1.2rem; display: block; line-height: 1; }
.server-rank-1 .rank-num { color: #daa520; }
.server-rank-2 .rank-num { color: #a0a0a0; }
.server-rank-3 .rank-num { color: #cd7f32; }

.server-card-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.server-card-banner { width: 100%; overflow: hidden; flex-shrink: 0; border-bottom: 1px solid var(--border); background: #111; }
.server-card-banner img { width: 100%; height: auto; display: block; }
.server-card-banner-link { display: block; cursor: pointer; transition: opacity 0.15s ease; }
.server-card-banner-link:hover { opacity: 0.88; }
.server-card-banner-placeholder { width: 100%; height: 50px; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); font-size: 1.1rem; }
.banner-placeholder-name { font-family: var(--font-display); font-size: 0.9rem; color: var(--text-secondary); }

.server-card-body { padding: 8px 12px; flex: 1; }
.server-card-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }

.server-card-desc { color: var(--text-secondary); font-size: 0.78rem; line-height: 1.4; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.server-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tag-rate { color: var(--gold-text); border-color: var(--gold); background: rgba(218,165,32,0.08); }
.tag-engine { color: var(--blue); border-color: var(--blue); background: rgba(26,82,118,0.06); }
.tag-category { color: var(--green); border-color: var(--green); background: rgba(45,138,45,0.06); }
.tag-small { font-size: 0.68rem; padding: 0 6px; }

.server-card-systems { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.system-pill { padding: 1px 6px; font-size: 0.68rem; background: rgba(184,134,11,0.08); color: var(--gold-text); border: 1px solid rgba(184,134,11,0.2); }
.system-pill-more { background: var(--bg-secondary); color: var(--text-muted); }

.server-card-right { width: 130px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-left: 1px solid var(--border); background: rgba(0,0,0,0.08); }

.server-card-status { }
.status-badge { font-size: 0.7rem; font-weight: 700; padding: 2px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.status-online { background: rgba(45,138,45,0.15); color: var(--green); border: 1px solid var(--green); }
.status-offline { background: rgba(128,128,128,0.15); color: var(--text-muted); border: 1px solid var(--text-muted); }

.server-card-votes { text-align: center; }
.vote-count { font-family: var(--font-pixel); font-size: 1rem; font-weight: 400; color: var(--text-primary); display: block; }
.vote-label { color: var(--text-muted); font-size: 0.7rem; }

.server-card-rating { font-size: 0.82rem; color: var(--gold); }

.star { color: var(--gold); }

@media (max-width: 768px) {
  .server-card { flex-wrap: wrap; }
  .server-card-banner img { max-height: 60px; object-fit: contain; }
  .server-rank { min-width: 30px; flex-direction: row; gap: 4px; border-right: none; border-bottom: 1px solid var(--border); width: 100%; padding: 4px; }
  .server-card-left { width: 100%; }
  .server-card-right { width: 100%; flex-direction: row; justify-content: space-around; border-left: none; border-top: 1px solid var(--border); }
}

/* ===== TRENDING GRID ===== */
.server-grid-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.trending-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  transition: all var(--transition);
  text-decoration: none;
}
.trending-card:hover { background: var(--bg-card-hover); text-decoration: none; }
.trending-name { font-weight: 700; color: var(--text-primary); font-size: 0.9rem; }
.trending-votes { color: var(--green); font-size: 0.82rem; font-weight: 700; }

/* ===== FILTERS BAR ===== */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}
.filter-input, .filter-select {
  padding: 6px 10px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
}
.filter-input { flex: 1; min-width: 140px; }
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--gold); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination-btn {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.pagination-btn:hover { background: var(--bg-card-hover); text-decoration: none; }
.pagination-btn.active {
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  border-color: #daa520;
}

/* ===== FAIRNESS BANNER ===== */
.fairness-banner {
  margin: 32px 0;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-align: center;
  position: relative;
}
.fairness-inner { position: relative; }
.fairness-inner h2 {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.fairness-inner p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 20px; font-size: 0.9rem; line-height: 1.7; }
.fairness-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.fairness-point {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.fairness-icon { font-size: 1.1rem; }

/* ===== CTA SECTION ===== */
.cta-section { text-align: center; padding: 48px 0; }
.cta-section h2 { font-family: var(--font-pixel); font-size: 0.85rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.cta-section p { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }

/* ===== AUTH PAGES ===== */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 200px); padding: 40px 24px; }
.auth-card {
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 32px;
  max-width: 420px;
  width: 100%;
}
.auth-title { font-family: var(--font-pixel); font-size: 0.75rem; text-align: center; margin-bottom: 8px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.auth-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 20px; font-size: 0.85rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-footer { text-align: center; margin-top: 16px; color: var(--text-secondary); font-size: 0.85rem; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
.form-hint { font-size: 0.72rem; color: var(--text-muted); }
.input, .textarea {
  padding: 8px 12px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.88rem;
  transition: border-color var(--transition);
}
.input:focus, .textarea:focus { outline: none; border-color: var(--gold); }
.textarea { resize: vertical; min-height: 72px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-span-2 { grid-column: span 2; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: span 1; }
}

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; }
.checkbox-label input { accent-color: var(--gold); }

/* ===== ALERTS ===== */
.alert { padding: 10px 14px; border: 2px solid; margin-bottom: 14px; font-size: 0.85rem; }
.alert-error { background: rgba(178, 34, 34, 0.08); border-color: var(--red); color: var(--red); }
.alert-success { background: rgba(45, 138, 45, 0.08); border-color: var(--green); color: var(--green); }
.alert-warning { background: rgba(204, 119, 0, 0.08); border-color: var(--orange); color: var(--orange); }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 2px 8px; font-size: 0.72rem; font-weight: 700; border: 1px solid; }
.badge-online { background: rgba(45,138,45,0.1); color: var(--green); border-color: var(--green); }
.badge-offline { background: rgba(112,112,112,0.1); color: var(--text-muted); border-color: var(--border); }
.badge-new { background: rgba(26,82,118,0.1); color: var(--blue); border-color: var(--blue); }
.badge-pending { background: rgba(204,119,0,0.1); color: var(--orange); border-color: var(--orange); }
.badge-approved { background: rgba(45,138,45,0.1); color: var(--green); border-color: var(--green); }
.badge-rejected { background: rgba(178,34,34,0.1); color: var(--red); border-color: var(--red); }
.badge-suspended { background: rgba(178,34,34,0.1); color: var(--red); border-color: var(--red); }
.badge-sponsor { background: var(--gold-glow); color: var(--gold); border-color: var(--gold); }

/* ===== SERVER DETAIL ===== */
.breadcrumb { padding: 14px 0; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); }

.server-detail { padding-bottom: 32px; }
.server-detail-banner { overflow: hidden; margin-bottom: 20px; height: 80px; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; }
.server-detail-banner img { width: 100%; height: 80px; object-fit: cover; display: block; }
.server-detail-banner-placeholder {
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}
.banner-placeholder-icon { font-size: 2.5rem; }

.server-detail-header { margin-bottom: 20px; }
.server-detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.server-detail-name { font-family: var(--font-display); font-size: 1.8rem; }
.server-detail-badges { display: flex; gap: 6px; }
.server-detail-meta { color: var(--text-muted); font-size: 0.82rem; display: flex; gap: 14px; margin-top: 6px; align-items: center; }
.unclaimed-badge { background: var(--orange); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: var(--radius); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }

/* Claim Section */
.claim-section { margin-top: 32px; padding: 24px; background: var(--bg-card); border: var(--pixel-border); border-radius: var(--radius-lg); }
.claim-inner { max-width: 640px; }
.claim-title { font-family: var(--font-pixel); font-size: 0.85rem; color: var(--gold-text); margin-bottom: 8px; }
.claim-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; }
.claim-form { display: flex; flex-direction: column; gap: 10px; }
.claim-form label { font-weight: 600; font-size: 0.85rem; }
.claim-form textarea { resize: vertical; min-height: 60px; }
.claim-status { padding: 10px 14px; border-radius: var(--radius); font-size: 0.88rem; font-weight: 500; }
.claim-pending { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.claim-approved { background: #d4edda; color: #155724; border: 1px solid #28a745; }
.claim-rejected { background: #f8d7da; color: #721c24; border: 1px solid #dc3545; margin-bottom: 12px; }

.server-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 900px) { .server-detail-grid { grid-template-columns: 1fr; } }

.server-detail-main { min-width: 0; }
.server-detail-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* Stats bar */
.stat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  margin-bottom: 20px;
}
.stat-bar-item { text-align: center; flex: 1; min-width: 70px; }
.stat-bar-value { display: block; font-family: var(--font-pixel); font-size: 0.75rem; font-weight: 400; }
.stat-bar-label { color: var(--text-muted); font-size: 0.72rem; }

/* Info table */
.info-table { margin-bottom: 20px; }
.info-table h2 { font-family: var(--font-pixel); font-size: 0.65rem; margin-bottom: 10px; color: var(--gold-text); text-transform: uppercase; letter-spacing: 1px; }
.info-table table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.info-table td:first-child { color: var(--text-secondary); width: 130px; font-weight: 600; }

.detail-section { margin-bottom: 20px; }
.detail-section h2 { font-family: var(--font-pixel); font-size: 0.65rem; margin-bottom: 10px; color: var(--gold-text); text-transform: uppercase; letter-spacing: 1px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.server-description { color: var(--text-secondary); line-height: 1.7; font-size: 0.92rem; }

/* Vote chart */
.vote-chart {
  height: 180px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 14px;
  position: relative;
}

/* Sidebar cards */
.vote-card, .links-card, .share-card {
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 16px;
}
.vote-card h3, .links-card h3, .share-card h3 { font-family: var(--font-pixel); font-size: 0.6rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.vote-card { border-color: #daa520; }

.link-item { display: block; padding: 6px 0; color: var(--text-secondary); border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.link-item:last-child { border-bottom: none; }
.link-item:hover { color: var(--gold); }

.copy-url { display: flex; gap: 6px; }
.copy-input { flex: 1; font-size: 0.78rem; }

/* Cooldown */
.cooldown-timer { text-align: center; }
.cooldown-timer p { color: var(--text-secondary); margin-bottom: 6px; font-size: 0.85rem; }
.cooldown-display { font-family: var(--font-pixel); font-size: 1rem; color: var(--gold); font-weight: 400; }

/* ===== REVIEWS ===== */
.review-form { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.star-rating-input { display: flex; gap: 4px; }
.star-rating-input label { cursor: pointer; }
.star-rating-input input { display: none; }
.star-input { font-size: 1.3rem; color: var(--text-muted); transition: color var(--transition); }
.star-rating-input label:hover .star-input,
.star-rating-input input:checked ~ .star-input,
.star-rating-input label:has(input:checked) .star-input { color: var(--gold); }

.reviews-list { display: flex; flex-direction: column; gap: 10px; }
.review-card {
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-stars { display: flex; gap: 2px; }
.star-filled { color: var(--gold) !important; }
.review-author { font-weight: 700; font-size: 0.82rem; }
.review-date { color: var(--text-muted); font-size: 0.78rem; }
.review-title { font-size: 0.92rem; margin-bottom: 3px; }
.review-body { color: var(--text-secondary); font-size: 0.85rem; }

/* ===== VOTE PAGE ===== */
.vote-page-card {
  max-width: 460px;
  width: 100%;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 32px;
  text-align: center;
}
.vote-banner { margin: 14px 0; border: 1px solid var(--border); }
.vote-server-info { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.vote-form { display: flex; flex-direction: column; gap: 14px; }
.vote-btn-icon { font-size: 1.1rem; }

/* ===== DASHBOARD ===== */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.dash-stat-card {
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-align: center;
}
.dash-stat-value { display: block; font-family: var(--font-pixel); font-size: 0.85rem; font-weight: 400; color: var(--gold); }
.dash-stat-label { color: var(--text-muted); font-size: 0.8rem; }

.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th, .dashboard-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.dashboard-table th { color: var(--text-muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-secondary); }
.dashboard-table tr:hover { background: var(--bg-card-hover); }

.api-key-display { font-size: 0.72rem; background: var(--bg-secondary); padding: 3px 6px; border: 1px solid var(--border); word-break: break-all; font-family: monospace; }

/* ===== ARCHIVE ===== */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.archive-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  background: var(--bg-card);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  transition: all var(--transition);
  text-decoration: none;
}
.archive-card:hover { background: var(--bg-card-hover); text-decoration: none; }
.archive-month { font-family: var(--font-pixel); font-size: 0.7rem; color: var(--text-primary); }
.archive-link { color: var(--gold-text); font-size: 0.82rem; }

/* ===== GUIDE ARTICLES ===== */
.guide-article { max-width: 780px; margin: 0 auto; padding: 32px 0 48px; }
.guide-article h1 { font-family: var(--font-pixel); font-size: 0.85rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.guide-intro { font-size: 1rem; color: var(--text-secondary); margin-bottom: 28px; }
.guide-article h2 { font-family: var(--font-pixel); font-size: 0.7rem; color: var(--gold-text); margin: 28px 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.guide-article p { color: var(--text-secondary); margin-bottom: 10px; line-height: 1.7; }
.guide-article ul, .guide-article ol { color: var(--text-secondary); margin: 0 0 14px 24px; }
.guide-article li { margin-bottom: 6px; }
.guide-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.guide-table td { padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.guide-table td:first-child { color: var(--text-secondary); }

/* ===== CODE BLOCKS ===== */
.code-block {
  background: var(--bg-secondary);
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 14px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 3px solid #808080;
  margin-top: 32px;
  padding: 36px 24px 20px;
  background: var(--bg-secondary);
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-brand { max-width: 280px; }
.footer-logo { font-family: var(--font-pixel); font-size: 0.65rem; color: var(--gold); letter-spacing: 1px; }
.footer-tagline { color: var(--text-secondary); font-size: 0.82rem; margin-top: 8px; }
.footer-note { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }
.footer-links { display: flex; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h4 { font-size: 0.78rem; color: var(--text-primary); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { color: var(--text-muted); font-size: 0.82rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 1280px; margin: 24px auto 0; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-muted); font-size: 0.78rem; text-align: center; }

@media (max-width: 640px) {
  .footer-links { flex-direction: column; gap: 20px; }
}

/* ===== UTILITIES ===== */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-small { font-size: 0.82rem; }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 2px dashed var(--border);
}
.empty-state a { color: var(--gold); font-weight: 700; }
.empty-state a:hover { text-decoration: underline; }

/* ===== PARTICLES (subtle, pixel-style) ===== */
@keyframes fall {
  0% { transform: translateY(-10vh) translateX(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.2; }
  100% { transform: translateY(110vh) translateX(60px); opacity: 0; }
}
.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: #daa520;
  opacity: 0.2;
  animation: fall 14s linear infinite;
}
.hero-particles::before { left: 25%; animation-delay: 0s; animation-duration: 16s; }
.hero-particles::after { left: 65%; animation-delay: 5s; animation-duration: 12s; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 16px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); border-left: 1px solid var(--border); }
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
::-webkit-scrollbar-button:single-button { height: 16px; }

/* ===== SELECTION ===== */
::selection { background: rgba(218, 165, 32, 0.3); color: var(--text-primary); }

/* ===== SECTION ENTRANCE ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.section { animation: fadeIn 0.4s ease both; }

/* ===== VOTE SUCCESS BANNER ===== */
.vote-success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(76,175,80,0.18), rgba(76,175,80,0.06));
  border: 1px solid rgba(76,175,80,0.55);
  border-left: 4px solid #4caf50;
  border-radius: 6px;
  color: #d9f7db;
  font-size: 0.95rem;
  animation: fadeIn 0.35s ease both;
}
.vote-success-banner strong { color: #fff; letter-spacing: 0.3px; }
.vote-success-banner .vote-success-icon { font-size: 1.4rem; color: #ffc13c; }
.vote-success-banner .vote-success-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #d9f7db;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.vote-success-banner .vote-success-close:hover { color: #fff; }

/* ===== VOTE MODAL ===== */
.vote-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.vote-modal[aria-hidden="false"] { display: block; }
.vote-modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,0.72); backdrop-filter: blur(2px); animation: voteModalFade 0.2s ease; }
.vote-modal-body {
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, 94vw);
  max-height: 92vh;
  background: #1a1a1f;
  border: 1px solid #3a3a42;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: voteModalIn 0.25s cubic-bezier(.2,.8,.3,1);
}
.vote-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(#24242b, #1b1b21);
  border-bottom: 1px solid #2f2f38;
}
.vote-modal-title { margin: 0; flex: 1; font-size: 1.05rem; color: #fff; }
.vote-modal-actions { display: flex; align-items: center; gap: 14px; }
.vote-modal-fullpage { font-size: 0.8rem; color: #c9a547; text-decoration: none; }
.vote-modal-fullpage:hover { color: #ffc13c; text-decoration: underline; }
.vote-modal-close { background: none; border: none; color: #c9c9c9; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.vote-modal-close:hover { color: #fff; }
.vote-modal-frame-wrap { flex: 1; position: relative; background: #0f0f13; }
.vote-modal-frame { width: 100%; height: 72vh; max-height: 820px; border: 0; display: block; }
@keyframes voteModalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes voteModalIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ===== VOTE SUCCESS TOAST ===== */
.vote-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 1100;
  background: #1f2a1f;
  border: 1px solid #4caf50;
  border-left: 4px solid #4caf50;
  color: #d9f7db;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  max-width: 320px;
  font-size: 0.9rem;
  animation: toastIn 0.3s cubic-bezier(.2,.8,.3,1);
}
.vote-toast strong { display: block; color: #fff; margin-bottom: 3px; }
.vote-toast.fade-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* Keep vote button clickable even though it sits inside the card's <a> wrapper */
.btn-vote[data-vote-slug] { position: relative; z-index: 2; cursor: pointer; }

/* Embedded vote page (iframe) — strip nav/footer chrome */
body.vote-embed { background: transparent; }
body.vote-embed .nav, body.vote-embed .footer, body.vote-embed .announcement-bar, body.vote-embed .breadcrumb { display: none !important; }
body.vote-embed .main { padding: 12px !important; }
body.vote-embed .auth-container { max-width: 100% !important; padding: 0 !important; }
body.vote-embed .vote-page-card { margin: 0 !important; }
