/* Medieval Fantasy Theme for Minibia Companion Website */
/* Inspired by classic RPG UI aesthetics — gothic frames, embossed plates, parchment depth */

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0d0a05;
  --bg-medium: #1a1209;
  --bg-card: #1e1710;
  --bg-card-inner: #251c12;
  --bg-card-hover: #2c2116;
  --bg-input: #13100a;
  --border-dark: #2a1f0e;
  --border-color: #4a3520;
  --border-light: #6b4c2a;
  --border-gold: #c9a84c;
  --border-gold-bright: #e0c060;
  --text-primary: #dcc8a0;
  --text-secondary: #9a8560;
  --text-heading: #f0d890;
  --text-link: #d4a843;
  --text-link-hover: #f0c850;
  --accent-red: #c43c3c;
  --accent-green: #4a8c3f;
  --gold: #c9a84c;
  --gold-glow: rgba(201, 168, 76, 0.4);
  --gold-glow-strong: rgba(201, 168, 76, 0.6);
  --shadow: rgba(0, 0, 0, 0.6);
  --shadow-deep: rgba(0, 0, 0, 0.85);
  --emboss-light: rgba(255, 230, 160, 0.06);
  --emboss-dark: rgba(0, 0, 0, 0.4);
}

html {
  font-size: 16px;
}

body {
  font-family: 'Crimson Text', Georgia, serif;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(40, 30, 15, 0.5) 0%, transparent 70%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  color: var(--text-heading);
  font-weight: 700;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px var(--shadow-deep);
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 3px var(--shadow);
}

h3 {
  font-size: 1.15rem;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: var(--text-link-hover);
  text-shadow: 0 0 8px var(--gold-glow);
  text-decoration: none;
}

/* ===== Layout ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Header ===== */
.site-header {
  background:
    linear-gradient(180deg, rgba(42, 31, 14, 0.9) 0%, var(--bg-dark) 100%);
  border-bottom: 3px solid var(--border-gold);
  box-shadow:
    0 2px 12px var(--shadow-deep),
    inset 0 -1px 0 var(--emboss-light);
  padding: 1.25rem 0;
  text-align: center;
  position: relative;
}

@media (max-width: 768px) {
  .site-header {
    background:
      linear-gradient(180deg, rgba(13, 10, 5, 0.45) 0%, rgba(13, 10, 5, 0.65) 100%),
      url('/img/header-banner.jpg') center 40% / cover no-repeat;
    padding: 2.5rem 0;
  }
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow-strong), transparent);
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.site-header h1 a:hover {
  color: inherit;
  text-shadow: inherit;
}

.site-header h1 {
  font-family: 'MedievalSharp', cursive;
  font-size: 2.4rem;
  color: var(--gold);
  text-shadow:
    0 0 20px var(--gold-glow),
    0 2px 4px var(--shadow-deep);
  letter-spacing: 3px;
  margin-bottom: 0.2rem;
}

.site-header .subtitle {
  font-family: 'Crimson Text', serif;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 1px;
}

/* ===== Navigation ===== */
nav {
  background: var(--bg-medium);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow);
  padding: 0.4rem 0;
}

nav .container {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-secondary);
  padding: 0.5rem 1.1rem;
  white-space: nowrap;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

nav a:hover {
  color: var(--text-heading);
  background: var(--bg-card);
  border-color: var(--border-color);
  text-shadow: 0 0 6px var(--gold-glow);
  text-decoration: none;
}

nav a.nav-premium {
  color: var(--gold);
  background: linear-gradient(to bottom, rgba(200, 168, 78, 0.15), rgba(138, 109, 43, 0.1));
  border-color: var(--border-gold);
  text-shadow: 0 0 6px var(--gold-glow);
}

nav a.nav-premium:hover {
  color: #fff;
  background: linear-gradient(to bottom, rgba(200, 168, 78, 0.3), rgba(138, 109, 43, 0.2));
  border-color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
}

