@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark Mode (Default) */
  --bg-dark: #000000;
  /* Deep black as requested */
  --bg-card: #0F0F0F;
  --bg-card-hover: #1a1a24;
  --crystal: #00d4ff;
  --crystal-dim: transparent;
  /* Simpler background */
  /* Simpler background */
  --accent: #ffffff;
  --accent-dim: transparent;
  --accent-glow: rgba(255, 255, 255, 0.4);
  /* New glow for hover effects */
  /* Simpler background */
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --success: #22c55e;
  --danger: #ef4444;

  --grid-line: #ffffff08;
  /* Subtle white grid for dark mode */
}

body.light-mode {
  /* Light Mode */
  --bg-dark: #ffffff;
  --bg-card: #f4f4f5;
  --bg-card-hover: #e4e4e7;
  --text: #18181b;
  --text-muted: #52525b;
  --text: #18181b;
  --text-muted: #52525b;
  --border: #d4d4d8;

  --crystal-dim: #00d4ff40;
  --accent-dim: #a855f740;

  --grid-line: #00000008;
  /* Subtle black grid for light mode */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  transition: background-color 0.35s ease, color 0.35s ease;
  /* Grid pattern */
  background-size: 40px 40px, 40px 40px, cover, cover;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, center top, right center;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--crystal-dim), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, var(--accent-dim), transparent);
}

body[data-background-theme='ember'] {
  --bg-dark: #120904;
  --bg-card: #1a120d;
  --bg-card-hover: #29180f;
  --crystal: #ff8a1f;
  --accent: #ffd6a3;
  --crystal-dim: rgba(255, 138, 31, 0.22);
  --accent-dim: rgba(255, 180, 92, 0.14);
  --grid-line: rgba(255, 138, 31, 0.08);
}

body[data-background-theme='web'] {
  --bg-dark: #050507;
  --bg-card: #0f1014;
  --bg-card-hover: #191b22;
  --crystal: #d7d7d7;
  --accent: #f6f6f6;
  --crystal-dim: rgba(215, 215, 215, 0.14);
  --accent-dim: rgba(255, 255, 255, 0.07);
  --grid-line: rgba(255, 255, 255, 0.05);
}

body[data-background-theme='ice'] {
  --bg-dark: #041018;
  --bg-card: #071824;
  --bg-card-hover: #0b2434;
  --crystal: #66e6ff;
  --accent: #e6fbff;
  --crystal-dim: rgba(102, 230, 255, 0.18);
  --accent-dim: rgba(221, 250, 255, 0.08);
  --grid-line: rgba(102, 230, 255, 0.07);
}

body[data-background-theme='void'] {
  --bg-dark: #080411;
  --bg-card: #10091c;
  --bg-card-hover: #1c1230;
  --crystal: #b893ff;
  --accent: #f5ecff;
  --crystal-dim: rgba(184, 147, 255, 0.16);
  --accent-dim: rgba(244, 231, 255, 0.08);
  --grid-line: rgba(184, 147, 255, 0.06);
}

body[data-background-theme='nether'] {
  --bg-dark: #180601;
  --bg-card: #260c05;
  --bg-card-hover: #361008;
  --crystal: #ff8b4d;
  --accent: #ffe7d0;
  --crystal-dim: rgba(255, 139, 77, 0.2);
  --accent-dim: rgba(255, 192, 149, 0.1);
  --grid-line: rgba(255, 139, 77, 0.07);
}

body[data-background-theme='aurora'] {
  --bg-dark: #041b1c;
  --bg-card: #07282a;
  --bg-card-hover: #0b393c;
  --crystal: #2dd4bf;
  --accent: #ccfbf1;
  --crystal-dim: rgba(45, 212, 191, 0.16);
  --accent-dim: rgba(34, 211, 238, 0.08);
  --grid-line: rgba(45, 212, 191, 0.06);
}

body[data-background-theme='sunset'] {
  --bg-dark: #1a0810;
  --bg-card: #28101a;
  --bg-card-hover: #3a1624;
  --crystal: #ff9f43;
  --accent: #ffe8c7;
  --crystal-dim: rgba(255, 159, 67, 0.18);
  --accent-dim: rgba(255, 203, 151, 0.08);
  --grid-line: rgba(255, 159, 67, 0.06);
}

body[data-background-theme='cyber'] {
  --bg-dark: #04070e;
  --bg-card: #08111f;
  --bg-card-hover: #0d1b31;
  --crystal: #7df9ff;
  --accent: #ff3df2;
  --crystal-dim: rgba(125, 249, 255, 0.18);
  --accent-dim: rgba(255, 61, 242, 0.1);
  --grid-line: rgba(125, 249, 255, 0.06);
}

