/* ==========================================================================
   Eador: Adrageron — Layout & Global Grid System
   ========================================================================== */

/* 1. Глобальный контейнер */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* /* 2. Шапка сайта — аутентичная верхняя панель интерфейса Эадора
   (на базе сгенерированных HD ассетов: header_bar_hd.png, pillar_hd.png, slot_square_36.png, ruby_btn_slice.png) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 58px;
  margin-bottom: -58px;
  /* Бесшовный HD тайл: темный вулканический мрамор с чеканной каймой */
  background: #140504 url('../ui/header_bar_hd.png') repeat-x center top / auto 58px;
  box-shadow: 
    0 4px 18px rgba(0, 0, 0, 0.95);
  border: none;
  transition: box-shadow 0.3s ease;
}

.site-header--scrolled {
  background: #140504 url('../ui/header_bar_hd.png') repeat-x center top / auto 58px;
  box-shadow: 
    0 8px 28px rgba(0, 0, 0, 0.98),
    inset 0 -1px 0 rgba(212, 175, 55, 0.3);
}

/* 3. Навигация */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 58px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Логотип — золотая монограмма 'E' в шапке (аккуратный размер, без светящейся обводки) */
.nav-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 0.65rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.22s ease, filter 0.22s ease;
  z-index: 10;
  flex-shrink: 0;
}

.nav-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95)) brightness(1.1);
}

.nav-logo-monogram {
  width: 34px !important;
  height: 34px !important;
  max-height: none !important;
  object-fit: contain;
  filter: none;
}

/* Навигационный блок — ссылки лежат непосредственно на аутентичном каменном баре */
.nav-links {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 58px;
  background: none;
  border: none;
  box-shadow: none;
  filter: none;
}

.nav-links::before,
.nav-links::after {
  display: none;
}

.nav-links li {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Кельтские резные столбики-разделители pillar_hd.png между пунктами (крупные выразительные бортики) */
.nav-links li:not(:last-child)::after {
  content: '';
  display: block;
  width: 12px;
  height: 40px;
  margin: 0 0.9rem;
  background: url('../ui/pillar_hd.png') no-repeat center / contain;
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(244, 208, 63, 0.45)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.95));
}

@media (max-width: 1360px) {
  .nav-links li:not(:last-child)::after {
    width: 9px;
    height: 34px;
    margin: 0 0.55rem;
  }
}

/* Пункты навигации — благородный шрифт поверх единого каменного поля */
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 0.4rem;
  font-family: var(--font-fantasy, 'Cormorant Garamond', 'Philosopher', serif);
  font-size: 0.90rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #EDE6D8;
  text-decoration: none;
  background: none;
  border: none;
  text-shadow: 0 1px 2px #000000, 0 0 5px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* Активный пункт и hover */
.nav-links a:hover,
.nav-links a.active {
  color: #FFF4C8;
  text-shadow: 0 0 10px rgba(244, 208, 63, 0.9), 0 1px 2px #000;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 15%;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F4D03F, transparent);
  box-shadow: 0 0 6px rgba(244, 208, 63, 0.9);
}

/* Выделение Админки золотом */
.nav-links .nav-link-admin {
  color: #F8DA82;
}

.nav-links .nav-link-admin:hover {
  color: #FFFFFF;
  text-shadow: 0 0 12px rgba(244, 208, 63, 1);
}

/* Правая панель действий */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  flex-shrink: 0;
}


/* ==========================================================================
   Кнопка "Скачать игру" — золотой пергаментный свиток с золотой рамкой и свечением
   (аутентичный ассет пользователя media_1790189097005.png, бесшовно порезан по центру)
   ========================================================================== */
.header-btn-download-ruby {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 154px;
  height: 32px;
  padding: 0 1.2rem;
  border: none;
  background: url('../ui/eador_scroll_btn.png') no-repeat center / 100% 100%;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  /* Благородная глубинная тень без едкого неона, точно в стиль темного фэнтези */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
  transition: transform 0.22s cubic-bezier(0.2, 0, 0.2, 1), filter 0.22s cubic-bezier(0.2, 0, 0.2, 1);
  z-index: 5;
}

.header-btn-download-ruby::before,
.header-btn-download-ruby::after {
  display: none;
}

/* Текст кнопки античными чернилами с мягким тиснением на пергаменте */
.header-btn-download-ruby .ruby-btn-text {
  position: relative;
  z-index: 4;
  font-family: var(--font-fantasy, 'Cormorant Garamond', 'Philosopher', serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #24160E;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45);
  white-space: nowrap;
  margin-top: -1px;
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

/* Мягкий отклик при наведении в тон интерфейса Eador */
.header-btn-download-ruby:hover {
  transform: translateY(-1px);
  filter: 
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 6px rgba(212, 175, 55, 0.45));
}

.header-btn-download-ruby:hover .ruby-btn-text {
  color: #0E0502;
  text-shadow: 0 1px 0 rgba(255, 245, 215, 0.65);
}

.header-btn-download-ruby:active {
  transform: translateY(1px);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95));
}


