:root {
  --gold: #ddd9b0;
  --gold-glow: rgba(221, 217, 176, 0.4);
  --bg-dark: #070e09;
  --panel-bg: rgba(10, 22, 14, 0.78);
  --text-light: #f3f1e4;
  --accent-green: #7fffd4;
  --glow-green: rgba(127, 255, 212, 0.35);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1c3623;
  border: 2px solid var(--bg-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: "Cormorant Garamond", serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Background image is assets/bg.png */
.bg-gate {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at center, rgba(16, 28, 20, 0.1) 0%, rgba(7, 14, 9, 0.55) 100%), url("assets/bg.png") center/cover no-repeat;
  filter: brightness(0.92);
  transform: scale(1.02);
  transform-origin: center;
  transition: filter 3s cubic-bezier(0.25, 1, 0.5, 1), transform 4s cubic-bezier(0.25, 1, 0.5, 1);
}

.bg-gate-karus {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(28, 16, 16, 0.1) 0%, rgba(14, 7, 7, 0.55) 100%), url("assets/gb-karus.png") center/cover no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
}

body.karus-theme .bg-gate-karus {
  opacity: 1;
}

body.karus-theme {
  --gold: #b0bec5;
  --gold-glow: rgba(176, 190, 197, 0.45);
  --bg-dark: #0f1112;
  --panel-bg: rgba(20, 22, 24, 0.82);
  --accent-green: #90a4ae;
  --glow-green: rgba(144, 164, 174, 0.35);
}

body.stage-camera-moving .bg-gate {
  transform: scale(1.1);
}

body.stage-fog-parting .bg-gate {
  filter: brightness(0.92);
}

/* Canvas Particles */
.transition-overlay-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 2.5s ease;
}

body.stage-camera-moving .transition-overlay-canvas {
  opacity: 1;
}

/* --- Fog transition layers --- */
.transition-fog-container {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 2s cubic-bezier(0.25, 1, 0.5, 1);
}

.fog-center-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at center, rgba(221, 217, 176, 0.12) 0%, transparent 65%);
  filter: blur(30px);
  opacity: 1;
  mix-blend-mode: screen;
  transition: opacity 1.5s ease;
}

.fog-spin {
  position: absolute;
  width: 250vmax;
  height: 250vmax;
  background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 35%),
                    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 45%);
  filter: blur(50px);
  opacity: 1;
  mix-blend-mode: screen;
  transition: transform 4s cubic-bezier(0.25, 1, 0.5, 1), opacity 2s ease;
}

.fog-spin-1 {
  transform: rotate(0deg) scale(1);
}
body.stage-camera-moving .fog-spin-1 {
  transform: rotate(45deg) scale(1.1);
}

.fog-spin-2 {
  transform: rotate(180deg) scale(0.95);
  opacity: 0.8;
}
body.stage-camera-moving .fog-spin-2 {
  transform: rotate(120deg) scale(1.05);
}

/* Side panels that split/part to left and right */
.fog-side-left, .fog-side-right {
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 60%;
  background: radial-gradient(circle at center, rgba(14, 27, 18, 0.98), rgba(7, 14, 9, 1));
  filter: blur(20px);
  transition: transform 2.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 2s ease;
}

.fog-side-left {
  left: -10%;
  transform: translateX(0);
}

.fog-side-right {
  right: -10%;
  transform: translateX(0);
}

/* Parting transition */
body.stage-fog-parting .fog-side-left {
  transform: translateX(-110%);
  opacity: 0;
}

body.stage-fog-parting .fog-side-right {
  transform: translateX(110%);
  opacity: 0;
}

body.stage-fog-parting .fog-spin {
  opacity: 0;
  transform: rotate(90deg) scale(1.3);
}

body.stage-fog-parting .fog-center-glow {
  opacity: 0;
}

body.stage-menus-reveal .transition-fog-container {
  opacity: 0;
  display: none;
}

