:root{
  --brand-accent: #4a86ff;
  --page-bg-1: #121a24;
  --page-bg-2: #05070a;
  --panel-bg: #0b0f14;
  --panel-border: rgba(255,255,255,0.12);
  --divider: rgba(255,255,255,0.16);

  --text-main: #f6f8ff;
  --text-soft: #dfe6f7;
  --text-muted: rgba(255,255,255,0.62);

  --heading-color: #f9f6ea;
  --heading-accent: #ffd36a;
  --subheading-color: #f2e7c6;

  --link-color: #8fb5ff;
  --link-hover: #ffffff;

  --card-bg: var(--panel-bg);
  --card-border: var(--panel-border);
  --text-primary: var(--text-main);
  --text-accent: var(--heading-accent);
}
html, body {
  height: 100%;
}
body {
  background: radial-gradient(1200px 600px at 20% 0%, var(--page-bg-1), var(--page-bg-2)) fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  color: var(--text-main);
}
.site-content {
  flex: 1 0 auto;
  width: 100%;
}
footer {
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.navbar {
  position: relative;
  z-index: 1030;
}
.navbar .dropdown-menu {
  z-index: 1040;
}
.site-content {
  position: relative;
  z-index: auto;
}
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.site-bg__video,
.site-bg__image,
.site-bg__fallback,
.site-bg__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.site-bg__video,
.site-bg__image,
.site-bg__fallback {
  object-fit: cover;
  display: block;
}
.site-bg__fallback {
  display: none;
}
.site-bg--video .site-bg__fallback {
  display: none;
}
.site-bg__overlay {
  z-index: 1;
  background: rgba(0, 0, 0, var(--site-bg-overlay-opacity, 0.35));
}
@media (max-width: 767.98px) {
  .site-bg--mobile-static .site-bg__video {
    display: none;
  }
  .site-bg--mobile-static .site-bg__fallback {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-bg--reduce-motion .site-bg__video {
    display: none;
  }
  .site-bg--reduce-motion .site-bg__fallback {
    display: block;
  }
}
.card.bg-black {
  background-color: var(--panel-bg) !important;
}
.border-secondary {
  border-color: var(--panel-border) !important;
}
.text-secondary {
  color: var(--text-muted) !important;
}
.text-muted {
  color: var(--text-muted) !important;
}
small,
.small {
  color: var(--text-muted);
}
h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5,
.card-title,
.card-header,
.section-title,
.section-header,
.category-title,
.category-header {
  color: var(--heading-accent);
  text-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.subheading,
.section-subtitle {
  color: var(--subheading-color);
}
a {
  color: var(--link-color);
}
a:hover {
  color: var(--link-hover);
}
a.link-light {
  color: var(--link-color);
}
a.link-light:hover {
  color: var(--link-hover);
  text-decoration: underline !important;
}
.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
  color: var(--text-muted);
}
hr,
.divider {
  border-color: var(--divider) !important;
}
.btn-primary {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.btn-outline-light:hover {
  border-color: var(--brand-accent);
}
.navbar-online-badge {
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.navbar-online-badge:hover {
  color: #fff;
}
.navbar-online-badge.is-online {
  box-shadow: 0 0 12px rgba(25, 135, 84, 0.35);
}
.navbar-online-badge.is-online::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid rgba(25, 135, 84, 0.6);
  animation: navbarPulse 1.8s ease-out infinite;
}
@keyframes navbarPulse {
  0% { opacity: 0.6; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.15); }
}
.content h1, .content h2, .content h3, .content h4 {
  margin-top: 1.0rem;
}
.content p, .content li {
  color: var(--text-soft);
}
.content ul {
  margin-bottom: 1rem;
}
.content img, .content video, .content iframe {
  max-width: 100%;
}
.content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* CMS form readability */
.cms-form .form-label {
  color: var(--heading-color);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.cms-form .form-text,
.cms-form .text-secondary {
  color: var(--text-muted) !important;
}
.cms-form .form-text code {
  color: var(--heading-accent);
}

/* Features page pop */
.feature-lead {
  color: var(--text-soft) !important;
}
.feature-card-title {
  color: var(--text-accent);
  letter-spacing: 0.2px;
}
.feature-card-desc {
  color: var(--text-soft) !important;
}

/* Sidebar widgets */
.sidebar-widgets .card,
.sidebar-widgets .card-body {
  color: var(--text-soft) !important;
}
.sidebar-widgets .card-header {
  color: var(--text-accent) !important;
}
.sidebar-widgets .widget-muted {
  color: rgba(255,255,255,0.82) !important;
}
.sidebar-widgets .widget-list {
  padding-left: 1.05rem;
}
.sidebar-widgets .widget-list li {
  margin-bottom: 0.35rem;
  color: rgba(255,255,255,0.92) !important;
}
.sidebar-widgets .widget-meta {
  color: rgba(255,255,255,0.84) !important;
  margin-left: 0.35rem;
  white-space: nowrap;
}
.sidebar-widgets .widget-label {
  color: rgba(255,204,51,0.98) !important;
  font-weight: 600;
}
.sidebar-widgets .widget-killer {
  color: rgba(255,255,255,0.92) !important;
}
.sidebar-widgets .widget-death {
  line-height: 1.25rem;
}

/* Client download tooltip */
.cta-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}
.cta-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9999;
  width: 100%;
  max-width: 260px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cta-wrap:hover .cta-popover,
.cta-wrap:focus-within .cta-popover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Calendar widget */
.calendar-widget .calendar-weekdays,
.calendar-widget .calendar-grid {
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}
.calendar-widget .calendar-grid .calendar-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  border-radius: 0.4rem;
  color: rgba(255,255,255,0.92);
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.35rem 0.35rem 0.35rem 0.35rem;
}
.calendar-widget .calendar-grid .calendar-day.is-outside {
  opacity: 0.35;
}
.calendar-widget .calendar-grid .calendar-day.is-today {
  border-color: color-mix(in srgb, var(--brand-accent) 70%, #ffffff 30%);
  box-shadow: 0 0 0 0.15rem rgba(74, 134, 255, 0.12);
}
.calendar-widget .calendar-grid .calendar-day.has-event {
  background: rgba(255,255,255,0.06);
}
.calendar-widget .calendar-grid .calendar-day .calendar-num {
  font-weight: 700;
}
.calendar-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,204,51,0.95);
  flex: 0 0 auto;
  margin-top: 0.2rem;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}