.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(18, 25, 43, 0.7);
  border: 1px solid var(--gold-dark, #8B7355);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(36, 52, 71, 0.9);
  border-color: var(--gold-bright, #F4D03F);
}

.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background-color: var(--gold-bright, #F4D03F);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 4. Сетки (Grids) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

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

/* 5. Секции и заголовки */
.section {
  padding: 5rem 0;
  position: relative;
  box-sizing: border-box;
}

.section--elevated {
  background-color: var(--surface-mid, #12192B);
  border-top: 1px solid rgba(139, 115, 85, 0.25);
  border-bottom: 1px solid rgba(139, 115, 85, 0.25);
}

.section--deep {
  background-color: var(--surface-deepest, #070302);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: clamp(2rem, 3.5vw + 0.5rem, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
  background: linear-gradient(180deg, var(--gold-bright, #F4D03F) 0%, var(--gold-primary, #D4AF37) 50%, var(--gold-dark, #8B7355) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: inline-block;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  margin: 0.75rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-primary, #D4AF37), transparent);
}

.section-subtitle {
  font-family: var(--font-body, 'Lora', serif);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--parchment-base, #D4C4A8);
  margin: 0 auto;
  max-width: 650px;
}

/* 6. Мобильный плавающий бар скачивания */
.mobile-sticky-download {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  padding: 0.75rem 1.25rem;
  background: rgba(11, 18, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold-dark, #8B7355);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mobile-sticky-download__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-sticky-download__label {
  font-family: var(--font-ui, 'Montserrat', sans-serif);
  font-size: 0.75rem;
  color: var(--parchment-base, #D4C4A8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-sticky-download__version {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gold-bright, #F4D03F);
}

.mobile-sticky-download__btn {
  font-family: var(--font-ui, 'Montserrat', sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #2ECC71 0%, #229954 100%);
  color: #FFFFFF;
  text-decoration: none;
  border: 1px solid var(--gold-bright, #F4D03F);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
  white-space: nowrap;
}

/* ==========================================================================
   Медиа-запросы (Адаптивность)
   ========================================================================== */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .grid-gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    gap: 1.25rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2.75rem;
  }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .site-header {
    height: 48px;
    background: #140504 url('../ui/header_bar_pure.png') repeat-x center top / auto 48px;
  }

  .nav-container {
    height: 48px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    background: rgba(20, 5, 4, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--gold-dark, #8B7355);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  }

  .nav-links::before,
  .nav-links::after {
    display: none;
  }

  .nav-links.is-open {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(139, 115, 85, 0.15);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

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

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .grid-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

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

  .mobile-sticky-download {
    display: flex;
  }

  /* Добавляем нижний отступ телу страницы, чтобы контент не перекрывался плавающим баром */
  body.has-mobile-download {
    padding-bottom: 72px;
  }
}

/* ==========================================================================
   Tab-Screen Navigation (SPA-режим) & Фиксированный фон за камерой
   ========================================================================== */
body.site-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #0C0504 url('../hero-bg.jpg') center top / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.tab-screen {
  display: none !important;
  position: relative;
  background: transparent;
  overflow: hidden;
  z-index: 2;
}

.tab-screen::before {
  display: none !important;
}

#hero.tab-screen,
#download.tab-screen {
  background: transparent;
}

#about.tab-screen {
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 5, 4, 0.72) 0%, rgba(12, 5, 4, 0.88) 100%);
}

#multiplayer.tab-screen {
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 5, 4, 0.5) 0%, rgba(12, 5, 4, 0.78) 100%);
}

#gallery.tab-screen {
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 5, 4, 0.6) 0%, rgba(12, 5, 4, 0.82) 100%);
}

#changelog.tab-screen {
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 5, 4, 0.65) 0%, rgba(12, 5, 4, 0.85) 100%);
}

#community.tab-screen {
  background: radial-gradient(ellipse at 50% 35%, rgba(12, 5, 4, 0.55) 0%, rgba(12, 5, 4, 0.8) 100%);
}

.tab-screen.is-active {
  display: block !important;
  animation: tabFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#hero.tab-screen.is-active,
#download.tab-screen.is-active {
  display: flex !important;
  animation: tabFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#hero.tab-screen,
#download.tab-screen {
  min-height: calc(100vh - 58px);
  padding-top: 58px !important;
  box-sizing: border-box;
}

.tab-screen:not(#hero):not(#download) {
  padding-top: calc(58px + 2rem) !important;
  min-height: calc(100vh - 58px);
  box-sizing: border-box;
}

@keyframes tabFadeIn {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}



/* --------------------------------------------------------------------------
   Нижняя информационная полоса (Метаданные + Соцсети)
   -------------------------------------------------------------------------- */
.hero-bottom-bar {
  position: relative;
  z-index: 95;
  width: 100%;
  min-height: 58px;
  background: #140504 url('../ui/header_bar_hd.png') repeat-x center top / auto 58px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.95);
  border: none;
  padding: 0;
  box-sizing: border-box;
}