/* --- Main Header Menu --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  padding: 10px 5%;
  z-index: 80;
  background: linear-gradient(to bottom, rgba(7, 14, 9, 0.9) 0%, rgba(7, 14, 9, 0.5) 70%, transparent 100%);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(221, 217, 176, 0.15);
}

.brand {
  text-align: left;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.crest-svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 4px var(--gold-glow));
}

.brand strong {
  font-family: "Cinzel", serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  display: block;
}

.brand small {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--gold);
  margin-top: 2px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(15px, 2.5vw, 36px);
}

.nav-links a {
  color: var(--text-light);
  font-family: "Cinzel", serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
  opacity: 1;
  color: var(--gold);
  text-shadow: 0 0 6px var(--gold-glow);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--gold);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
  left: 0;
}

.auth-buttons-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login, .register {
  background: url("assets/shapes/main-button.png") center/100% 100% no-repeat;
  border: none;
  color: var(--gold);
  padding: 13px 32px 15px;
  font-family: "Cinzel", serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 140px;
  height: 52px;
  filter: brightness(1.0) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.login:hover, .register:hover {
  filter: brightness(1.18) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px var(--gold-glow));
  color: #fff;
}

/* --- Layout Grid --- */
/* --- Slider Viewport & Container --- */
.slider-viewport {
  width: 100%;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 105px; /* clear header */
  margin-bottom: 85px; /* clear footer */
}

.sections-slider-container {
  display: flex;
  width: 700%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.sections-slider-container.news-active {
  transform: translateX(-14.2857%);
}

.sections-slider-container.ranking-active {
  transform: translateX(-28.5714%);
}

.sections-slider-container.download-active {
  transform: translateX(-42.8571%);
}

.sections-slider-container.guide-active {
  transform: translateX(-57.1429%);
}

.sections-slider-container.community-active {
  transform: translateX(-71.4286%);
}

.sections-slider-container.event-active {
  transform: translateX(-85.7143%);
}

.section-wrapper {
  width: 14.2857%;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  padding: 0 2.5% 50px;
}

.home-section-wrapper {
  padding-left: 1.5%;
  padding-right: 1.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-layout-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.portal-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 60px;
  min-height: 480px;
}

/* Left Column (Hero copy and Play CTA) */
.portal-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* --- Global Section Title Styling (Like Download Page) --- */
.section-title-section {
  text-align: center;
  margin-bottom: 25px;
}

.section-main-title {
  font-family: "Cinzel", serif;
  font-size: clamp(32px, 4vw, 52px) !important;
  font-weight: 700 !important;
  letter-spacing: 6px !important;
  margin: 0 !important;
  background: linear-gradient(to bottom, #ffffff 20%, #ebdcb0 60%, #bca76e 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 10px rgba(221, 217, 176, 0.2) !important;
  text-transform: uppercase !important;
  display: inline-block;
}

.section-subtitle {
  font-family: "Cinzel", serif !important;
  font-size: clamp(9px, 1.2vw, 12px) !important;
  letter-spacing: 4px !important;
  color: rgba(221, 217, 176, 0.85) !important;
  margin: 6px 0 10px !important;
  text-transform: uppercase !important;
}

.title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 480px;
  margin: 0 auto;
}

.ornament-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, rgba(221, 217, 176, 0.4), transparent);
}

.ornament-gem-svg {
  filter: drop-shadow(0 0 5px rgba(127, 255, 212, 0.5));
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(38px, 4vw, 54px) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  margin: 0 0 10px !important;
  letter-spacing: 1.5px !important;
  background: linear-gradient(to bottom, #ffffff 20%, #ebdcb0 60%, #bca76e 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: block !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.hero-description {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
  max-width: 600px;
  color: rgba(243, 241, 228, 0.95);
  margin: 0 0 35px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(7, 14, 9, 0.9), 0 0 10px rgba(7, 14, 9, 0.5);
}

/* Large Pulsing CTA Play Button */
.btn-play-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 50px 22px;
  width: min(350px, 100%);
  height: 102px;
  background: url("assets/shapes/main-button.png") center/100% 100% no-repeat;
  border: none;
  text-decoration: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  align-self: flex-start;
  filter: brightness(1.0) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}

.btn-play-now:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.18) drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 8px var(--gold-glow));
}