.calendar-widget .calendar-grid .calendar-day .calendar-dots {
  position: absolute;
  bottom: 0.25rem;
  left: 0.25rem;
  display: flex;
  gap: 0.2rem;
}
.calendar-widget .calendar-grid .calendar-day .calendar-dots .calendar-dot {
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.gallery-thumb {
  cursor: zoom-in;
}

.progress-slim {
  height: 0.55rem;
  background-color: rgba(255,255,255,0.10);
}
.progress-slim .progress-bar {
  transition: width .25s ease;
}

.countdown-time {
  letter-spacing: 0.6px;
}

.news-rotator-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex: 0 0 auto;
}

.news-rotator .carousel-control-prev,
.news-rotator .carousel-control-next {
  width: 2.25rem;
  opacity: 0.65;
}
.news-rotator:hover .carousel-control-prev,
.news-rotator:hover .carousel-control-next {
  opacity: 0.95;
}

.class-icon {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex: 0 0 auto;
}

/* Forum board avatars */
.forum-board-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.forum-board-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.forum-board-avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}
.forum-board-avatar--xs {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.65rem;
}
.forum-board-avatar__fallback {
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* Home hero */
.home-hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .home-hero__grid {
    grid-template-columns: 1.3fr 0.7fr;
  }
}
.home-hero__media {
  display: flex;
  justify-content: center;
}
.home-hero__media img {
  width: 100%;
  max-width: 320px;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  object-fit: cover;
}
.home-hero--banner {
  margin-left: 0;
  margin-right: 0;
  border-radius: var(--bs-border-radius, 0.5rem);
  overflow: hidden;
  position: relative;
  background-image: var(--home-hero-banner, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (min-width: 768px) {
  .home-hero--banner {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
}

/* Classes page readability */
.classes-page .classes-title {
  background: linear-gradient(90deg, #ffffff 0%, color-mix(in srgb, var(--brand-accent) 70%, #ffffff 30%) 55%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.classes-page .classes-lead {
  color: var(--text-soft);
}
.classes-page .class-tagline {
  color: var(--text-soft);
}
.classes-page .class-name {
  color: var(--text-accent);
  text-shadow: 0 0 14px rgba(74,134,255,0.12);
}
.classes-page .classes-section-label {
  color: var(--text-accent);
  letter-spacing: 0.2px;
}
.classes-page .classes-body,
.classes-page li {
  color: var(--text-soft);
}
.classes-page .classes-strong {
  color: var(--text-primary);
}

/* Feature detail page readability */
.feature-page .content h1 {
  background: linear-gradient(90deg, #ffffff 0%, color-mix(in srgb, var(--brand-accent) 75%, #ffffff 25%) 60%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.2px;
}
.feature-page .content h2,
.feature-page .content h3,
.feature-page .content h4 {
  color: var(--text-accent);
}
.feature-page .content p,
.feature-page .content li {
  color: var(--text-soft);
}
.feature-page .content strong,
.feature-page .content b {
  color: var(--text-primary);
}
.feature-page .content a {
  color: var(--link-color);
}
.feature-page .content a:hover {
  color: var(--link-hover);
}
.feature-page .content blockquote {
  border-left: 3px solid var(--text-accent);
  padding-left: 0.85rem;
  color: var(--text-soft);
}
.feature-page .content code {
  color: var(--text-soft);
}

/* Spells page */
.spells-filters .form-control,
.spells-filters .form-select {
  background-color: rgba(10, 14, 20, 0.95) !important;
  color: rgba(255,255,255,0.96) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
.spells-filters .form-control::placeholder {
  color: rgba(255,255,255,0.62) !important;
}
.spells-filters .form-control:focus,
.spells-filters .form-select:focus {
  border-color: color-mix(in srgb, var(--brand-accent) 70%, #ffffff 30%) !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 134, 255, 0.18) !important;
}
.spells-table code {
  white-space: normal;
  word-break: break-word;
}
.spell-link {
  text-decoration: none;
}
.spell-link:hover {
  text-decoration: underline;
}