body[data-background-theme='forest'] {
  --bg-dark: #05130a;
  --bg-card: #0b1e11;
  --bg-card-hover: #112a17;
  --crystal: #34d399;
  --accent: #dcfce7;
  --crystal-dim: rgba(52, 211, 153, 0.16);
  --accent-dim: rgba(134, 239, 172, 0.08);
  --grid-line: rgba(52, 211, 153, 0.06);
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  justify-content: center;
  /* Center the whole group */
}

.sidebar-logo {
  max-width: 50px;
  /* Smaller logo as requested */
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--crystal);
}

.sidebar-logo:hover {
  transform: scale(1.05);
}

.sidebar nav {
  flex: 1;
}

.sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar nav li {
  list-style: none;
}

.nav-group {
  margin: 0;
}

.nav-dropdown {
  border: 1px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
}

.nav-dropdown[open] {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
}

.nav-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary:hover {
  background: var(--bg-card-hover);
  color: var(--crystal);
}

.nav-dropdown-caret {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.nav-dropdown[open] .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0.2rem 0.35rem 0.75rem;
}

.nav-group-list a {
  padding-left: 1rem;
  border-left: 2px solid transparent;
}

.nav-group-list a.active {
  background: var(--bg-card-hover);
  border-left-color: var(--crystal);
  color: var(--crystal);
}

.sidebar nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar nav a:hover {
  background: var(--bg-card-hover);
  color: var(--crystal);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-ad-rail {
  width: 320px;
  flex-shrink: 0;
  padding: 1.5rem 1.5rem 1.5rem 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-ad-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: opacity, transform;
}

.sidebar-ad-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.sidebar-ad-card.is-visible:hover {
  transform: translateY(-2px);
}

.sidebar-ad-badge,
.sidebar-ad-image,
.sidebar-ad-body,
.sidebar-ad-button {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.sidebar-ad-expiry {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  margin-top: -0.15rem;
}

body.theme-light .sidebar-ad-expiry {
  color: rgba(13, 13, 18, 0.55);
}

.sidebar-ad-card.is-visible .sidebar-ad-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

.sidebar-ad-card.is-visible .sidebar-ad-image {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.16s;
}

.sidebar-ad-card.is-visible .sidebar-ad-body {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.24s;
}

.sidebar-ad-card.is-visible .sidebar-ad-button {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.32s;
}

.sidebar-ad-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--crystal-dim);
  color: var(--crystal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-ad-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
}

.sidebar-ad-image--empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.sidebar-ad-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-ad-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.sidebar-ad-text {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.sidebar-ad-button {
  width: 100%;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--crystal);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: block;
}

.logo span {
  color: var(--accent);
}

.nav-discord {
  color: var(--accent) !important;
}

.nav-discord:hover {
  color: var(--crystal) !important;
}

footer a {
  color: var(--crystal);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--crystal), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

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

.category-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--crystal-dim);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
}

.category-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.category-card-text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.faq-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--crystal-dim);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 1rem;
  line-height: 1.4;
}

.faq-caret {
  color: var(--crystal);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-caret {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-answer p + p,
.faq-answer p + ol,
.faq-answer p + ul {
  margin-top: 0.85rem;
}

.faq-steps {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.faq-steps li {
  padding-left: 0.25rem;
}

.faq-note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-muted);
}

.faq-note strong {
  color: var(--text);
}

/* Main */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.site-viewers-display {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.site-viewers-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.site-viewers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.site-viewers-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-viewers-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-viewers-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--crystal);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
  scroll-margin-top: 2rem;
  /* Reduced offset */
}

/* Texture Pack Grid */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

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

.practice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s;
}

.practice-card-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}

.practice-card-image {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-dark);
}

.practice-card-image--empty {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--crystal);
  text-transform: uppercase;
}

.practice-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 0 15px var(--accent-glow);
}

.practice-card-info {
  flex: 1;
  min-width: 0;
}

.practice-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.practice-card-ip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
}

.practice-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Changelog Styles */
.changelog-container {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.changelog-item:hover {
  transform: translateY(-2px);
  border-color: var(--crystal-dim);
}

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

.changelog-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.changelog-tag {
  background: var(--crystal-dim);
  color: var(--crystal);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.changelog-content {
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.changelog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* Tierlist Styles */
.tierlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Changed from auto-fill and minmax(300px) */
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tierlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s, border-color 0.2s;
}

.tierlist-card:hover {
  transform: translateY(-2px);
  border-color: var(--crystal-dim);
}

.tierlist-card-name {
  font-size: 1.25rem;
  color: var(--text);
  margin: 0;
}

.tierlist-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.tierlist-member-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-dark);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  width: fit-content;
}