.play-title {
  font-family: "Cinzel", serif;
  font-size: 29px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px var(--gold-glow);
}

.btn-play-now:hover .play-title {
  color: #fff;
}

.play-subtitle {
  font-size: 12px;
  font-family: "Cinzel", serif;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.85;
}

/* Tiny Online Status to the left of Login/Register */
.login-status-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  margin-left: 20px;
}

.header-server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(221, 217, 176, 0.75);
  font-weight: 600;
}

.status-dot-blink {
  width: 6px;
  height: 6px;
  background: #00ff66;
  border-radius: 50%;
  box-shadow: 0 0 6px #00ff66;
  animation: dotPulse 1.5s infinite ease-in-out;
}

.status-val-online {
  color: #00ff66;
  font-weight: 700;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Choose Your Nation layout */
.nation-selection-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin-top: 10px;
  animation: fadeInRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.nation-section-title {
  font-family: "Cinzel", serif;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--gold);
  margin: 0 0 6px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 8px rgba(221, 217, 176, 0.3);
}

.nation-section-title .leaf-icon {
  font-size: 18px;
  opacity: 0.85;
}

.nation-section-subtitle {
  font-size: 12.5px;
  color: rgba(243, 241, 228, 0.75);
  margin: 0 0 15px;
  text-align: center;
}

.nation-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

/* Individual Nation Card */
.nation-card {
  background: rgba(10, 22, 14, 0.65);
  border: none !important;
  border-radius: 6px;
  padding: 25px 20px 45px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.95), 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.nation-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nation-crest-wrap {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  transition: transform 0.4s ease;
}

.nation-card:hover .nation-crest-wrap {
  transform: scale(1.08);
}

.nation-crest-svg {
  filter: drop-shadow(0 0 8px rgba(221, 217, 176, 0.2));
  transition: all 0.4s ease;
}

/* Card backgrounds and themes */
.el-morad-card {
  background: url('assets/community/elmorad.png') center/cover no-repeat;
}

.el-morad-card:hover {
  box-shadow: 0 0 25px rgba(104, 157, 113, 0.45), 0 15px 35px rgba(0, 0, 0, 0.85);
}

.el-morad-card:hover .elmorad-crest {
  filter: drop-shadow(0 0 12px rgba(104, 157, 113, 0.8));
}

.karus-card {
  background: url('assets/community/karuss.png') center/cover no-repeat;
}

.karus-card:hover {
  box-shadow: 0 0 25px rgba(144, 164, 174, 0.45), 0 15px 35px rgba(0, 0, 0, 0.85);
}

.karus-card:hover .karus-crest {
  filter: drop-shadow(0 0 12px rgba(221, 217, 176, 0.6));
}

/* Typography Inside Cards */
.nation-title {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 0 5px;
  font-weight: 700;
}

.nation-tagline {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(221, 217, 176, 0.6);
  font-weight: 600;
}

.divider-line {
  width: 40px;
  height: 1px;
  background: rgba(221, 217, 176, 0.25);
  margin: 10px 0;
  transition: width 0.4s ease, background-color 0.4s ease;
}

.nation-card:hover .divider-line {
  width: 75px;
  background-color: var(--gold);
}

.nation-desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(243, 241, 228, 0.75);
  margin: 0;
  min-height: 54px;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Full Width Blurred Footer --- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 80;
  background: linear-gradient(to top, rgba(7, 14, 9, 0.95) 0%, rgba(7, 14, 9, 0.7) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(221, 217, 176, 0.12);
  padding: 12px 0 8px;
  margin-top: 0;
}

.footer-content {
  width: 94%;
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-social-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
}

.footer-server-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 0 8px var(--gold-glow);
}

body.karus-theme .footer-server-status {
  color: #b0bec5 !important;
  text-shadow: 0 0 8px rgba(176, 190, 197, 0.45) !important;
}

.footer-social-block .follow-label {
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-social-block .social-icons {
  display: flex;
  gap: 20px;
}

.footer-social-block .social-icons a {
  color: rgba(243, 241, 228, 0.55);
  transition: all 0.3s ease;
}

.footer-social-block .social-icons a:hover {
  color: var(--gold);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 4px var(--gold-glow));
}