nav a.active {
  color: var(--gold);
  background: var(--bg-card);
  border-color: var(--border-gold);
  box-shadow: inset 0 0 8px var(--emboss-dark), 0 0 6px var(--gold-glow);
  text-shadow: 0 0 8px var(--gold-glow);
  text-decoration: none;
}

nav .nav-dropdown {
  position: relative;
  align-self: center;
}

nav .nav-dropdown-toggle {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1.1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}

nav .nav-dropdown-toggle::after {
  content: ' \25BE';
  font-size: 0.65rem;
}

nav .nav-dropdown-toggle.active {
  color: var(--gold);
  background: var(--bg-card);
  border-color: var(--border-gold);
}

nav .nav-dropdown-toggle:hover,
nav .nav-dropdown.open .nav-dropdown-toggle {
  color: var(--text-heading);
  background: var(--bg-card);
  border-color: var(--border-color);
  text-shadow: 0 0 6px var(--gold-glow);
}

nav .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 16px var(--shadow-deep);
  z-index: 100;
  min-width: 160px;
  padding: 0.3rem 0;
  margin-top: 0.25rem;
}

nav .nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

nav .nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1.2rem;
  border-radius: 0;
  font-size: 0.8rem;
}

nav .nav-dropdown-menu a:hover {
  background: var(--bg-card);
}

@media (max-width: 480px) {
  nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
  }
  nav .nav-dropdown-toggle {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
  }
  nav .nav-dropdown-menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    min-width: 0;
    text-align: center;
  }
}

/* ===== Cards — Double-Border Manuscript Frame ===== */
.card {
  background:
    /* Parchment noise texture */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 20%, rgba(60, 45, 25, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(60, 45, 25, 0.2) 0%, transparent 50%),
    linear-gradient(170deg, var(--bg-card-inner) 0%, var(--bg-card) 100%);
  border: 3px solid var(--border-color);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow:
    0 6px 24px var(--shadow-deep),
    inset 0 0 0 1px rgba(255, 230, 160, 0.03),
    inset 0 1px 0 var(--emboss-light),
    inset 0 -1px 0 var(--emboss-dark);
  position: relative;
}

/* Inner border — manuscript double-frame effect */
.card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(107, 76, 42, 0.3);
  border-radius: 1px;
  pointer-events: none;
}

/* Fleur-de-lis ornament at top center */
.card::after {
  content: '\269C';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  font-size: 0.9rem;
  color: var(--border-gold);
  text-shadow: 0 0 8px var(--gold-glow);
  background: var(--bg-card);
  padding: 0 0.5rem;
  opacity: 0.5;
  line-height: 1;
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  position: relative;
  text-align: center;
}

/* Decorative header underline */
.card-header::after {
  content: "\2022 \2014\2014 \2726 \2014\2014 \2022";
  display: block;
  color: var(--border-gold);
  font-size: 0.6rem;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-top: 0.5rem;
  text-shadow: 0 0 4px var(--gold-glow);
}

.card-header h2 {
  margin-bottom: 0;
  text-shadow: 0 0 10px var(--gold-glow);
}

/* ===== Tables — Embossed Plate Style ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: linear-gradient(180deg, #201810, #181008);
}

th {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.7rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border-gold);
  text-shadow: 0 0 6px var(--gold-glow);
}

td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(74, 53, 32, 0.5);
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(201, 168, 76, 0.06);
}

tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.15);
}

tbody tr:nth-child(even):hover {
  background: rgba(201, 168, 76, 0.06);
}

/* ===== Forms & Inputs — Embossed Frame ===== */
.search-bar {
  position: relative;
  margin-bottom: 1rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 6px var(--shadow-deep);
}

.search-bar input:focus {
  border-color: var(--border-gold);
  box-shadow:
    inset 0 2px 6px var(--shadow-deep),
    0 0 8px var(--gold-glow);
}

.search-bar input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-top: 1px solid var(--border-dark);
  border-radius: 0 0 3px 3px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 20px var(--shadow-deep);
}

.search-results.visible {
  display: block;
}

.search-results a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(74, 53, 32, 0.4);
  color: var(--text-primary);
  transition: background 0.15s;
}

.search-results a:hover {
  background: rgba(201, 168, 76, 0.08);
  text-decoration: none;
}