.hero-bottom-container {
  max-width: 1440px;
  min-height: 58px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.hero-meta-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-fantasy, 'Cormorant Garamond', 'Philosopher', serif);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #EDE6D8;
  text-shadow: 0 1px 2px #000000, 0 0 5px rgba(0, 0, 0, 0.95);
}

.hero-meta-item svg {
  width: 16px;
  height: 16px;
  fill: var(--gold-bright, #F4D03F);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

.hero-meta-right {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-fantasy, 'Cormorant Garamond', 'Philosopher', serif);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #EDE6D8;
  text-decoration: none;
  text-shadow: 0 1px 2px #000000, 0 0 5px rgba(0, 0, 0, 0.95);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.hero-social-link svg {
  width: 18px;
  height: 18px;
  fill: var(--gold-primary, #D4AF37);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
  transition: transform 0.2s ease, fill 0.2s ease;
}

.hero-social-link:hover {
  color: #FFF4C8;
  text-shadow: 0 0 10px rgba(244, 208, 63, 0.9), 0 1px 2px #000;
}

.hero-social-link:hover svg {
  fill: var(--gold-bright, #F4D03F);
  transform: scale(1.15);
}

@media (max-width: 820px) {
  .hero-bottom-container {
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   Image Performance, Preloading & Shimmer Skeleton Loading
   Eliminates jarring pop-ins, layout shifts, and progressive rendering lag
   ========================================================================== */

/* Shimmer Skeleton Placeholder for image containers */
.img-skeleton {
  position: relative;
  background-color: #0c0504;
  overflow: hidden;
}

.img-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0) 0%,
    rgba(212, 175, 55, 0.08) 50%,
    rgba(212, 175, 55, 0) 100%
  );
  animation: img-skeleton-shimmer 1.8s infinite;
  pointer-events: none;
  z-index: 1;
}

.img-skeleton.is-loaded::after,
.img-skeleton:not(:has(img:not(.is-loaded)))::after {
  display: none !important;
}

@keyframes img-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Smooth fade-in for images once loaded to prevent jarring cuts */
img.smooth-fade {
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

img.smooth-fade.is-loaded {
  opacity: 1 !important;
}

/* Make sure picture elements take full dimensions of their container */
picture {
  display: contents;
}

.gallery-card__media picture,
.news-card-media picture,
.multiplayer-img-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Page Preloader & Screen Transition Progress Bar
   Authentic Dark Fantasy Gold Aesthetics for Slow Networks
   ========================================================================== */

/* Fullscreen Initial Preloader */
.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #080303 radial-gradient(circle at 50% 45%, rgba(45, 14, 12, 0.75) 0%, #080303 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease, visibility 0.18s;
  pointer-events: all;
}

.page-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

.preloader-crest-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.15);
  border-top-color: #F4D03F;
  border-right-color: #D4AF37;
  animation: preloader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 16px rgba(244, 208, 63, 0.25);
}

.preloader-monogram {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(244, 208, 63, 0.6));
  animation: preloader-pulse 2s ease-in-out infinite;
}

.preloader-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #F4D03F;
  text-shadow: 0 0 12px rgba(244, 208, 63, 0.5);
}

.preloader-status {
  font-family: var(--font-fantasy, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #D4C4A8;
}

.preloader-bar {
  width: 140px;
  height: 3px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.preloader-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, #8B6508, #F4D03F, #FFFFFF);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(244, 208, 63, 0.9);
  animation: preloader-flow 1.5s ease-in-out infinite;
}

@keyframes preloader-spin {
  100% { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(244, 208, 63, 0.5)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(244, 208, 63, 0.85)); }
}

@keyframes preloader-flow {
  0% { left: -40%; width: 30%; }
  50% { width: 60%; }
  100% { left: 100%; width: 40%; }
}

/* Molten Gold Top Progress Bar for SPA Screen Switches */
.screen-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #8B6508, #D4AF37, #F4D03F, #FFFFFF);
  box-shadow: 0 0 12px rgba(244, 208, 63, 0.9), 0 0 4px rgba(255, 255, 255, 0.8);
  z-index: 999999;
  transition: width 0.35s ease, opacity 0.3s ease;
  pointer-events: none;
  opacity: 0;
}

.screen-progress-bar.is-active {
  opacity: 1;
}

/* Screen Transition Loader for SPA Tab Navigation */
.screen-transition-loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(8, 3, 3, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.screen-transition-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.screen-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.4rem 2.2rem;
  background: rgba(20, 7, 6, 0.94);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95), 0 0 20px rgba(212, 175, 55, 0.2);
}

.screen-loader-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: #F4D03F;
  border-right-color: #D4AF37;
  animation: preloader-spin 0.8s linear infinite;
  box-shadow: 0 0 14px rgba(244, 208, 63, 0.4);
}

.screen-loader-text {
  font-family: var(--font-fantasy, 'Cormorant Garamond', serif);
  font-size: 1.15rem;
  color: #F4D03F;
  font-style: italic;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(244, 208, 63, 0.6);
  white-space: nowrap;
}