.main-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(221, 217, 176, 0.08);
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(243, 241, 228, 0.45);
  width: 100%;
}

.main-footer-bar a {
  color: rgba(243, 241, 228, 0.45);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* --- Staggered Entry Animations --- */
.transition-item {
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.stage-menus-reveal .transition-item {
  animation: fadeSlideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: auto;
}

/* Delays */
body.stage-menus-reveal .brand.transition-item { animation-delay: 0.1s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(1) { animation-delay: 0.20s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(2) { animation-delay: 0.28s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(3) { animation-delay: 0.36s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(4) { animation-delay: 0.44s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(5) { animation-delay: 0.52s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(6) { animation-delay: 0.60s; }
body.stage-menus-reveal .nav-links a.transition-item:nth-child(7) { animation-delay: 0.68s; }
body.stage-menus-reveal .login.transition-item { animation-delay: 0.76s; }

body.stage-menus-reveal .portal-left.transition-item { animation-delay: 0.95s; }
body.stage-menus-reveal .server-status-card.transition-item { animation-delay: 1.15s; }
body.stage-menus-reveal .event-card.transition-item { animation-delay: 1.3s; }
body.stage-menus-reveal .news-card.transition-item { animation-delay: 1.45s; }

body.stage-menus-reveal .site-footer.transition-item { animation-delay: 1.65s; }

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
  .main-header {
    grid-template-columns: 1fr auto;
    padding: 12px 4%;
  }
  
  .nav-links {
    grid-column: 1 / -1;
    justify-content: space-around;
    margin-top: 15px;
    width: 100%;
    order: 3;
    border-top: 1px solid rgba(221, 217, 176, 0.15);
    padding-top: 12px;
  }

  .slider-viewport {
    margin-top: 155px;
    margin-bottom: 85px;
  }

  .portal-grid {
    gap: 30px;
  }
}

@media (max-width: 850px) {
  .portal-grid {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .portal-left {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
  }

  .btn-play-now {
    align-self: center;
  }

  .nation-selection-section {
    margin: 30px auto 0;
    max-width: 600px;
  }
}

@media (max-width: 600px) {
  .main-footer-bar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .nation-selection-section {
    max-width: 100%;
  }
  .nation-cards-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .nation-card {
    min-height: 280px;
    padding: 20px;
  }

  .login {
    padding: 10px 22px 12px;
    font-size: 11px;
    min-width: 120px;
    height: 44px;
  }
}

@media (max-width: 500px) {
  .nav-links {
    gap: 8px;
  }
  .nav-links a {
    font-size: 11px;
    letter-spacing: 0.5px;
  }
  .main-header {
    padding: 10px 3%;
  }
  .slider-viewport {
    margin-top: 145px;
    margin-bottom: 85px;
  }

  .btn-play-now {
    width: min(300px, 95vw);
    height: 84px;
    padding: 12px 35px 16px;
  }
  .play-title {
    font-size: 24px;
  }
  .play-subtitle {
    font-size: 10px;
    letter-spacing: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-gate {
    transition: none !important;
    transform: none !important;
  }
  .transition-item {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* --- Page Slider Transitions --- */
.page-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
}

.page-container.page-slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.page-container.page-slide-out-left {
  animation: slideOutLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.page-container.page-slide-in-left {
  animation: slideInLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.page-container.page-slide-out-right {
  animation: slideOutRight 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100vw); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100vw); opacity: 0; }
}
@keyframes slideInLeft {
  from { transform: translateX(-100vw); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100vw); opacity: 0; }
}

/* Override reveal styles if entering via slide transition */
.page-slide-in-right .transition-item,
.page-slide-in-left .transition-item {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  animation: none !important;
}

/* Karus Theme Border & Highlight Overrides */
body.karus-theme .nation-card,
body.karus-theme .community-post-box,
body.karus-theme .community-rules-box,
body.karus-theme .feed-post-card,
body.karus-theme .event-item-card,
body.karus-theme .news-feed-item,
body.karus-theme .ranking-table-container,
body.karus-theme .download-card,
body.karus-theme .guide-content-panel,
body.karus-theme .guide-sidebar-card,
body.karus-theme .main-header,
body.karus-theme .site-footer {
  border-color: rgba(176, 190, 197, 0.25) !important;
}

body.karus-theme .nation-card::before,
body.karus-theme .community-rules-box::before,
body.karus-theme .community-post-box::before,
body.karus-theme .feed-post-card::before,
body.karus-theme .event-item-card::before {
  border-color: rgba(176, 190, 197, 0.08) !important;
}

/* Card Selection Highlights */
body.karus-theme .karus-card.active {
  box-shadow: 0 0 25px rgba(176, 190, 197, 0.45), 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(176, 190, 197, 0.15) !important;
}

body.karus-theme .karus-card.active .karus-crest {
  filter: drop-shadow(0 0 15px rgba(176, 190, 197, 0.9)) !important;
}

body.karus-theme .karus-card.active .karus-crest circle,
body.karus-theme .karus-card.active .karus-crest path,
body.karus-theme .karus-card.active .karus-crest polygon {
  stroke: #b0bec5 !important;
}

body.karus-theme .el-morad-card {
  opacity: 0.65;
  filter: grayscale(0.2);
}

body.karus-theme .el-morad-card:hover {
  opacity: 1;
  filter: none;
}

/* Default Theme Selected States (El Morad) */
body:not(.karus-theme) .el-morad-card.active {
  box-shadow: 0 0 25px rgba(104, 157, 113, 0.45), 0 15px 35px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(104, 157, 113, 0.15) !important;
}

body:not(.karus-theme) .el-morad-card.active .elmorad-crest {
  filter: drop-shadow(0 0 15px rgba(104, 157, 113, 0.9)) !important;
}

body:not(.karus-theme) .karus-card {
  opacity: 0.65;
  filter: grayscale(0.2);
}

body:not(.karus-theme) .karus-card:hover {
  opacity: 1;
  filter: none;
}

/* Ornament Gem Overrides */
body.karus-theme .ornament-gem-svg polygon {
  fill: #b0bec5 !important;
  stroke: #90a4ae !important;
}

/* Karus Theme Global Panel & Internal Borders Override */
body.karus-theme .news-feed-panel,
body.karus-theme .featured-news-card,
body.karus-theme .categories-card,
body.karus-theme .ranking-card,
body.karus-theme .download-main-panel,
body.karus-theme .install-card-panel,
body.karus-theme .notes-card-panel,
body.karus-theme .community-post-box,
body.karus-theme .community-rules-box,
body.karus-theme .feed-post-card,
body.karus-theme .event-item-card {
  background: rgba(15, 17, 19, 0.82) !important;
  border-color: rgba(176, 190, 197, 0.22) !important;
}

body.karus-theme .news-feed-thumb,
body.karus-theme .news-tabs,
body.karus-theme .news-pagination,
body.karus-theme .pag-arrow,
body.karus-theme .pag-num,
body.karus-theme .featured-header,
body.karus-theme .categories-header,
body.karus-theme .cat-item,
body.karus-theme .cat-count,
body.karus-theme .ranking-card-header,
body.karus-theme .ranking-cat-item,
body.karus-theme .ranking-left-banner,
body.karus-theme .ranking-left-banner img,
body.karus-theme .ranking-table-controls,
body.karus-theme .rank-dropdown-select,
body.karus-theme .ranking-table th,
body.karus-theme .ranking-table td,
body.karus-theme .ranking-pagination,
body.karus-theme .ranking-pag-arrow,
body.karus-theme .ranking-pag-num,
body.karus-theme .top-player-avatar-frame,
body.karus-theme .top-player-stat-row,
body.karus-theme .reward-row,
body.karus-theme .panel-divider-vertical,
body.karus-theme .requirements-table tr,
body.karus-theme .guide-footer-bar,
body.karus-theme .event-rewards-row,
body.karus-theme .reward-icon-item,
body.karus-theme .post-box-input,
body.karus-theme .feed-filter-bar,
body.karus-theme .rules-box-title,
body.karus-theme .rule-item-num {
  border-color: rgba(176, 190, 197, 0.18) !important;
}

body.karus-theme .event-card-banner::after {
  background: linear-gradient(to right, transparent 60%, rgba(15, 17, 19, 0.95) 100%) !important;
}

body.karus-theme .event-card-details {
  background: rgba(15, 17, 19, 0.4) !important;
}

body.karus-theme .event-item-card:hover {
  border-color: rgba(176, 190, 197, 0.5) !important;
  box-shadow: 0 12px 35px rgba(176, 190, 197, 0.15) !important;
}

body.karus-theme .btn-play-now,
body.karus-theme .login,
body.karus-theme .register {
  background: url("assets/Shapes/button-karus.png") center/100% 100% no-repeat !important;
}

/* Auth Modals Styling */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}

.auth-modal-content {
  position: relative;
  width: 92%;
  max-width: 600px;
  background: rgba(10, 22, 14, 0.96);
  border: 1px solid rgba(221, 217, 176, 0.25);
  border-radius: 4px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95), 0 15px 35px rgba(0, 0, 0, 0.7);
  padding: 35px;
  z-index: 1001;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.auth-modal.active .auth-modal-content {
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(221, 217, 176, 0.6);
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  line-height: 1;
}

.auth-modal-close:hover {
  color: var(--gold);
  transform: rotate(90deg);
}

.auth-modal-header {
  text-align: center;
}

.auth-modal-title {
  font-family: "Cinzel", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  margin: 0;
}

.auth-modal-subtitle {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(221, 217, 176, 0.75);
  margin: 6px 0 0;
  text-transform: uppercase;
}

.auth-form {
  margin-top: 10px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

@media (max-width: 550px) {
  .form-row-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 500;
}

.form-group label .required {
  color: #ff6b6b;
  margin-left: 2px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(7, 14, 9, 0.85);
  border: 1px solid rgba(221, 217, 176, 0.22);
  color: #f3f1e4;
  font-size: 13px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: rgba(243, 241, 228, 0.35);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(221, 217, 176, 0.3);
}

.form-group select option {
  background: #0c1810;
  color: #f3f1e4;
}

.form-help {
  font-size: 9.5px;
  color: rgba(221, 217, 176, 0.45);
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

.btn-auth-submit {
  width: 100%;
  background: url("assets/shapes/main-button.png") center/100% 100% no-repeat;
  border: none;
  color: var(--gold);
  padding: 13px;
  font-family: "Cinzel", serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-top: 20px;
  filter: brightness(1.0) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.btn-auth-submit:hover:not(:disabled) {
  filter: brightness(1.2) drop-shadow(0 0 6px var(--gold-glow));
  color: #ffffff;
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(1);
}

.auth-alert {
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 12.5px;
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: left;
}

.auth-alert.error {
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ff6b6b;
}

.auth-alert.success {
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(40, 167, 69, 0.35);
  color: #2ecc71;
  text-align: center;
}

/* Karus theme modal overrides */
body.karus-theme .auth-modal-content {
  background: rgba(15, 17, 19, 0.96) !important;
  border-color: rgba(176, 190, 197, 0.25) !important;
}

body.karus-theme .form-group input,
body.karus-theme .form-group select {
  background: rgba(15, 17, 19, 0.9) !important;
  border-color: rgba(176, 190, 197, 0.22) !important;
}

body.karus-theme .form-group select option {
  background: #0f1113 !important;
}

body.karus-theme .btn-auth-submit {
  background: url("assets/Shapes/button-karus.png") center/100% 100% no-repeat !important;
  color: #b0bec5 !important;
}

.rank-dropdown-select option {
  background-color: #14171a !important;
  color: #ddd9b0 !important;
}

/* Karus theme modal overrides for upgrade rates */
body.karus-theme #upgrade-rates-modal .auth-modal-content {
  border-color: #000000 !important;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95), inset 0 0 20px rgba(0,0,0,0.8) !important;
}

body.karus-theme #upgrade-rates-modal img {
  border-color: #000000 !important;
}