.search-results .result-level {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
}

select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 4px var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus {
  border-color: var(--border-gold);
  box-shadow:
    inset 0 1px 4px var(--shadow),
    0 0 6px var(--gold-glow);
}

/* ===== Pagination — Beveled Plate Buttons ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.pagination button {
  padding: 0.45rem 1rem;
  background: linear-gradient(180deg, #2c2116, #1a1209);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow:
    inset 0 1px 0 var(--emboss-light),
    0 2px 4px var(--shadow);
  text-shadow: 0 1px 2px var(--shadow);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, #3a2c1a, #221a0e);
  box-shadow:
    inset 0 1px 0 var(--emboss-light),
    0 0 8px var(--gold-glow);
  color: var(--text-heading);
}

.pagination button:active:not(:disabled) {
  transform: scale(0.96);
  box-shadow:
    inset 0 2px 4px var(--shadow-deep);
  background: linear-gradient(180deg, #1a1209, #2c2116);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination .page-info {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-shadow: 0 0 4px var(--gold-glow);
}

/* ===== Screenshot Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px var(--shadow);
}

.gallery-item:hover {
  border-color: var(--border-gold);
  box-shadow:
    0 4px 16px var(--shadow-deep),
    0 0 12px var(--gold-glow);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px var(--shadow-deep);
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 8px 40px var(--shadow-deep);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1001;
}

.lightbox-close {
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 0.5rem;
  line-height: 1;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Character Detail ===== */
.char-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.char-info .info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(74, 53, 32, 0.3);
  transition: background 0.15s;
}

.char-info .info-row:hover {
  background: rgba(201, 168, 76, 0.04);
}

.char-info .info-row:last-child {
  border-bottom: none;
}

.char-info .info-label {
  font-family: 'Cinzel', serif;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.char-info .info-value {
  color: var(--text-primary);
  font-weight: 600;
}

.char-info .premium-active {
  color: #4caf50;
}

.char-info .premium-free {
  color: #999;
}

/* ===== Deaths List ===== */
.deaths-list {
  list-style: none;
}

.deaths-list li {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(74, 53, 32, 0.3);
  font-size: 0.9rem;
  transition: background 0.15s;
}

.deaths-list li:hover {
  background: rgba(196, 60, 60, 0.05);
}

.deaths-list li:last-child {
  border-bottom: none;
}

.deaths-list .death-date {
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.3px;
}

.deaths-list .death-info {
  color: var(--text-primary);
}

.deaths-list .death-level {
  color: var(--accent-red);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(196, 60, 60, 0.4);
}

.deaths-list .killed-by-player {
  color: var(--accent-red);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(196, 60, 60, 0.4);
  text-decoration: none;
}

.deaths-list a.killed-by-player:hover {
  text-decoration: underline;
}

/* ===== Mascot Styles ===== */
.hero-mascots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-center {
  text-align: center;
  flex: 1;
  max-width: 500px;
}

.hero-mascot {
  width: auto;
  height: 140px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
  flex-shrink: 0;
  image-rendering: pixelated;
}

.hero-mascot-left {
  transform: scaleX(-1);
}

@media (max-width: 768px) {
  .hero-mascot {
    display: none;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .hero-mascot {
    height: 110px;
  }
}

/* ===== Gameplay Video Carousel ===== */
.gameplay-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.gameplay-track {
  display: flex;
  transition: transform 0.4s ease;
}

.gameplay-video {
  position: relative;
  min-width: 100%;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
}

.gameplay-video video {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.gameplay-video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.75rem 0.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  pointer-events: none;
}

.gameplay-video-overlay span {
  font-family: 'MedievalSharp', cursive;
  font-size: 1.1rem;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow), 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

/* Dot indicators */
.gameplay-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0.6rem 0 0.2rem;
}

.gameplay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

.gameplay-dot.active {
  background: var(--border-gold);
  box-shadow: 0 0 6px var(--gold-glow);
}

.quick-link-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s, filter 0.25s;
}

.quick-link:hover .quick-link-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 10px var(--gold-glow));
}

