/*
 * ==========================================================================
 * AREOS RSPS - Medieval/Fantasy Theme
 * Universal stylesheet for the entire Areos website
 * ==========================================================================
 */

/* ==========================================================================
   1. DESIGN TOKENS (CSS VARIABLES)
   ========================================================================== */

:root {
  /* Backgrounds - dark wood/leather tones */
  --bg-darkest: #0d0a07;
  --bg-dark: #1a1410;
  --bg-medium: #2a2118;
  --bg-light: #3d2e1e;
  --bg-lighter: #4d3e2e;

  /* Parchment backgrounds for cards/panels */
  --bg-parchment: #2a2118;
  --bg-parchment-light: #342a1e;

  /* Text */
  --text-primary: #e8dcc8;
  --text-heading: #c4a96a;
  --text-muted: #8a7b6b;
  --text-bright: #f5edd6;
  --text-dark: #1a1410;

  /* Gold accents */
  --gold: #c4a96a;
  --gold-bright: #dfc07f;
  --gold-dark: #8b6914;
  --gold-shadow: rgba(196, 169, 106, 0.3);

  /* Other accents */
  --brown: #8b4513;
  --brown-light: #a0522d;
  --green: #2d5a27;
  --green-bright: #3a7a30;
  --green-light: #4a9a40;
  --red: #8b1a1a;
  --red-bright: #b12626;
  --blue: #2a4a7a;

  /* Borders */
  --border-subtle: rgba(196, 169, 106, 0.12);
  --border-medium: rgba(196, 169, 106, 0.25);
  --border-strong: rgba(196, 169, 106, 0.45);
  --border-gold: #c4a96a;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(196, 169, 106, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(196, 169, 106, 0.08);

  /* Typography */
  --font-heading: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Cinzel', 'Times New Roman', serif;
  --font-display: 'Uncial Antiqua', serif;
  --font-decorative: 'UnifrakturCook', cursive;

  /* Layout */
  --nav-height: 72px;
  --container-max: 1280px;
  --container-sm: 640px;
  --container-md: 768px;
  --section-pad: 4rem 2rem;
  --card-pad: 1.5rem;
  --card-radius: 8px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background-color: var(--gold);
  color: var(--text-dark);
}

::-moz-selection {
  background-color: var(--gold);
  color: var(--text-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-bright);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: 0.03em;
}