.tierlist-member-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.pack-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 0 15px var(--accent-glow);
}

.pack-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-dark);
}

.pack-body {
  padding: 1.25rem;
}

.pack-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.pack-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pack-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--crystal), #0099cc);
  color: #0d0d12;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #33ddff, var(--crystal));
  color: #0d0d12;
}

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

.btn-secondary:hover {
  background: #3f3f46;
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

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

.discord-feedback {
  margin-left: 0.75rem;
  font-size: 0.9rem;
}

.discord-feedback--success {
  color: var(--success);
}

.discord-feedback--error {
  color: var(--danger);
}

.discord-section {
  text-align: center;
  font-size: 1.5rem;
  margin-top: 5rem; /* Added to move content down */
}

.rating-widget {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

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

.rating-stars {
  display: inline-flex;
  gap: 0.15rem;
}

.star-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.1s;
}

.star-btn:hover {
  color: var(--crystal);
  transform: scale(1.1);
}

.star-btn:focus {
  outline: none;
  color: var(--crystal);
}

.star-btn--filled {
  color: #eab308;
}

.rating-avg {
  font-size: 0.85rem;
  color: var(--crystal);
  font-weight: 600;
  margin-left: 0.25rem;
}

.star-btn:hover,
.star-btn--filled:hover {
  color: #facc15;
}

.pack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn-edit {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 1rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Admin page */
.admin-section {
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  color: var(--crystal);
}

.admin-dashboard {
  max-width: 1200px; /* Increased max-width for multi-column layout */
  margin: 2rem auto;
  padding: 0 1.5rem; /* Add some padding for wider layout */
}

.admin-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.admin-card {
  margin-bottom: 1.5rem;
}

.login-error {
  color: var(--danger);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
  gap: 1.5rem; /* Space between grid items */
  align-items: start; /* Align items to the top */
}

/* Responsive adjustments for admin panel */
@media (max-width: 768px) {
  .site-viewers-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard {
    padding: 0 1rem;
  }
  .admin-grid {
    grid-template-columns: 1fr; /* Stack columns on small screens */
  }
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.form-group input[type="file"] {
  padding: 0.55rem 0.75rem;
}

.form-group input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card-hover);
  color: var(--text);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.form-group input[type="file"]::file-selector-button:hover {
  background: var(--border);
}

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

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

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success);
  color: #4ade80;
}

.alert-info {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--crystal-dim);
  color: var(--crystal);
}

.json-output {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  resize: vertical;
  margin-top: 0.5rem;
}

/* Sortable List */
.sortable-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sortable-item {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  transition: border-color 0.2s, background 0.2s;
}

.sortable-item:hover {
  border-color: var(--crystal-dim);
}

.sortable-item.dragging {
  opacity: 0.5;
  background: var(--bg-card-hover);
  border-color: var(--crystal);
  cursor: grabbing;
}

.sortable-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.sortable-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.drag-handle {
  color: var(--text-muted);
  margin-right: 0.75rem;
  font-size: 1.2rem;
  line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

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

  .sidebar nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .sidebar nav a,
  .nav-dropdown summary {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    background: var(--bg-card-hover);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-group-list {
    padding: 0.2rem 0.25rem 0.65rem;
  }

  .sidebar-footer {
    display: none;
    /* Hide toggle in sidebar on mobile if space is tight, or keep it */
    padding-top: 1rem;
  }

  /* Show toggle somewhere else? Or just keep it. Let's keep it but inline */
  .sidebar-footer {
    display: block;
    border-top: none;
    padding-top: 0.5rem;
  }

  .hero {
    padding: 3rem 1rem 2rem;
  }

  .packs-grid,
  .practice-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-ad-rail {
    width: 100%;
    padding: 1rem;
  }

  .sidebar-ad-card {
    transform: none;
    opacity: 1;
  }

  .sidebar-ad-badge,
  .sidebar-ad-image,
  .sidebar-ad-body,
  .sidebar-ad-button {
    opacity: 1;
    transform: none;
  }
}

/* About Section Styles */
.about-section {
  padding: 4rem 2rem;
  background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.05));
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-content h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.18);
}

.about-content p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.about-content strong {
  color: var(--text);
}

/* Player Count Styles */
.player-count {
  font-size: 0.85rem;
  margin: 0.5rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-count span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-icon {
  background: var(--text-muted);
  animation: bgPulse 2s infinite;
}

.status-online {
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.status-offline {
  background: #f87171;
}

.is-online {
  color: var(--text);
}

@keyframes bgPulse {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

.practice-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