.cta-mascot {
  height: 140px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
  image-rendering: pixelated;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(201, 168, 76, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-medium), var(--bg-dark));
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--emboss-light), transparent);
}

.hero h2 {
  font-family: 'MedievalSharp', cursive;
  font-size: 2.2rem;
  color: var(--gold);
  text-shadow:
    0 0 24px var(--gold-glow),
    0 0 48px rgba(201, 168, 76, 0.2),
    0 2px 4px var(--shadow-deep);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  font-style: italic;
}

/* ===== CTA Button — Metallic Gold Plate ===== */
.hero .cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(180deg, #d4b45a 0%, #a08030 40%, #8a6c28 100%);
  color: #1a1209;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 3px;
  border: 2px solid #d4b45a;
  text-shadow: 0 1px 0 rgba(255, 230, 160, 0.3);
  transition: all 0.2s;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 160, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 8px var(--shadow),
    0 0 12px var(--gold-glow);
  animation: cta-glow 2s ease-in-out infinite;
}

@keyframes cta-glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 2px 8px var(--shadow), 0 0 12px var(--gold-glow); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 2px 12px var(--shadow), 0 0 28px var(--gold-glow-strong), 0 0 48px rgba(212, 180, 90, 0.2); }
}

.hero .cta-button:hover {
  background: linear-gradient(180deg, #e0c060 0%, #b09040 40%, #9a7c30 100%);
  border-color: #e0c060;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 160, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 12px var(--shadow),
    0 0 20px var(--gold-glow-strong);
  transform: translateY(-1px);
}

.hero .cta-button:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    0 1px 4px var(--shadow);
  background: linear-gradient(180deg, #a08030 0%, #8a6c28 40%, #7a5c20 100%);
}

/* ===== Quick Links (Homepage) ===== */
.quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quick-link {
  display: block;
  text-align: center;
  padding: 1.5rem 1.25rem;
  transition: all 0.25s;
  cursor: pointer;
}

.quick-link:hover {
  text-decoration: none;
  border-color: var(--border-gold);
  background:
    linear-gradient(170deg, rgba(201, 168, 76, 0.08) 0%, var(--bg-card) 100%);
  box-shadow:
    0 4px 20px var(--shadow-deep),
    inset 0 1px 0 var(--emboss-light),
    0 0 12px var(--gold-glow);
  transform: translateY(-2px);
}

.quick-link h3 {
  margin-bottom: 0.4rem;
  transition: text-shadow 0.25s;
}

.quick-link:hover h3 {
  text-shadow: 0 0 10px var(--gold-glow);
}

.quick-link p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-bar label {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  padding-bottom: 2.5rem;
  margin-top: 2rem;
  border-top: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--emboss-light), transparent);
}

/* Footer discord link */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.footer-socials button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  color: #fff;
  font-size: 0.75rem;
  font-family: 'Cinzel', serif;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.footer-socials button:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}

.footer-socials button svg {
  flex-shrink: 0;
}

button.footer-discord { background: #5865F2; }
button.footer-x { background: #000; border: 1px solid #555; }
button.footer-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--text-heading);
}