h2 {
  font-size: 2rem;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-title {
  text-align: center;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-title::before {
  content: '\25C6';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.65rem;
  z-index: 1;
  background: var(--bg-darkest);
  padding: 0 0.5rem;
}

.text-gold {
  color: var(--gold) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-bright {
  color: var(--text-bright) !important;
}

.text-red {
  color: var(--red-bright) !important;
}

.text-green {
  color: var(--green-bright) !important;
}

.text-blue {
  color: var(--blue) !important;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

strong, b {
  font-weight: 700;
  color: var(--text-bright);
}

small {
  font-size: 0.85rem;
}

/* ==========================================================================
   4. NAVIGATION (.navbar)
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--bg-dark);
  border-bottom: 2px solid var(--border-medium);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  transition: background-color var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.navbar-brand {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition);
  flex-shrink: 0;
}

.navbar-brand:hover {
  color: var(--gold-bright);
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-links a {
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.85rem;
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  transition: color var(--transition);
  text-decoration: none;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition), left var(--transition);
}

.navbar-links a:hover {
  color: var(--gold);
}

.navbar-links a:hover::after {
  width: 100%;
  left: 0;
}

.navbar-links a.active {
  color: var(--gold);
}

.navbar-links a.active::after {
  width: 100%;
  left: 0;
}

.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.player-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  padding: 0.5rem 1.25rem;
  background: rgba(45, 90, 39, 0.15);
  border: 1px solid rgba(58, 122, 48, 0.3);
  border-radius: 30px;
  letter-spacing: 0.02em;
}

.player-count-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--green-bright);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.player-count-text strong {
  color: var(--green-bright);
  font-weight: 700;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.navbar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--gold);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.2;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--text-dark);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--text-dark);
  box-shadow: var(--shadow-md), 0 0 20px rgba(196, 169, 106, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  color: var(--text-bright);
  border-color: var(--red-bright);
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--red-bright), #c93030);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  color: var(--text-bright);
  border-color: var(--green-bright);
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--green-bright), var(--green-light));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ==========================================================================
   6. CARDS & PANELS
   ========================================================================== */

.card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
  padding: 1rem var(--card-pad);
  border-bottom: 1px solid var(--border-medium);
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
}

.card-body {
  padding: var(--card-pad);
}

.card-footer {
  padding: 1rem var(--card-pad);
  border-top: 1px solid var(--border-subtle);
}

.medieval-panel {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--gold);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.medieval-panel .card-header {
  border-bottom: 1px solid var(--border-medium);
  padding: 1rem var(--card-pad);
  font-family: var(--font-heading);
  color: var(--gold);
}

.medieval-panel .card-body {
  padding: var(--card-pad);
}

.glass-card {
  background: rgba(42, 33, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ==========================================================================
   7. FORMS
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-shadow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c4a96a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-error {
  color: var(--red-bright);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--red-bright);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

.form-check label {
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   8. TABLES
   ========================================================================== */

.table-medieval {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.table-medieval thead {
  background: var(--bg-medium);
}

.table-medieval thead th {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-medium);
}

.table-medieval tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.table-medieval tbody tr:hover {
  background: var(--bg-light);
}

.table-medieval tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.table-medieval.table-striped tbody tr:nth-child(even) {
  background: rgba(196, 169, 106, 0.03);
}

.table-medieval.table-striped tbody tr:nth-child(even):hover {
  background: var(--bg-light);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   9. LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.content-section {
  padding: var(--section-pad);
  padding-bottom: 3rem;
}

/* When content-section follows the hero (play.php), no extra top padding needed */
.hero + .content-section {
  padding-top: 2rem;
}

/* When content-section is the first child (no hero before it), account for navbar */
main > .content-section:first-child {
  padding-top: calc(var(--nav-height) + 2rem);
}

.content-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
}

.content-wrapper > main,
.content-wrapper > .main-content {
  flex: 1;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Flex */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 0.75rem; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 0.75rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 0.75rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }

/* Display */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.relative { position: relative; }
.absolute { position: absolute; }

/* ==========================================================================
   10. HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-darkest);
}

/* Shorter banner version for sub-pages (play.php) */
.hero.hero-banner {
  min-height: 280px;
  max-height: 350px;
  padding-top: var(--nav-height);
}

.hero-video,
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(13, 10, 7, 0.6) 0%,
    rgba(13, 10, 7, 0.4) 40%,
    rgba(13, 10, 7, 0.7) 80%,
    rgba(13, 10, 7, 0.95) 100%
  );
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-pre-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 0.25rem;
  font-weight: 400;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 60px rgba(196, 169, 106, 0.2);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.hero-subtitle {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0.85;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-player-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem 1.25rem;
  background: rgba(45, 90, 39, 0.15);
  border: 1px solid rgba(58, 122, 48, 0.3);
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.hero-player-count::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--green-bright);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ---------- Falling Words ---------- */
.word-column {
  position: absolute;
  top: 0;
  width: 180px;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.word-column.left  { left: 0; }
.word-column.right { right: 0; }

.word-column span {
  display: block;
  position: absolute;
  top: -40px;
  width: 100%;
  text-align: center;
  color: var(--gold);
  font-family: var(--font-display);
  white-space: nowrap;
  animation: fallDown linear infinite;
}

@keyframes fallDown {
  0%   { transform: translateY(-40px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ==========================================================================
   11. HISCORES PAGE
   ========================================================================== */

.hiscores-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hiscores-sidebar {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 0.5rem 0;
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.hiscores-sidebar-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.skill-link:hover {
  background: rgba(196, 169, 106, 0.08);
  color: var(--gold);
}

.skill-link.active {
  border-left-color: var(--gold);
  background: var(--bg-light);
  color: var(--gold);
  font-weight: 700;
}

.skill-link img,
.skill-link .skill-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hiscores-main {
  min-width: 0;
}

.hiscores-header {
  background: var(--bg-medium);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hiscores-modes {
  display: flex;
  gap: 0.5rem;
}

.mode-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-btn:hover {
  color: var(--gold);
  border-color: var(--border-medium);
  background: rgba(196, 169, 106, 0.06);
}

.mode-btn.active {
  color: var(--text-dark);
  background: var(--gold);
  border-color: var(--gold);
}

.hiscores-search {
  display: flex;
  gap: 0.5rem;
}

.hiscores-search .form-input {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  min-width: 200px;
}

/* DataTables overrides */
.dataTables_wrapper {
  color: var(--text-primary);
}

.dataTables_wrapper table.dataTable {
  border-collapse: collapse;
  width: 100% !important;
}

.dataTables_wrapper table.dataTable thead {
  background: var(--bg-medium);
}

.dataTables_wrapper table.dataTable thead th {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-medium);
  background: var(--bg-medium);
}

.dataTables_wrapper table.dataTable thead th.sorting,
.dataTables_wrapper table.dataTable thead th.sorting_asc,
.dataTables_wrapper table.dataTable thead th.sorting_desc {
  background: var(--bg-medium);
}

.dataTables_wrapper table.dataTable tbody tr {
  background: var(--bg-parchment);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.dataTables_wrapper table.dataTable tbody tr:hover {
  background: var(--bg-parchment-light);
}

.dataTables_wrapper table.dataTable tbody td {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_filter input {
  background: var(--bg-dark);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-shadow);
}

.dataTables_wrapper .dataTables_length select {
  background: var(--bg-dark);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}

.dataTables_wrapper .dataTables_info {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.35rem 0.75rem;
  margin: 0 0.15rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary) !important;
  background: var(--bg-medium);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--bg-light) !important;
  border-color: var(--border-medium);
  color: var(--gold) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--gold) !important;
  border-color: var(--gold);
  color: var(--text-dark) !important;
  font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.dataTables_wrapper .dataTables_empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem !important;
}

/* Player lookup header */
.player-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
}

.player-header .player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.player-header .player-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0;
}

.player-header .player-title {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* Skills grid (lookup) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-parchment);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.skill-row:hover {
  background: var(--bg-parchment-light);
}

.skill-row .skill-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.skill-row .skill-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.skill-row .skill-level {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9rem;
  min-width: 30px;
  text-align: right;
}

.skill-row .skill-xp {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
}

/* Compare layout */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.compare-player {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 1.5rem;
}

.compare-player .compare-name {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.compare-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.compare-bar .bar-fill {
  height: 6px;
  background: var(--gold);
  border-radius: 3px;
  transition: width var(--transition);
}

.compare-bar .bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}

/* ==========================================================================
   12. STORE PAGE
   ========================================================================== */

.store-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-medium);
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.store-tab {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.store-tab:hover {
  color: var(--gold);
}

.store-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.store-pane {
  display: none;
}

.store-pane.active {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.store-item {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.store-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

.store-item-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 120px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.store-item-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.store-item-name {
  font-family: var(--font-heading);
  color: var(--text-bright);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.store-item-price {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.store-item-price-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.store-price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.5;
}

.store-price-final {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(196, 169, 106, 0.4);
}

.store-price-final.has-discount {
  color: var(--green-bright);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.store-item-discount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.store-item-discount .original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  color: var(--text-bright);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-item-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.store-item-buttons .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0.65rem 0.5rem;
}

.store-item-buttons .btn-block {
  flex: 1;
}

.login-to-buy {
  animation: loginPulse 2s ease-in-out infinite;
}

@keyframes loginPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 169, 106, 0.4); }
  50% { box-shadow: 0 0 18px 4px rgba(196, 169, 106, 0.3); }
}

.buy-button {
  margin-top: auto;
}

.store-item .buy-button {
  width: 100%;
}

/* ==========================================================================
   13. DOWNLOAD / GAME PAGE
   ========================================================================== */

.dl-wrapper {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.dl-card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--gold);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.dl-card .dl-logo {
  max-width: 200px;
  margin: 0 auto 1.5rem;
}

.dl-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.dl-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dl-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.dl-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.dl-platform:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  color: var(--gold);
}

.dl-platform .platform-icon {
  font-size: 2rem;
}

.dl-platform .platform-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
}

.dl-platform .platform-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   14. AUTH PAGES (Login, Register, Reset, Account, Confirm)
   ========================================================================== */

.auth-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Auth section as first content (no hero before it) needs navbar offset */
main > .auth-section:first-child {
  padding-top: calc(var(--nav-height) + 3rem);
  min-height: 100vh;
}

.auth-card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--gold);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.auth-title {
  text-align: center;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.auth-form {
  width: 100%;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-link {
  color: var(--gold);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

.auth-link:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-medium);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tab navigation (account page) */
.medieval-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-medium);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.medieval-tab {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.medieval-tab:hover {
  color: var(--gold);
}

.medieval-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ==========================================================================
   15. NEWS PAGE
   ========================================================================== */

.news-section {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 3rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.news-card-body {
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

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

.news-card-title a:hover {
  color: var(--gold-bright);
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-card-meta .meta-date,
.news-card-meta .meta-author {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-footer {
  padding: 0.75rem var(--card-pad);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

/* ==========================================================================
   16. ADMIN PANEL
   ========================================================================== */

.admin-container {
  width: 100%;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.admin-header {
  background: var(--bg-medium);
  border-bottom: 1px solid var(--border-medium);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.25rem;
}

.admin-header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-dark);
  border-bottom: 2px solid var(--border-medium);
  padding: 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  padding: 0.85rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.admin-tab:hover {
  color: var(--gold);
}

.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.admin-content {
  padding: 2rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  text-align: center;
}

.admin-stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.admin-stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
}

.admin-stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: var(--bg-medium);
}

.admin-table thead th {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-medium);
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.admin-table tbody tr:hover {
  background: var(--bg-light);
}

.admin-table tbody td {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.admin-form .form-group {
  margin-bottom: 1.25rem;
}

/* Admin modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-modal.hidden {
  display: none;
}

.admin-modal-content {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--gold);
  border-radius: var(--card-radius);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-medium);
}

.admin-modal-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.1rem;
}

.admin-modal-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.admin-modal-close:hover {
  color: var(--gold);
}

.admin-modal-body {
  padding: 1.5rem;
}

.admin-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Admin badges */
.admin-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rank-owner {
  background: rgba(196, 169, 106, 0.2);
  color: var(--gold);
  border: 1px solid rgba(196, 169, 106, 0.4);
}

.rank-developer {
  background: rgba(128, 0, 255, 0.15);
  color: #b87fff;
  border: 1px solid rgba(128, 0, 255, 0.3);
}

.rank-admin {
  background: rgba(255, 140, 0, 0.15);
  color: #ffaa33;
  border: 1px solid rgba(255, 140, 0, 0.3);
}

.rank-moderator {
  background: rgba(0, 150, 255, 0.15);
  color: #66bbff;
  border: 1px solid rgba(0, 150, 255, 0.3);
}

.rank-helper {
  background: rgba(0, 200, 100, 0.15);
  color: #55dd88;
  border: 1px solid rgba(0, 200, 100, 0.3);
}

.rank-player {
  background: rgba(138, 123, 107, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(138, 123, 107, 0.3);
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  border: 1px solid var(--border-medium);
  background: var(--bg-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-action-btn.action-edit {
  color: var(--blue);
  border-color: rgba(42, 74, 122, 0.4);
}

.admin-action-btn.action-edit:hover {
  background: rgba(42, 74, 122, 0.15);
}

.admin-action-btn.action-delete,
.admin-action-btn.action-ban {
  color: var(--red-bright);
  border-color: rgba(177, 38, 38, 0.4);
}

.admin-action-btn.action-delete:hover,
.admin-action-btn.action-ban:hover {
  background: rgba(177, 38, 38, 0.15);
}

.admin-search {
  position: relative;
  max-width: 300px;
}

.admin-search .form-input {
  padding-left: 2.5rem;
}

.admin-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.admin-pagination .page-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-medium);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-pagination .page-btn:hover {
  border-color: var(--border-medium);
  color: var(--gold);
}

.admin-pagination .page-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-dark);
  font-weight: 700;
}

.admin-pagination .page-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Audit log */
.audit-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.audit-entry:hover {
  background: rgba(196, 169, 106, 0.04);
}

.audit-entry .audit-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  min-width: 120px;
  flex-shrink: 0;
}

.audit-entry .audit-user {
  color: var(--gold);
  font-weight: 700;
  min-width: 100px;
  flex-shrink: 0;
}

.audit-entry .audit-action {
  color: var(--text-primary);
  flex: 1;
}

/* ==========================================================================
   17. FOOTER
   ========================================================================== */

.footer {
  background: var(--bg-dark);
  border-top: 2px solid var(--border-medium);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section.footer-logo-section {
  align-items: center;
  justify-content: center;
}

.footer-logo {
  max-width: 160px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  opacity: 0.9;
  transition: opacity var(--transition);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(196, 169, 106, 0.08);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: 2rem 0 0;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-credit {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  opacity: 0.6;
}

.footer-credit a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity var(--transition);
}

.footer-credit a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ==========================================================================
   18. MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 1;
  transition: opacity var(--transition);
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-parchment);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--gold);
  border-radius: var(--card-radius);
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-medium);
}

.modal-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--gold);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   19. UTILITY CLASSES
   ========================================================================== */

/* Background */
.bg-dark { background: var(--bg-dark) !important; }
.bg-medium { background: var(--bg-medium) !important; }
.bg-parchment { background: var(--bg-parchment) !important; }
.bg-darkest { background: var(--bg-darkest) !important; }

/* Borders */
.border-gold { border-color: var(--border-gold) !important; }
.border-subtle { border-color: var(--border-subtle) !important; }
.border-medium { border-color: var(--border-medium) !important; }

.rounded { border-radius: var(--card-radius); }
.rounded-sm { border-radius: 4px; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow { box-shadow: var(--shadow-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* Ornamental divider */
.ornament {
  position: relative;
  text-align: center;
  margin: 2rem 0;
}

.ornament::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

.ornament::after {
  content: '\25C6';
  position: relative;
  z-index: 1;
  background: var(--bg-darkest);
  padding: 0 0.75rem;
  color: var(--gold);
  font-size: 0.6rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge-gold {
  background: rgba(196, 169, 106, 0.2);
  color: var(--gold);
  border: 1px solid rgba(196, 169, 106, 0.4);
}

.badge-red {
  background: rgba(177, 38, 38, 0.15);
  color: var(--red-bright);
  border: 1px solid rgba(177, 38, 38, 0.3);
}

.badge-green {
  background: rgba(58, 122, 48, 0.15);
  color: var(--green-bright);
  border: 1px solid rgba(58, 122, 48, 0.3);
}

.badge-blue {
  background: rgba(42, 74, 122, 0.15);
  color: #66aaff;
  border: 1px solid rgba(42, 74, 122, 0.3);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--card-radius);
  border: 1px solid;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(58, 122, 48, 0.1);
  border-color: rgba(58, 122, 48, 0.3);
  color: var(--green-bright);
}

.alert-danger {
  background: rgba(177, 38, 38, 0.1);
  border-color: rgba(177, 38, 38, 0.3);
  color: var(--red-bright);
}

.alert-warning {
  background: rgba(196, 169, 106, 0.1);
  border-color: rgba(196, 169, 106, 0.3);
  color: var(--gold);
}

.alert-info {
  background: rgba(42, 74, 122, 0.1);
  border-color: rgba(42, 74, 122, 0.3);
  color: #66aaff;
}

/* Toastr notification overrides */
.toast-container {
  z-index: 100000 !important;
}

.toast-success {
  background-color: var(--green) !important;
  border: 1px solid var(--green-bright) !important;
}

.toast-error {
  background-color: var(--red) !important;
  border: 1px solid var(--red-bright) !important;
}

.toast-warning {
  background-color: var(--brown) !important;
  border: 1px solid var(--brown-light) !important;
}

.toast-info {
  background-color: var(--blue) !important;
  border: 1px solid rgba(42, 74, 122, 0.8) !important;
}

#toast-container > div {
  font-family: var(--font-body);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

#toast-container > div:hover {
  box-shadow: var(--shadow-lg);
  opacity: 1;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dividers */
.divider {
  height: 1px;
  background: var(--border-medium);
  margin: 1.5rem 0;
}

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pointer / cursor */
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* ==========================================================================
   20. ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}

.slide-down {
  animation: slideDown 0.3s ease forwards;
}

.slide-up {
  animation: slideUp 0.3s ease forwards;
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-medium) 25%,
    var(--bg-light) 50%,
    var(--bg-medium) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==========================================================================
   21. RESPONSIVE
   ========================================================================== */

/* Large screens / Tablets landscape */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-pane.active {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-logo-section {
    grid-column: 1 / -1;
    order: -1;
  }

  .footer-logo {
    max-width: 140px;
  }

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

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

  .hiscores-container {
    grid-template-columns: 200px 1fr;
  }
}

/* Tablets / Small laptops */
@media (max-width: 768px) {
  :root {
    --section-pad: 2.5rem 1rem;
    --card-pad: 1.25rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Mobile nav */
  .navbar {
    padding: 0 1rem;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 2px solid var(--border-medium);
    flex-direction: column;
    padding: 1rem 0;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links a {
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: left;
  }

  .navbar-links a::after {
    display: none;
  }

  .navbar-auth {
    gap: 0.5rem;
  }

  .navbar-auth .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.7rem;
  }

  /* Hero mobile */
  .hero-pre-title {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }

  .hero-title {
    font-size: 3.25rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .word-column { display: none; }

  /* Grids to single/two column */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .store-pane.active {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Hiscores: sidebar becomes horizontal */
  .hiscores-container {
    grid-template-columns: 1fr;
  }

  .hiscores-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .hiscores-sidebar-title {
    display: none;
  }

  .skill-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.65rem;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  .skill-link.active {
    border-left: none;
    border-bottom-color: var(--gold);
  }

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-logo-section {
    order: -1;
  }

  .footer-section {
    text-align: center;
    align-items: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-logo {
    max-width: 120px;
  }

  /* Admin tabs scrollable */
  .admin-tabs {
    padding: 0 1rem;
  }

  .admin-tab {
    padding: 0.75rem 0.85rem;
    font-size: 0.7rem;
  }

  .admin-content {
    padding: 1rem;
  }

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

  .admin-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Auth */
  .auth-card {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  /* Tables responsive */
  .table-responsive {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  /* Modal */
  .modal-content,
  .admin-modal-content {
    margin: 1rem;
    max-height: 90vh;
  }
}

/* Small phones */
@media (max-width: 640px) {
  .hero-pre-title {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .store-pane.active {
    grid-template-columns: 1fr;
  }

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

  .dl-platforms {
    grid-template-columns: 1fr;
  }

  .dl-card {
    padding: 1.5rem;
  }

  .medieval-tabs {
    gap: 0;
  }

  .medieval-tab {
    padding: 0.6rem 0.85rem;
    font-size: 0.7rem;
  }

  .store-tabs {
    gap: 0;
  }

  .store-tab {
    padding: 0.6rem 0.85rem;
    font-size: 0.7rem;
  }

  .btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 0.85rem;
  }

  .player-header {
    flex-direction: column;
    text-align: center;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .hiscores-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hiscores-search .form-input {
    min-width: 0;
    width: 100%;
  }

  .news-card-image {
    height: 160px;
  }
}

/* ==========================================================================
   22. PRINT STYLES
   ========================================================================== */

@media print {
  .navbar,
  .footer,
  .hero-video,
  .hero-overlay,
  .navbar-toggle,
  .btn,
  .modal-overlay,
  .admin-modal {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .content-section {
    padding-top: 0;
  }

  .card,
  .medieval-panel {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ==========================================================================
   23. SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-lighter) var(--bg-dark);
}

/* ==========================================================================
   24. FOCUS & ACCESSIBILITY
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  z-index: 10001;
  font-family: var(--font-heading);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================================================================
   ADMIN PANEL
   Extracted from app/Views/areosv2/admin.php <style> block
   =================================================================== */
.adm-wrap { max-width: 1100px; margin: 0 auto; padding: 100px 16px 48px; }

/* Header card */
.adm-header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    background: linear-gradient(135deg, rgba(177,18,38,0.18), rgba(0,0,0,0.45));
    border: 1px solid rgba(177,18,38,0.35);
    border-radius: 12px; padding: 18px 24px; margin-bottom: 20px;
}
.adm-header h2 { margin: 0; font-size: 1.4rem; color: #fff; display: flex; align-items: center; gap: 10px; }
.adm-header p  { margin: 4px 0 0; color: #888; font-size: 0.85rem; }
.adm-time { color: #555; font-size: 0.8rem; }

/* Rank badge */
.rank-badge {
    display: inline-block; padding: 2px 10px; border-radius: 4px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    color: #fff; letter-spacing: 0.5px; vertical-align: middle; margin-left: 6px;
}

/* Tab nav */
.adm-tabs { display: flex; gap: 4px; border-bottom: 2px solid rgba(177,18,38,0.4); margin-bottom: 20px; flex-wrap: wrap; }
.adm-tab {
    padding: 8px 18px; border: none; border-radius: 8px 8px 0 0; cursor: pointer;
    font-size: 0.82rem; font-weight: 600; transition: all .2s;
    background: rgba(255,255,255,0.04); color: #777;
}
.adm-tab:hover { background: rgba(177,18,38,0.2); color: #ccc; }
.adm-tab.active { background: #b11226; color: #fff; }
.adm-tab i { margin-right: 5px; }

/* Cards */
.adm-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.adm-card-title {
    font-size: 0.95rem; font-weight: 700; color: #fff;
    margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.adm-card-title i { color: #b11226; }

/* Stat grid */
.adm-stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.adm-stat-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px; padding: 18px; text-align: center;
}
.adm-stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: #fff; }
.adm-stat-card .stat-label { font-size: 0.78rem; color: #666; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.adm-stat-card .stat-icon { font-size: 1.2rem; color: #b11226; margin-bottom: 6px; }

/* Table */
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.adm-table th {
    padding: 8px 12px; text-align: left; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; color: #b11226;
    border-bottom: 1px solid rgba(177,18,38,0.25);
}
.adm-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #bbb; vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,0.03); }
.adm-table td.name { color: #fff; font-weight: 600; }
.adm-table td.muted { color: #888; font-size: 0.78rem; }
.adm-table td.slug { color: #666; font-size: 0.75rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.adm-btn {
    padding: 5px 12px; border: none; border-radius: 5px; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; transition: all .2s;
}
.adm-btn-red   { background: #b11226; color: #fff; }
.adm-btn-red:hover { background: #d01430; }
.adm-btn-gray  { background: rgba(255,255,255,0.08); color: #aaa; }
.adm-btn-gray:hover { background: rgba(255,255,255,0.14); color: #fff; }
.adm-btn-amber { background: #b07d20; color: #fff; }
.adm-btn-amber:hover { background: #c98f25; }
.adm-btn-danger { background: rgba(177,18,38,0.25); color: #f87171; border: 1px solid rgba(177,18,38,0.4); }
.adm-btn-danger:hover { background: rgba(177,18,38,0.45); }
.adm-btn-blue { background: #2563eb; color: #fff; }
.adm-btn-blue:hover { background: #3b82f6; }
.adm-btn-orange { background: #d97706; color: #fff; }
.adm-btn-orange:hover { background: #f59e0b; }
.adm-btn-purple { background: #7c3aed; color: #fff; }
.adm-btn-purple:hover { background: #8b5cf6; }
.adm-btn-filter {
    background: rgba(255,255,255,0.06); color: #888; border: 1px solid rgba(255,255,255,0.08);
    padding: 5px 14px; border-radius: 20px; font-size: 0.76rem; font-weight: 600;
    transition: all .2s; cursor: pointer;
}
.adm-btn-filter:hover { background: rgba(255,255,255,0.12); color: #ccc; }
.adm-btn-filter.active { background: rgba(177,18,38,0.3); color: #f87171; border-color: rgba(177,18,38,0.5); }

/* Inputs */
.adm-input {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 0.82rem; outline: none;
    transition: border-color .2s;
}
.adm-input:focus { border-color: rgba(177,18,38,0.6); }
.adm-select {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; border-radius: 6px; padding: 4px 8px; font-size: 0.78rem; outline: none;
}

/* Search bar */
.adm-search { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.adm-search input { flex: 1; min-width: 160px; }
.adm-meta { color: #555; font-size: 0.78rem; }

/* Pagination */
.adm-pages { display: flex; gap: 4px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.adm-page-btn {
    padding: 4px 10px; border: none; border-radius: 4px; cursor: pointer;
    font-size: 0.78rem; background: rgba(255,255,255,0.06); color: #aaa; transition: all .2s;
}
.adm-page-btn.active, .adm-page-btn:hover { background: #b11226; color: #fff; }

/* Settings table */
.adm-cfg-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.adm-cfg-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.adm-cfg-table td:first-child { color: #888; width: 160px; }
.adm-cfg-table td:last-child { color: #fff; }
.adm-cfg-table tr:last-child td { border-bottom: none; }

/* Rank hierarchy - compact */
.rank-row {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px;
    background: rgba(0,0,0,0.25); border-radius: 6px; margin-bottom: 4px; font-size: 0.8rem;
}
.rank-row .rname { min-width: 90px; text-align: center; }
.rank-row .rlevel { color: #777; font-size: 0.75rem; min-width: 50px; }
.rank-row .raccess { color: #bbb; }

/* Store inline inputs */
.store-price-in, .store-disc-in {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; border-radius: 4px; padding: 3px 6px; font-size: 0.78rem; outline: none; width: 70px;
}
.store-price-in:focus, .store-disc-in:focus { border-color: rgba(177,18,38,0.5); }

/* Modal */
.adm-modal-bg {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.82); z-index: 9999;
    align-items: center; justify-content: center;
}
.adm-modal {
    background: #111; border: 1px solid rgba(177,18,38,0.4);
    border-radius: 12px; padding: 24px; width: 90%; max-width: 640px;
    max-height: 90vh; overflow-y: auto;
}
.adm-modal h3 { color: #fff; margin: 0 0 16px; font-size: 1rem; }
.adm-modal label { display: block; color: #666; font-size: 0.78rem; margin-bottom: 4px; margin-top: 12px; }
.adm-modal input, .adm-modal textarea, .adm-modal select {
    width: 100%; box-sizing: border-box;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; border-radius: 6px; padding: 7px 10px; font-size: 0.82rem; outline: none;
}
.adm-modal textarea { font-family: monospace; resize: vertical; }
.adm-modal input:focus, .adm-modal textarea:focus, .adm-modal select:focus { border-color: rgba(177,18,38,0.5); }
.adm-modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Quick action buttons */
.adm-quick-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.adm-quick-actions .adm-btn { font-size: 0.72rem; padding: 3px 8px; }

/* Filter buttons */
.adm-filters { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.adm-filter-btn {
    padding: 5px 14px; border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; background: rgba(255,255,255,0.04); color: #777; transition: all .2s;
}
.adm-filter-btn.active, .adm-filter-btn:hover { background: #b11226; color: #fff; border-color: #b11226; }

/* Category list */
.adm-cat-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: rgba(0,0,0,0.25); border-radius: 6px; margin-bottom: 4px; font-size: 0.82rem;
}
.adm-cat-item .cat-name { flex: 1; color: #bbb; }
.adm-cat-item input { flex: 1; }

/* Player detail modal */
.adm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.82rem; }
.adm-detail-grid .detail-label { color: #666; }
.adm-detail-grid .detail-value { color: #fff; }

/* ===================================================================
   HERO RESPONSIVE (extracted from intro.php)
   =================================================================== */
@media (max-width: 768px) {
    .hero {
        background: url('/assets/videos/hero-bg.jpg') center/cover no-repeat !important;
    }
}

/* ===================================================================
   UTILITY CLASSES (for inline style replacement)
   =================================================================== */

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.w-full { width: 100% !important; }

/* Hiscores compare */
.hs-compare-row {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
}
.hs-compare-skill {
    text-align: center; min-width: 100px;
}
.hs-compare-skill-icon {
    display: inline-block; vertical-align: middle;
}
.hs-compare-skill-label {
    font-size: 0.8rem; color: var(--gold); margin-left: 0.35rem;
}
.hs-compare-winner-label {
    font-size: 0.7rem; font-weight: 700; margin-top: 0.2rem;
}
.hs-player-name {
    font-weight: 700; font-size: 1.1rem;
}
.hs-player-xp {
    font-size: 0.8rem; color: var(--text-muted);
}
.hs-form-row {
    display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; padding: 0.5rem 0;
}
.hs-form-field {
    flex: 1; min-width: 200px; margin-bottom: 0;
}
.hs-form-field label,
.hs-form-label {
    display: block; margin-bottom: 0.5rem; color: var(--text-muted);
    font-size: 0.85rem; text-transform: uppercase;
}
.hs-section-title {
    font-size: 1.25rem; margin-bottom: 1.5rem;
}
.hs-muted-center {
    text-align: center; color: var(--text-muted); font-size: 0.9rem;
}
.hs-skill-filter {
    display: flex; gap: 0.5rem;
}
.hs-filter-row {
    display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; padding: 0.75rem 1rem;
}
.hs-filter-field {
    flex: 1; min-width: 180px; margin-bottom: 0;
}

/* Store success */
.store-success-title {
    font-family: var(--font-heading); font-size: 1.75rem;
    margin-bottom: 1.5rem; text-align: center;
}
.store-success-detail {
    color: var(--text-primary); margin-bottom: 1rem;
}
.store-success-detail-last {
    color: var(--text-primary); margin-bottom: 1.5rem;
}
.text-gold-inline { color: var(--gold); }
.text-red-inline { color: var(--red); }

/* Game page download buttons */
.game-btn-icon { height: 2.75rem; }

/* Hiscores compare border */
.hs-compare-divider { padding: 0 0 0.75rem 0; }

/* Store error text */
.store-error-text {
    width: 100%; text-align: center; color: var(--red); font-size: 0.9rem;
}

/* Store item fallback */
.store-item-fallback {
    height: 120px; width: 120px; display: flex;
    align-items: center; justify-content: center; margin: 0 auto;
}
.store-item-fallback-icon { font-size: 2.5rem; }

/* ===================================================================
   NAVBAR CLASS ALIASES
   HTML uses .navbar-container/.navbar-menu/.mobile-menu-toggle/.navbar-logo
   CSS was written for .navbar-inner/.navbar-links/.navbar-toggle/.navbar-brand
   =================================================================== */
.navbar-container { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--container-max); margin: 0 auto; }
.navbar-menu { display: flex; align-items: center; gap: 0.25rem; }
.navbar-menu a { color: var(--text-primary); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; padding: 0.5rem 0.85rem; position: relative; font-family: var(--font-heading); font-weight: 600; transition: color var(--transition); text-decoration: none; }
.navbar-menu a::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--gold); transition: width var(--transition), left var(--transition); }
.navbar-menu a:hover { color: var(--gold); }
.navbar-menu a:hover::after { width: 100%; left: 0; }
.navbar-menu a.active { color: var(--gold); }
.navbar-menu a.active::after { width: 100%; left: 0; }
.navbar-logo { font-family: var(--font-display); color: var(--gold); font-size: 1.5rem; text-decoration: none; letter-spacing: 0.05em; transition: color var(--transition); flex-shrink: 0; }
.navbar-logo:hover { color: var(--gold-bright); }
.navbar-logo img { height: 40px; width: auto; }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--gold); font-size: 1.4rem; padding: 0.25rem; }

/* Desktop auth links visible, mobile hidden */
.navbar-menu .navbar-auth { display: none; }
.desktop-auth { display: flex; }

/* Auth link styling */
.navbar-auth a { color: var(--text-primary); text-decoration: none; font-size: 0.8rem; font-family: var(--font-heading); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.4rem 0.85rem; transition: color var(--transition); }
.navbar-auth a:hover { color: var(--gold); }
.navbar-auth a.active { color: var(--gold); }
.navbar-auth .login { color: var(--text-primary); }
.navbar-auth .register { color: var(--gold); background: rgba(218, 165, 32, 0.15); border: 1px solid rgba(218, 165, 32, 0.3); border-radius: 4px; padding: 0.35rem 0.85rem; }
.navbar-auth .register:hover { background: rgba(218, 165, 32, 0.25); }

/* Mobile responsive navbar */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .navbar-menu {
        display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
        background: var(--bg-dark); border-bottom: 2px solid var(--border-medium);
        flex-direction: column; padding: 1rem 0; box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .navbar-menu.active { display: flex; }
    .navbar-menu a { padding: 0.75rem 1.5rem; width: 100%; text-align: left; }
    .navbar-menu a::after { display: none; }
    .navbar-menu .navbar-auth { display: flex; flex-direction: column; width: 100%; padding: 0.5rem 1.5rem; gap: 0.5rem; border-top: 1px solid var(--border-medium); margin-top: 0.5rem; padding-top: 1rem; }
    .navbar-menu .navbar-auth a { padding: 0.5rem 0; }
    .navbar-menu .navbar-auth .register { text-align: center; }
    .desktop-auth { display: none; }
}

/* Vote sites */
.vote-sites .btn { display: block; }
.mb-1 { margin-bottom: 0.25rem !important; }

/* ===================================================================
   COMMUNITY PAGE
   =================================================================== */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.community-feature {
  padding: 1rem;
}

.community-feature i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.community-feature h4 {
  color: var(--text-primary);
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

/* ===================================================================
   SUPPORT FAQ PAGE
   =================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 0.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--gold);
}

.faq-question i {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0.5rem;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 0.5rem 1rem;
}

.faq-answer p,
.faq-answer ul {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.faq-answer ul {
  padding-left: 1.5rem;
}

.faq-answer li {
  margin-bottom: 0.4rem;
}

/* Cache issues tag grid */
.cache-issues-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cache-issue-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: 4px;
  color: #e88;
  font-size: 0.8rem;
}

.cache-issue-tag i {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Guide step styles */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}

.guide-step:last-child {
  border-bottom: none;
}

.guide-step-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a0854a);
  color: var(--bg-dark, #1a1a1a);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}

.guide-step-content {
  flex: 1;
  min-width: 0;
}

.guide-step-content h4 {
  font-family: var(--font-heading);
  color: var(--text-primary, #e8e0d0);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.guide-step-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.guide-step-content p:last-child {
  margin-bottom: 0;
}

.guide-step-content ul {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}

.guide-step-content ul li {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.2rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.guide-step-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.guide-step-content code {
  background: rgba(255,255,255,0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--gold);
}

/* Mobile guide steps */
@media (max-width: 480px) {
  .cache-issues-grid {
    gap: 0.35rem;
  }

  .cache-issue-tag {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
  }

  .guide-step {
    gap: 0.75rem;
    padding: 0.65rem 0;
  }

  .guide-step-number {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .guide-step-content h4 {
    font-size: 0.85rem;
  }
}

.text-center { text-align: center; }

/* ===================================================================
   VOTE PAGE STYLES
   =================================================================== */

/* Login panel */
.vote-login-panel {
  max-width: 500px;
  margin: 0 auto;
}

.vote-login-form {
  margin-top: 0.5rem;
}

.vote-login-row {
  display: flex;
  gap: 0.75rem;
}

.vote-login-row .form-input {
  flex: 1;
}

.vote-login-row .btn {
  white-space: nowrap;
}

/* User bar */
.vote-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
}

.vote-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-user-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.vote-user-name {
  color: var(--gold);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.vote-user-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vote-stat {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.vote-stat i {
  margin-right: 0.3rem;
}

.vote-stat-pending {
  color: var(--gold);
  font-weight: 600;
}

.vote-logout {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
}

.vote-logout:hover {
  color: var(--gold);
}

/* Alert styles */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #e88;
}

.alert-success {
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #6ddb6d;
}

.alert i {
  margin-right: 0.4rem;
}

/* Vote cards grid */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.vote-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.vote-loading i {
  margin-right: 0.5rem;
}

/* Individual vote card */
.vote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition);
}

.vote-card-ready {
  border-color: var(--border-medium);
}

.vote-card-ready:hover {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(196, 169, 106, 0.1);
  transform: translateY(-2px);
}

.vote-card-cooldown {
  opacity: 0.7;
  border-color: var(--border-subtle, rgba(255,255,255,0.06));
}

.vote-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.75rem;
}

.vote-card-rank {
  font-family: var(--font-heading);
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.6;
}

.vote-card-icon {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.8;
}

.vote-card-cooldown .vote-card-icon {
  opacity: 0.4;
}

.vote-card-title {
  font-family: var(--font-heading);
  color: var(--text-primary, #e8e0d0);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
}

.vote-btn {
  margin-top: auto;
  font-size: 0.8rem;
}

/* Cooldown progress */
.vote-progress-wrap {
  width: 100%;
  margin-bottom: 0.75rem;
}

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

.vote-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #a0854a);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.vote-time-left {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vote-time-left i {
  margin-right: 0.25rem;
}

/* Leaderboard */
.vote-leaderboard {
  max-height: 600px;
  overflow-y: auto;
}

.vote-lb-table {
  width: 100%;
  border-collapse: collapse;
}

.vote-lb-table thead th {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-medium);
  text-align: left;
}

.vote-lb-table tbody tr {
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
  transition: background var(--transition);
}

.vote-lb-table tbody tr:hover {
  background: rgba(196, 169, 106, 0.04);
}

.vote-lb-table tbody td {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.vote-lb-rank {
  width: 50px;
  text-align: center !important;
}

.vote-lb-votes {
  width: 80px;
  text-align: right !important;
  font-weight: 600;
  color: var(--gold) !important;
}

.vote-lb-you {
  background: rgba(196, 169, 106, 0.08) !important;
}

.vote-lb-you td {
  color: var(--gold) !important;
  font-weight: 600;
}

/* Medal icons */
.vote-lb-medal {
  font-size: 1.1rem;
}

.vote-lb-gold {
  color: #ffd700;
}

.vote-lb-silver {
  color: #c0c0c0;
}

.vote-lb-bronze {
  color: #cd7f32;
}

/* Vote page responsive */
@media (max-width: 768px) {
  .vote-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vote-user-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .vote-user-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .vote-login-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .vote-grid {
    grid-template-columns: 1fr;
  }

  .vote-card {
    padding: 1rem;
  }

  .vote-lb-table thead th,
  .vote-lb-table tbody td {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ===================================================================
   HISCORES MOBILE ENHANCEMENTS
   =================================================================== */
@media (max-width: 480px) {
  .hiscores-header {
    padding: 0.75rem;
  }

  .hiscores-modes {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .mode-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.65rem;
  }

  .hiscores-search {
    flex-direction: column;
    width: 100%;
  }

  .hiscores-search .form-input {
    min-width: 0;
    width: 100%;
  }

  .hiscores-search .btn {
    width: 100%;
  }

  .hs-skill-filter {
    flex-direction: column;
  }

  .hs-filter-row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .hs-filter-field {
    min-width: 0;
    width: 100%;
  }

  .hs-compare-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }

  .hs-compare-skill {
    order: -1;
  }

  /* DataTables mobile */
  .dataTables_wrapper .dataTables_info {
    font-size: 0.7rem;
    text-align: center;
  }

  .dataTables_wrapper .dataTables_paginate {
    text-align: center;
    margin-top: 0.5rem;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  table.dataTable td,
  table.dataTable th {
    padding: 6px 8px !important;
    font-size: 0.75rem;
  }
}

/* ===================================================================
   ADMIN PANEL MOBILE
   =================================================================== */
@media (max-width: 768px) {
  .adm-wrap {
    padding: 80px 8px 32px;
  }

  .adm-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .adm-header h2 {
    font-size: 1.1rem;
    justify-content: center;
  }

  .adm-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 2px;
    padding-bottom: 4px;
  }

  .adm-tab {
    padding: 8px 10px;
    font-size: 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .adm-tab i {
    display: none;
  }

  .adm-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .adm-stat-card {
    padding: 12px 8px;
  }

  .adm-stat-card .stat-value {
    font-size: 1.3rem;
  }

  .adm-stat-card .stat-label {
    font-size: 0.68rem;
  }

  .adm-card {
    padding: 12px;
  }

  .adm-card-title {
    font-size: 0.85rem;
  }

  .adm-table {
    font-size: 0.72rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .adm-table th,
  .adm-table td {
    padding: 6px 8px;
    white-space: nowrap;
  }

  .adm-search {
    flex-direction: column;
    gap: 6px;
  }

  .adm-search input {
    min-width: 0;
    width: 100%;
  }

  .adm-detail-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .adm-filters {
    gap: 4px;
  }

  .adm-filter-btn {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  .adm-quick-actions {
    gap: 3px;
  }

  .adm-quick-actions .adm-btn {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .adm-pages {
    justify-content: center;
  }

  .adm-modal {
    width: 95% !important;
    max-width: none !important;
    margin: 10px;
    padding: 16px;
  }

  .adm-modal-footer {
    flex-direction: column;
  }

  .adm-modal-footer .adm-btn {
    width: 100%;
    text-align: center;
  }

  .adm-cfg-table td:first-child {
    width: auto;
    display: block;
    padding-bottom: 0;
  }

  .adm-cfg-table td:last-child {
    display: block;
    padding-top: 2px;
  }
}

@media (max-width: 480px) {
  .adm-stat-grid {
    grid-template-columns: 1fr;
  }

  .adm-wrap {
    padding: 76px 4px 24px;
  }

  .adm-table th,
  .adm-table td {
    font-size: 0.68rem;
    padding: 5px 6px;
  }
}

/* ==========================================================================
 * VOTE ADMIN STYLES
 * ========================================================================== */

.adm-vote-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.adm-vote-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.adm-vote-completed {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.adm-vote-claimed {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}