/* ===== Loading / Error States ===== */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--accent-red);
  text-shadow: 0 0 8px rgba(196, 60, 60, 0.3);
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== Responsive ===== */
@media (min-width: 480px) {
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .site-header h1 {
    font-size: 3rem;
  }

  .hero h2 {
    font-size: 2.8rem;
  }

  h1 {
    font-size: 2rem;
  }

  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .char-info {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Decorative Borders — Ornate Dividers ===== */
.ornate-border {
  position: relative;
  padding: 1.5rem;
}

.ornate-border::before,
.ornate-border::after {
  content: "\2726 \00a0\00a0 \2726 \00a0\00a0 \2726";
  display: block;
  text-align: center;
  color: var(--border-gold);
  font-size: 0.7rem;
  letter-spacing: 0.4rem;
  opacity: 0.5;
  text-shadow: 0 0 6px var(--gold-glow);
}

.ornate-border::before {
  margin-bottom: 1rem;
}

.ornate-border::after {
  margin-top: 1rem;
}

/* ===== Vocation Colors — with subtle glow ===== */
.voc-sorcerer { color: #8b9cee; text-shadow: 0 0 6px rgba(139, 156, 238, 0.3); }
.voc-druid { color: #70c870; text-shadow: 0 0 6px rgba(112, 200, 112, 0.3); }
.voc-paladin { color: #e0b850; text-shadow: 0 0 6px rgba(224, 184, 80, 0.3); }
.voc-knight { color: #e07050; text-shadow: 0 0 6px rgba(224, 112, 80, 0.3); }
.voc-none { color: var(--text-secondary); }

/* ===== About Highlights ===== */
.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .about-highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-highlight {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.about-highlight-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
}

.about-highlight h3 {
  margin-bottom: 0.3rem;
}

.about-highlight p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.feature-list li {
  padding: 0.35rem 0;
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  color: var(--border-gold);
  font-size: 0.65rem;
  top: 0.5rem;
  text-shadow: 0 0 4px var(--gold-glow);
}

/* ===== Main Content Area ===== */
main {
  padding: 1.5rem 0;
  min-height: 60vh;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ===== Character Name Link in Tables ===== */
tbody td a {
  text-shadow: 0 0 0 transparent;
  transition: color 0.2s, text-shadow 0.2s;
}

tbody td a:hover {
  text-shadow: 0 0 8px var(--gold-glow);
}

/* ===== Rank Number Styling ===== */
tbody tr:nth-child(1) td:first-child,
tbody tr:nth-child(2) td:first-child,
tbody tr:nth-child(3) td:first-child {
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 0 6px var(--gold-glow);
}

/* ===== Hero Particle Canvas ===== */
.hero {
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero > *:not(.hero-particles) {
  position: relative;
  z-index: 1;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in quick-links */
.quick-links .reveal:nth-child(1) { transition-delay: 0s; }
.quick-links .reveal:nth-child(2) { transition-delay: 0.1s; }
.quick-links .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ===== Shimmer Loading ===== */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card-hover) 40%,
    var(--border-dark) 50%,
    var(--bg-card-hover) 60%,
    var(--bg-card) 100%
  );
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: 3px;
}

.shimmer-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(74, 53, 32, 0.3);
}

.shimmer-cell {
  height: 1rem;
  border-radius: 3px;
}

.shimmer-cell.rank { width: 2rem; }
.shimmer-cell.name { flex: 1; }
.shimmer-cell.level { width: 3rem; }
.shimmer-cell.vocation { width: 5rem; }

/* ===== Animated Card Border Glow ===== */
@keyframes borderGlow {
  0%, 100% { border-color: var(--border-color); box-shadow: 0 4px 16px var(--shadow-deep), inset 0 1px 0 var(--emboss-light); }
  50% { border-color: var(--border-light); box-shadow: 0 4px 16px var(--shadow-deep), inset 0 1px 0 var(--emboss-light), 0 0 8px rgba(107, 76, 42, 0.15); }
}

.card-glow {
  animation: borderGlow 4s ease-in-out infinite;
}

/* ===== Pulsing Gold Glow on Header Title ===== */
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px var(--gold-glow), 0 2px 4px var(--shadow-deep); }
  50% { text-shadow: 0 0 30px var(--gold-glow-strong), 0 0 60px rgba(201, 168, 76, 0.15), 0 2px 4px var(--shadow-deep); }
}

.site-header h1 {
  animation: titleGlow 3s ease-in-out infinite;
}

/* ===== Highscore Row Slide-in ===== */
@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

tbody.animated tr {
  animation: rowSlideIn 0.3s ease-out both;
}

tbody.animated tr:nth-child(1) { animation-delay: 0s; }
tbody.animated tr:nth-child(2) { animation-delay: 0.03s; }
tbody.animated tr:nth-child(3) { animation-delay: 0.06s; }
tbody.animated tr:nth-child(4) { animation-delay: 0.09s; }
tbody.animated tr:nth-child(5) { animation-delay: 0.12s; }
tbody.animated tr:nth-child(6) { animation-delay: 0.15s; }
tbody.animated tr:nth-child(7) { animation-delay: 0.18s; }
tbody.animated tr:nth-child(8) { animation-delay: 0.21s; }
tbody.animated tr:nth-child(9) { animation-delay: 0.24s; }
tbody.animated tr:nth-child(10) { animation-delay: 0.27s; }

/* ===== Character Card Fade-in ===== */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

#character-content .card {
  animation: cardFadeIn 0.4s ease-out both;
}

#character-content .card:nth-child(2) {
  animation-delay: 0.15s;
}

/* ===== Forum Styles ===== */

.forum-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.forum-breadcrumb {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.forum-breadcrumb a {
  color: var(--text-link);
}

.forum-breadcrumb a:hover {
  color: var(--text-link-hover);
}

.forum-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.forum-username {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  text-shadow: 0 0 6px var(--gold-glow);
}

.forum-login-btn {
  padding: 0.4rem 1rem;
  background: linear-gradient(180deg, #2c2116, #1a1209);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 var(--emboss-light), 0 2px 4px var(--shadow);
}

.forum-login-btn:hover {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, #3a2c1a, #221a0e);
  color: var(--text-heading);
  box-shadow: inset 0 1px 0 var(--emboss-light), 0 0 8px var(--gold-glow);
}

/* Forum Form Elements */
.forum-form-group {
  margin-bottom: 0.75rem;
}

.forum-form-group label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.forum-form-group input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 6px var(--shadow-deep);
}

.forum-form-group input:focus {
  border-color: var(--border-gold);
  box-shadow: inset 0 2px 6px var(--shadow-deep), 0 0 8px var(--gold-glow);
}

.forum-form-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.forum-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 6px var(--shadow-deep);
}

.forum-textarea:focus {
  border-color: var(--border-gold);
  box-shadow: inset 0 2px 6px var(--shadow-deep), 0 0 8px var(--gold-glow);
}

/* Forum Buttons */
.forum-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--border-color);
}

.forum-btn-primary {
  background: linear-gradient(180deg, #d4b45a 0%, #a08030 40%, #8a6c28 100%);
  color: #1a1209;
  border-color: #d4b45a;
  text-shadow: 0 1px 0 rgba(255, 230, 160, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.3), 0 2px 8px var(--shadow);
}

.forum-btn-primary:hover {
  background: linear-gradient(180deg, #e0c060 0%, #b09040 40%, #9a7c30 100%);
  border-color: #e0c060;
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.4), 0 0 12px var(--gold-glow);
}

.forum-btn-secondary {
  background: linear-gradient(180deg, #2c2116, #1a1209);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 var(--emboss-light), 0 2px 4px var(--shadow);
}

.forum-btn-secondary:hover {
  border-color: var(--border-light);
  background: linear-gradient(180deg, #3a2c1a, #221a0e);
  color: var(--text-heading);
}

.forum-btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  background: linear-gradient(180deg, #2c2116, #1a1209);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 var(--emboss-light);
}

.forum-btn-small:hover {
  border-color: var(--border-gold);
  color: var(--text-heading);
}

.forum-btn-danger:hover {
  background: linear-gradient(180deg, #8b2020, #5a1515);
  border-color: var(--accent-red);
  color: #fff;
}

.forum-btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Forum Badges */
.forum-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  vertical-align: middle;
}

.forum-badge-pinned {
  background: var(--gold);
  color: var(--bg-dark);
}

.forum-badge-locked {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Forum Post Cards */
.forum-post {
  display: flex;
  padding: 0;
  margin-bottom: 0.75rem;
}

.forum-post.card::before,
.forum-post.card::after {
  display: none;
}

.forum-post-sidebar {
  flex: 0 0 130px;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.15));
  border-right: 1px solid var(--border-color);
  text-align: center;
}

.forum-post-author {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  word-break: break-word;
  text-shadow: 0 0 6px var(--gold-glow);
}

.forum-post-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.forum-post-content {
  flex: 1;
  padding: 0.75rem 1rem;
  min-width: 0;
}

.forum-post-body {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
}

.forum-edited {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.forum-post-actions {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(74, 53, 32, 0.3);
  display: flex;
  gap: 0.5rem;
}

/* Forum Modal */
.forum-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.forum-modal {
  width: 100%;
  max-width: 400px;
}

/* Hide last post column on mobile */
.forum-col-last {
  min-width: 180px;
}

@media (max-width: 600px) {
  .forum-col-last {
    display: none;
  }

  .forum-post {
    flex-direction: column;
  }

  .forum-post-sidebar {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    padding: 0.5rem 0.75rem;
  }

  .forum-post-date {
    margin-top: 0;
  }
}

/* ===== News Section ===== */

.news-more {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.news-more:hover {
  color: var(--gold);
}

.news-item {
  display: block;
  padding: 0.6rem 0;
}

.news-item + .news-item {
  border-top: 1px solid var(--border-color);
}

.news-item:last-child {
  padding-bottom: 0;
}

.news-item-author {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.news-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  display: block;
  text-align: center;
}

.news-item-title:hover {
  color: var(--gold);
}

.news-item-author {
  text-align: center;
  display: block;
  margin-bottom: 0.2rem;
}

.news-item-meta {
  display: none;
}

.news-item-preview {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  line-height: 1.4;
  text-align: center;
}

/* ===== Weather Ticker ===== */

.weather-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  z-index: 1000;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 14, 10, 0.85) 0%, rgba(10, 8, 5, 0.95) 100%);
  border-top: 1px solid rgba(74, 53, 32, 0.5);
}

.weather-ticker-track {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: weatherTickerScroll var(--ticker-duration, 30s) linear infinite;
}

.weather-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.weather-ticker-icon {
  font-size: 0.85rem;
}

.weather-ticker-name {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.3px;
}

.weather-ticker-sep {
  color: rgba(201, 168, 76, 0.25);
  padding: 0 6px;
  font-size: 0.5rem;
}

@keyframes weatherTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .weather-ticker { height: 26px; }
  .weather-ticker-item { font-size: 0.7rem; padding: 0 12px; }
  .weather-ticker-name { font-size: 0.6rem; }
}

/* ===== Mobile Table & Filter Fixes ===== */
@media (max-width: 600px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .card {
    padding: 0.5rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .filter-bar select {
    flex: 1;
    margin-left: 0.5rem;
  }

  table {
    font-size: 0.8rem;
  }

  th {
    font-size: 0.65rem;
    padding: 0.5rem 0.4rem;
    letter-spacing: 0.5px;
  }

  td {
    padding: 0.4rem;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  /* Guild page mobile */
  .guild-ranks {
    flex-direction: column;
  }

  .rank-group {
    min-width: 0;
  }
}

/* ===== Show Commands Button ===== */
.btn-commands {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--gold);
  border: 1px solid var(--border-gold, #8b7340);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-commands:hover {
  background: var(--border-gold, #8b7340);
  color: #fff;
}

/* ===== Command Reference Boxes ===== */
.command-ref {
  margin-top: 1.5rem;
}

.command-ref h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.command-ref table {
  font-size: 0.85rem;
}

.command-ref td:first-child {
  font-family: monospace;
  color: var(--accent-gold, #d4af37);
  white-space: nowrap;
}

/* ===== Achievements ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
  padding: 0.8rem;
}

.achievement-badge {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  transition: border-color 0.2s;
}

.achievement-badge:hover {
  border-color: var(--border-color);
}

.achievement-badge.completed {
  border-color: var(--accent-green);
  background: rgba(74, 140, 63, 0.08);
}

.achievement-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-heading);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-badge.completed .achievement-name {
  color: #7cc96e;
}

.achievement-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.achievement-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gold);
  transition: width 0.3s;
}

.achievement-badge.completed .achievement-fill {
  background: var(--accent-green);
}

.achievement-progress {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .site-header h1 { animation: none; }
  .card-glow { animation: none; }
  tbody.animated tr { animation: none; }
  #character-content .card { animation: none; }
  .shimmer { animation: none; }
  .rune { animation: none; }
}
