:root{
  --header-h: 110px;
  --flash: 0; /* used by lightning flash */
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  font-family:'Cormorant Garamond', serif; /* UPDATED font */
  background:#000;
  color:#e0f0ff;
  overflow-x:hidden;
}

/* BACKGROUND */
.bg{
  position:fixed;
  inset:0;
  background:url('https://wallup.net/wp-content/uploads/2016/04/10/119309-lightning-clouds-fantasy_art-storm-volcano-digital_art-lake-sea-sky.jpg')
             center top / cover no-repeat;
  filter:brightness(0.26) contrast(1.12);
  z-index:0;
}
.darken{
  position:fixed; inset:0;
  background:rgba(0,0,0,0.52);
  z-index:1;
}
.vignette{
  position:fixed; inset:0;
  background:radial-gradient(circle, transparent 35%, rgba(0,0,0,0.92));
  z-index:2;
}

/* subtle lightning flash overlay (not a visible box) */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:8;
  background:radial-gradient(circle at 50% 35%,
    rgba(210,170,255,1) 0%,
    rgba(140,80,255,0.55) 25%,
    rgba(0,0,0,0) 60%);
  opacity: var(--flash);
  transition: opacity 140ms ease-out;
  mix-blend-mode: screen;
}

/* DECORATIVE CHARACTERS */
.decor-layer{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:6; /* above fog, below particles/lightning */
}
.decor{
  position:absolute;
  opacity:0.48;
  mix-blend-mode:screen;
  filter:
    drop-shadow(0 0 22px rgba(160,80,255,.60))
    drop-shadow(0 0 80px rgba(120,40,255,.35));
}
.decor-warrior{
  right:-40px;
  bottom:-40px;
  width:min(520px, 42vw);
  opacity:0.50;
}
.decor-duo{
  left:-60px;
  bottom:-90px; /* moved DOWN so faces are visible */
  width:min(520px, 40vw);
  opacity:0.40;
}

/* SMOKE / FOG */
.fog-sides{
  position:fixed;
  inset:0;
  z-index:5;
  pointer-events:none;
  overflow:hidden;
}

/* simple windy smoke behavior using layered gradients + movement */
.fog{
  position:absolute;
  pointer-events:none;
  mix-blend-mode:screen;
  filter: blur(22px);
  opacity: 0.58;
  will-change: transform, opacity;
}

/* fade into the center so it doesn't look like a wall */
.fog-left{
  left:-16vw; bottom:-14vh;
  width:22vw; height:140vh;
  mask-image: linear-gradient(to right, #000 0%, #000 55%, transparent 100%);
}
.fog-right{
  right:-16vw; bottom:-14vh;
  width:22vw; height:140vh;
  mask-image: linear-gradient(to left, #000 0%, #000 55%, transparent 100%);
}
.fog-bottom{
  left:-12vw; bottom:-2vh;
  width:124vw; height:58vh;
  opacity:0.62;
  filter: blur(24px);
  mask-image: linear-gradient(to top, #000 0%, #000 45%, transparent 100%);
}

.fog-left::before, .fog-left::after,
.fog-right::before, .fog-right::after,
.fog-bottom::before, .fog-bottom::after{
  content:"";
  position:absolute;
  inset:-35%;
  background-repeat: repeat;
  will-change: transform, opacity, background-position;
}

.fog-left::before, .fog-right::before{
  background-image:
    radial-gradient(circle at 35% 85%, rgba(230,210,255,0.22) 0%, rgba(0,0,0,0) 58%),
    radial-gradient(circle at 60% 70%, rgba(170,100,255,0.18) 0%, rgba(0,0,0,0) 62%);
  opacity:0.72;
  animation: smokeSideA 14s linear infinite;
}
.fog-left::after, .fog-right::after{
  background-image:
    radial-gradient(circle at 50% 80%, rgba(245,235,255,0.12) 0%, rgba(0,0,0,0) 60%),
    radial-gradient(circle at 30% 60%, rgba(160,90,255,0.12) 0%, rgba(0,0,0,0) 64%);
  opacity:0.46;
  filter: blur(30px);
  animation: smokeSideB 10s linear infinite;
}

.fog-right::before{ animation-name: smokeSideA_R; }
.fog-right::after{  animation-name: smokeSideB_R; }

@keyframes smokeSideA{
  0%{ transform: translateY(20vh) translateX(0) scale(1.00); opacity:0.74; }
  35%{ transform: translateY(-25vh) translateX(26px) scale(1.10); opacity:0.58; }
  70%{ transform: translateY(-85vh) translateX(-22px) scale(1.20); opacity:0.28; }
  100%{ transform: translateY(-135vh) translateX(0) scale(1.26); opacity:0; }
}
@keyframes smokeSideB{
  0%{ transform: translateY(30vh) translateX(0) scale(1.04); opacity:0.48; }
  45%{ transform: translateY(-18vh) translateX(-34px) scale(1.16); opacity:0.32; }
  100%{ transform: translateY(-140vh) translateX(0) scale(1.30); opacity:0; }
}
@keyframes smokeSideA_R{
  0%{ transform: translateY(20vh) translateX(0) scale(1.00); opacity:0.74; }
  35%{ transform: translateY(-25vh) translateX(-26px) scale(1.10); opacity:0.58; }
  70%{ transform: translateY(-85vh) translateX(22px) scale(1.20); opacity:0.28; }
  100%{ transform: translateY(-135vh) translateX(0) scale(1.26); opacity:0; }
}
@keyframes smokeSideB_R{
  0%{ transform: translateY(30vh) translateX(0) scale(1.04); opacity:0.48; }
  45%{ transform: translateY(-18vh) translateX(34px) scale(1.16); opacity:0.32; }
  100%{ transform: translateY(-140vh) translateX(0) scale(1.30); opacity:0; }
}

/* bottom smoke */
.fog-bottom::before{
  background-image:
    radial-gradient(circle at 20% 85%, rgba(230,220,255,0.20) 0%, rgba(0,0,0,0) 62%),
    radial-gradient(circle at 50% 80%, rgba(170,100,255,0.16) 0%, rgba(0,0,0,0) 70%),
    radial-gradient(circle at 80% 88%, rgba(140,80,255,0.14) 0%, rgba(0,0,0,0) 74%);
  opacity:0.70;
  animation: smokeBottomA 12s linear infinite;
}
.fog-bottom::after{
  background-image:
    radial-gradient(circle at 35% 85%, rgba(245,235,255,0.12) 0%, rgba(0,0,0,0) 66%),
    radial-gradient(circle at 65% 86%, rgba(160,90,255,0.11) 0%, rgba(0,0,0,0) 70%);
  opacity:0.46;
  filter: blur(32px);
  animation: smokeBottomB 9s linear infinite;
}
@keyframes smokeBottomA{
  0%{ transform: translateY(22vh) translateX(0) scale(1.02); opacity:0.70; }
  50%{ transform: translateY(6vh) translateX(32px) scale(1.10); opacity:0.52; }
  100%{ transform: translateY(-18vh) translateX(0) scale(1.18); opacity:0; }
}
@keyframes smokeBottomB{
  0%{ transform: translateY(26vh) translateX(0) scale(1.04); opacity:0.46; }
  60%{ transform: translateY(8vh) translateX(-44px) scale(1.16); opacity:0.28; }
  100%{ transform: translateY(-12vh) translateX(0) scale(1.22); opacity:0; }
}

/* PARTICLES */
.particle-layer{
  position:fixed;
  inset:0;
  z-index:7;
  pointer-events:none;
  overflow:hidden;
}
.particle{
  position:absolute;
  bottom:-60px;
  border-radius:50%;
  background: radial-gradient(circle,
    rgba(245,220,255,0.92) 0%,
    rgba(200,140,255,0.55) 35%,
    rgba(120,40,255,0.08) 70%,
    rgba(0,0,0,0) 100%
  );
  box-shadow:
    0 0 var(--g1, 14px) rgba(200,130,255,1),
    0 0 var(--g2, 44px) rgba(150,70,255,0.95);
  filter: blur(0.45px);
  animation: floatDust var(--dur, 16s) linear forwards;
  will-change: transform, opacity;
}
@keyframes floatDust{
  0%{ transform: translateX(0) translateY(0) rotate(var(--rot, 0deg)); opacity:0; }
  10%{ opacity:0.95; }
  45%{ transform: translateX(var(--dx1, 80px)) translateY(-55vh) rotate(var(--rot, 0deg)); opacity:0.80; }
  75%{ transform: translateX(calc(var(--dx2, -120px) * 0.7)) translateY(-95vh) rotate(var(--rot, 0deg)); opacity:0.55; }
  100%{ transform: translateX(var(--dx2, -120px)) translateY(-135vh) rotate(var(--rot, 0deg)); opacity:0; }
}

/* LIGHTNING */
.lightning-layer{
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
}
.lightning-segment{
  position:absolute;
  width:3px;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0),
    rgba(235,210,255,1),
    rgba(170,105,255,1),
    rgba(255,255,255,0)
  );
  filter:
    blur(0.30px)
    drop-shadow(0 0 16px rgba(220,170,255,1))
    drop-shadow(0 0 58px rgba(160,90,255,0.98));
  opacity:0;
  transform-origin: top center;
  mix-blend-mode: screen;
  animation: lightningFade 0.9s ease-out forwards;
}
.lightning-segment.branch{
  width:2px;
  opacity:0.9;
}
@keyframes lightningFade{
  0%{ opacity:0; }
  12%{ opacity:1; }
  35%{ opacity:0.95; }
  100%{ opacity:0; }
}

/* HEADER / UI */
header{
  position:fixed;
  top:0; left:0; right:0;
  height:var(--header-h);
  padding:20px 60px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:rgba(10,8,18,.18);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(160,120,255,.25);
  z-index:20;
}
.logo{
  font-family:'Cinzel Decorative', cursive;
  font-size:36px;
  font-weight:900;
  text-shadow:0 0 25px rgba(160,120,255,.9);
  display:flex;
  align-items:center;
  gap:12px;
}
.rune{ font-size:56px; color:#c0a8ff; }

/* ✅ FIX: Make nav a flex row so lang-switcher can stay on same line */
header nav{
  display:flex;
  align-items:center;
  gap:32px;
  flex-wrap:wrap;
}

/* Links inside nav */
nav a{
  color:#e0f5ff;
  margin-left:0;             /* ✅ was causing spacing + wrap issues */
  text-decoration:none;
  transition:.4s;
}
nav a:hover{
  color:#d0b8ff;
  text-shadow:0 0 20px #c0a8ff;
}

main{
  padding-top:var(--header-h);
  position:relative;
  z-index:10;
}

/* HERO */
.hero{
  height:calc(100vh - var(--header-h));
  min-height:640px;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.hero-content{ max-width:1100px; padding:30px; }

.hero h1{
  font-family:'Cinzel Decorative', cursive;
  font-size:82px;
  text-shadow:0 0 45px rgba(160,90,255,1);
}
.tagline{
  font-size:28px;
  color:#d0b8ff;
  margin:40px 0;
  text-shadow:0 0 18px rgba(160,120,255,.55);
  font-weight:500;        /* subtle improvement */
  letter-spacing:0.6px;   /* subtle improvement */
}
.desc{
  font-size:22px;
  line-height:2;
  font-weight:500;        /* subtle improvement */
  letter-spacing:0.6px;   /* subtle improvement */
}

/* BUTTONS */
.buttons .btn{
  display:inline-block;
  padding:18px 42px;
  margin:15px;
  border:4px solid #c0a8ff;
  border-radius:8px;
  font-size:20px;
  transition:.5s;
  text-decoration:none; /* REMOVE underline from CTA buttons */
}
.btn{
  background:rgba(160,120,255,.18);
  color:#f0ffff;
}
.btn:hover{
  background:#b8a0ff;
  color:#000;
  box-shadow:0 0 60px rgba(160,120,255,1);
  transform:translateY(-5px);
}
.btn.primary{
  background:linear-gradient(45deg,#6030b8,#a070ff);
}

/* =========================================================
   NEW: Purple "primary" button usable on Register/Change pages
   Apply: class="btn-inline btn-primary"  OR class="btn btn-primary"
   ========================================================= */
.btn-primary{
  border-color: rgba(190,160,255,.55) !important;
  background: linear-gradient(180deg,
    rgba(200,120,255,.78),
    rgba(120,70,230,.58)
  ) !important;
  box-shadow:
    0 10px 26px rgba(140, 70, 255, .22),
    inset 0 0 0 1px rgba(255,255,255,.08) !important;
}
.btn-primary:hover{
  border-color: rgba(210,180,255,.85) !important;
  box-shadow:
    0 14px 34px rgba(140, 70, 255, .30),
    inset 0 0 0 1px rgba(255,255,255,.12) !important;
}
.btn-primary:active{
  transform: translateY(0px) !important;
  box-shadow:
    0 8px 18px rgba(140, 70, 255, .18),
    inset 0 0 0 1px rgba(255,255,255,.10) !important;
}

/* SECTIONS */
section{
  padding:140px 60px;
  max-width:1400px;
  margin:auto;
}
h2{
  font-family:'Cinzel Decorative', cursive;
  font-size:54px;
  text-align:center;
  margin-bottom:100px;
  color:#d0b8ff;
  text-shadow:0 0 25px rgba(160,120,255,.55);
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:40px;
}
.card{
  background:rgba(25,15,60,.65);
  border:3px solid rgba(160,120,255,.55);
  padding:50px;
  border-radius:16px;
  text-align:center;
  transition:.5s;
}
.card:hover{
  transform:translateY(-15px);
  box-shadow:0 20px 50px rgba(160,120,255,.5);
}

/* DOWNLOAD */
.downloads{
  display:flex;
  justify-content:center;
  gap:80px;
  flex-wrap:wrap;
}
.download-box{
  width:350px;
  padding:40px;
  border-radius:16px;
  background:rgba(25,15,60,.65);
  border:3px solid rgba(160,120,255,.55);
}
.download-box button{
  margin-top:25px;
  width:100%;
  padding:14px;
  background:rgba(255,255,255,.1);
  border:2px solid rgba(255,255,255,.25);
  color:#aaa;
}

/* RULES LIST */
#rules ul{
  font-size:22px;
  line-height:2.4;
  max-width:800px;
  margin:0 auto;
  padding-left:50px;
}

/* FOOTER */
footer{
  padding:50px;
  text-align:center;
  background:rgba(0,0,0,.6);
  color:#d0b8ff;
  position:relative;
  z-index:10;
}

/* RESPONSIVE */
@media (max-width: 992px){
  :root{ --header-h: 150px; }
  header{ flex-direction:column; gap:16px; padding:16px 20px; height:var(--header-h); }
  header nav{ gap:14px; justify-content:center; }
  nav a{ margin:0; }
  .hero h1{ font-size:62px; }
  .decor-warrior{ width:60vw; opacity:0.35; right:-60px; }
  .decor-duo{ width:60vw; opacity:0.28; left:-70px; bottom:-120px; }
}

/* ==========================
   PURPLE FIRE LOGO (TALLER + MORE FLAMEY)
========================== */

.fire-text{
  position:relative;
  display:inline-block;
  font-family:'Cinzel Decorative', cursive;
  font-size:36px;
  font-weight:900;
  letter-spacing:4px;
  color:#f5e9ff;

  text-shadow:
    0 0 10px rgba(210,160,255,.95),
    0 0 24px rgba(165,90,255,.90),
    0 0 60px rgba(120,40,255,.60);
}

/* Big aura cloud around the whole word */
.fire-text::before{
  content:"";
  position:absolute;
  left:-22px;
  right:-22px;
  top:-52px;
  bottom:-14px;

  z-index:-3;
  pointer-events:none;

  background:
    radial-gradient(closest-side at 10% 78%, rgba(255,255,255,.18), rgba(0,0,0,0) 65%),
    radial-gradient(closest-side at 22% 92%, rgba(210,160,255,.60), rgba(0,0,0,0) 74%),
    radial-gradient(closest-side at 50% 88%, rgba(170,90,255,.66), rgba(0,0,0,0) 76%),
    radial-gradient(closest-side at 78% 92%, rgba(210,160,255,.55), rgba(0,0,0,0) 74%),
    radial-gradient(closest-side at 92% 80%, rgba(120,40,255,.50), rgba(0,0,0,0) 72%);

  filter:
    blur(12px)
    drop-shadow(0 0 22px rgba(220,170,255,1))
    drop-shadow(0 0 75px rgba(150,70,255,.95));

  opacity:.95;
  mix-blend-mode: screen;
  animation: auraPulse 2.2s ease-in-out infinite;
}

.fire-text::after{
  content:"HELHEIM";
  position:absolute;
  left:0;
  top:0;
  z-index:-2;
  pointer-events:none;

  color:transparent;

  text-shadow:
    0 0 10px rgba(255,255,255,.22),
    0 -8px 20px rgba(230,190,255,.80),
    0 -20px 44px rgba(190,120,255,.82),
    0 -38px 86px rgba(140,60,255,.76),
    0 -64px 130px rgba(110,30,255,.58);

  filter: blur(0.75px);
  mix-blend-mode: screen;
  animation: flameFlicker 0.95s ease-in-out infinite;
}

.fire-text .fire-overlay{
  position:absolute;
  left:-26px;
  right:-26px;
  top:-62px;
  bottom:-12px;

  z-index:-1;
  pointer-events:none;

  background:
    radial-gradient(closest-side at 14% 96%, rgba(220,170,255,.58), rgba(0,0,0,0) 72%),
    radial-gradient(closest-side at 32% 94%, rgba(170,90,255,.66), rgba(0,0,0,0) 74%),
    radial-gradient(closest-side at 52% 92%, rgba(240,225,255,.40), rgba(0,0,0,0) 70%),
    radial-gradient(closest-side at 70% 95%, rgba(160,90,255,.62), rgba(0,0,0,0) 74%),
    radial-gradient(closest-side at 88% 96%, rgba(140,60,255,.60), rgba(0,0,0,0) 74%);

  filter:
    blur(14px)
    drop-shadow(0 0 22px rgba(210,150,255,1))
    drop-shadow(0 0 90px rgba(140,60,255,.90));

  opacity:.85;
  mix-blend-mode: screen;
  animation: flameLicks 1.15s ease-in-out infinite;
}

@keyframes auraPulse{
  0%   { transform: translateY(0) scale(1); opacity:.78; }
  50%  { transform: translateY(-3px) scale(1.06); opacity:1; }
  100% { transform: translateY(0) scale(1); opacity:.78; }
}

@keyframes flameFlicker{
  0%{
    transform: translateY(0) translateX(0) skewX(0deg);
    clip-path: polygon(
      0% 100%, 0% 36%, 8% 18%, 16% 30%, 24% 10%, 32% 28%, 40% 6%, 48% 24%,
      56% 2%, 64% 22%, 72% 8%, 80% 26%, 88% 12%, 100% 34%, 100% 100%
    );
    opacity:.95;
  }
  50%{
    transform: translateY(-4px) translateX(1px) skewX(-2deg);
    clip-path: polygon(
      0% 100%, 0% 40%, 10% 22%, 18% 34%, 26% 12%, 34% 30%, 42% 8%, 50% 26%,
      58% 0%, 66% 24%, 74% 10%, 82% 32%, 90% 14%, 100% 38%, 100% 100%
    );
    opacity:1;
  }
  100%{
    transform: translateY(-1px) translateX(-1px) skewX(2deg);
    clip-path: polygon(
      0% 100%, 0% 38%, 8% 20%, 16% 32%, 24% 12%, 32% 30%, 40% 7%, 48% 26%,
      56% 1%, 64% 24%, 72% 10%, 80% 28%, 88% 14%, 100% 36%, 100% 100%
    );
    opacity:.92;
  }
}

@keyframes flameLicks{
  0%{
    transform: translateY(6px) translateX(0) scale(1.00);
    opacity:.70;
  }
  50%{
    transform: translateY(-10px) translateX(4px) scale(1.12);
    opacity:.98;
  }
  100%{
    transform: translateY(6px) translateX(0) scale(1.00);
    opacity:.70;
  }
}

/* =========================
   NAV DROPDOWN
   Fix: align to right edge + remove extra spacing
   ========================= */

.nav-dropdown{
  position: relative;
  display: inline-block;
  margin-left: 0;
}

.nav-dropdown-toggle{
  color: #e0f5ff;
  text-decoration: none;
  transition: .4s;
  margin-left: 0;  /* ✅ was 32px - now handled by nav gap */
  display: inline-block;
}

.nav-dropdown-toggle:hover{
  color: #d0b8ff;
  text-shadow: 0 0 20px #c0a8ff;
}

.nav-dropdown-menu{
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  left: auto;
  transform: translateY(10px);

  min-width: 210px;
  padding: 10px 0;

  background: rgba(25,15,60,.88);
  backdrop-filter: blur(14px);

  border: 2px solid rgba(160,120,255,.35);
  border-radius: 12px;

  box-shadow: 0 18px 45px rgba(160,120,255,.35);

  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;

  z-index: 1000;
}

.nav-dropdown-menu::before{
  content:"";
  position:absolute;
  top:-10px;
  right: 18px;
  width: 14px;
  height: 14px;
  background: rgba(25,15,60,.88);
  border-left: 2px solid rgba(160,120,255,.35);
  border-top: 2px solid rgba(160,120,255,.35);
  transform: rotate(45deg);
  backdrop-filter: blur(14px);
}

.nav-dropdown-menu a{
  display: block;
  padding: 12px 18px;
  margin: 0;
  text-decoration: none;
  color: #e0f5ff;
  font-size: 18px;
  line-height: 1.2;
  transition: .25s;
}

.nav-dropdown-menu a:hover{
  background: rgba(160,120,255,.14);
  color: #d0b8ff;
  text-shadow: 0 0 18px rgba(160,120,255,.85);
}

.nav-dropdown:hover .nav-dropdown-menu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 992px){
  .nav-dropdown-toggle{ margin-left: 0; }
  .nav-dropdown-menu{ min-width: 200px; }
}

/* Language dropdown buttons should look like menu links */
.nav-dropdown-menu .lang-option{
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.nav-dropdown-menu .lang-option:hover{
  background: rgba(190,160,255,.12);
}

/* RTL support (Arabic) */
body.rtl{
  direction: rtl;
}
body.rtl nav{
  direction: rtl;
}
body.rtl .nav-dropdown-menu{
  text-align: right;
}
body.rtl .buttons{
  direction: rtl;
}

/* =========================================
   DSR / RULES PAGE — CSS ADD-ON (optional)
   Paste at the VERY BOTTOM of style.css
   ========================================= */

/* Wrapper spacing for policy/rules pages */
#rules{
  padding-top: 140px; /* keeps content below fixed header */
  padding-bottom: 160px;
}

/* Make the H2 look a bit more "policy page" premium */
#rules h2{
  margin-bottom: 60px; /* tighter than homepage sections */
  letter-spacing: 1px;
}

/* Rules panel polish (works with your existing .card) */
#rules .card{
  position: relative;
  overflow: hidden;

  /* slightly more premium glass */
  background: rgba(20, 12, 46, .70);
  border: 3px solid rgba(160,120,255,.50);

  box-shadow:
    0 14px 45px rgba(0,0,0,.55),
    0 0 70px rgba(160,120,255,.18);
}

/* Subtle inner glow */
#rules .card::before{
  content:"";
  position:absolute;
  inset: -2px;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 10%, rgba(220,170,255,.20), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(140,60,255,.18), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(170,105,255,.12), transparent 55%);
  filter: blur(10px);
  opacity: .9;
}

/* Fancy top divider inside the rules card */
#rules .card::after{
  content:"";
  position:absolute;
  left: 26px;
  right: 26px;
  top: 26px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(210,160,255,.75),
    rgba(160,120,255,.35),
    rgba(210,160,255,.75),
    transparent
  );
  box-shadow: 0 0 18px rgba(200,140,255,.45);
  opacity: .9;
}

/* Title line inside the card (if you keep the <strong> line) */
#rules .card > p strong{
  font-family: 'Cinzel Decorative', cursive;
  font-weight: 900;
  letter-spacing: 1px;
  color: #f3eaff;
  text-shadow:
    0 0 16px rgba(210,160,255,.65),
    0 0 46px rgba(140,60,255,.35);
}

/* Rules list layout */
#rules ul{
  list-style: none;         /* replace default bullets */
  padding-left: 0;
  margin: 18px 0 0 0;
}

/* Each rule line */
#rules li{
  position: relative;
  padding-left: 34px;
  margin: 14px 0;
}

/* Custom glowing bullet */
#rules li::before{
  content:"";
  position:absolute;
  left: 8px;
  top: 0.9em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(245,220,255,.95) 0%,
    rgba(180,110,255,.75) 45%,
    rgba(0,0,0,0) 70%
  );
  box-shadow:
    0 0 10px rgba(200,130,255,.95),
    0 0 28px rgba(150,70,255,.65);
  transform: translateY(-50%);
}

/* Emphasize the rule headings in each <li> */
#rules li strong{
  color: #d9c4ff;
  text-shadow: 0 0 14px rgba(160,120,255,.35);
}

/* Final warning line styling (your purple line at bottom) */
#rules .card p:last-child{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(160,120,255,.22);
  text-shadow: 0 0 14px rgba(160,120,255,.18);
}

/* Mobile: keep the card readable */
@media (max-width: 992px){
  #rules{ padding-top: 170px; }
  #rules .card{ padding: 34px !important; }
  #rules li{ padding-left: 30px; }
  #rules li::before{ left: 6px; }
}

/* Purple inline link (for "Additional Requirements") */
.inline-link{
  color: #b88cff;                 /* purple */
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(184, 140, 255, 0.35);
  transition: 0.2s ease;
}

.inline-link:hover{
  color: #e0c9ff;
  border-bottom-color: rgba(224, 201, 255, 0.8);
  text-shadow: 0 0 10px rgba(184, 140, 255, 0.6);
}

/* =========================
   KOBOARD RANKING PAGE
   ========================= */

.rank-page{
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 18px 70px;
}

.rank-card{
  width: min(980px, 96vw);
  border-radius: 18px;
  padding: 22px 22px 18px;
  background: rgba(10, 8, 18, 0.62);
  border: 1px solid rgba(190, 140, 255, 0.22);
  box-shadow:
    0 22px 60px rgba(0,0,0,0.65),
    0 0 38px rgba(160, 90, 255, 0.12);
  backdrop-filter: blur(10px);
}

.rank-header h1{
  margin: 0 0 6px;
  font-family: "Cinzel Decorative", serif;
  letter-spacing: 1px;
  font-size: clamp(28px, 3.5vw, 40px);
  text-shadow: 0 0 18px rgba(190, 140, 255, 0.26);
}

.rank-sub{
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  opacity: 0.9;
}

.rank-actions{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rank-meta{
  font-family: "Cormorant Garamond", serif;
  opacity: 0.85;
}

/* Scroll container: shows about 25 rows before scrolling */
.rank-table-wrap{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(190, 140, 255, 0.18);
  background: rgba(6, 5, 10, 0.45);
  /* ~25 rows: header + 25*44px ≈ 1150px; clamp for smaller screens */
  max-height: clamp(520px, 72vh, 1160px);
  overflow-y: auto;
}

/* nicer scrollbar */
.rank-table-wrap::-webkit-scrollbar{ width: 10px; }
.rank-table-wrap::-webkit-scrollbar-thumb{
  background: rgba(190, 140, 255, 0.25);
  border-radius: 12px;
}
.rank-table-wrap::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.18);
}

.rank-table{
  width: 100%;
  border-collapse: collapse;
  font-family: "Cormorant Garamond", serif;
}

.rank-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(35, 18, 55, 0.92),
    rgba(15, 10, 26, 0.92)
  );
  border-bottom: 1px solid rgba(190, 140, 255, 0.22);
  padding: 14px 14px;
  text-align: left;
  letter-spacing: 0.6px;
}

.rank-table tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(190, 140, 255, 0.10);
  height: 44px; /* keeps row height consistent for the “25 rows” feel */
}

.rank-table tbody tr:hover{
  background: rgba(190, 140, 255, 0.08);
}

.rank-loading{
  text-align: center;
  padding: 22px 14px;
  opacity: 0.9;
}

.rank-col{ white-space: nowrap; }
.name-col{ font-size: 19px; letter-spacing: 0.3px; }
.kills-col{ text-align: right; font-variant-numeric: tabular-nums; }

/* Rank badges */
.rank-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 18px rgba(255,255,255,0.05);
}

.rank-badge.gold{
  border-color: rgba(255, 215, 0, 0.34);
  background: rgba(255, 215, 0, 0.10);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.12);
}
.rank-badge.silver{
  border-color: rgba(220, 220, 220, 0.34);
  background: rgba(220, 220, 220, 0.10);
}
.rank-badge.bronze{
  border-color: rgba(205, 127, 50, 0.40);
  background: rgba(205, 127, 50, 0.10);
}
.rank-badge.plain{
  border-color: rgba(190, 140, 255, 0.22);
  background: rgba(190, 140, 255, 0.08);
}

/* Highlight top 3 rows slightly */
.rank-table tbody tr.r-top{
  background: rgba(190, 140, 255, 0.06);
}
.rank-table tbody tr.r-top:hover{
  background: rgba(190, 140, 255, 0.11);
}

.rank-footnote{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 110, 110, 0.22);
  background: rgba(60, 10, 10, 0.35);
  font-family: "Cormorant Garamond", serif;
}

/* PNG icon inside the icon pill (center + perfect scaling) */
.class-icon-img{
  width: 100%;
  height: 100%;
  object-fit: contain;      /* keeps full character visible */
  object-position: center;  /* centers it */
  display: block;
  transform: scale(1.15);   /* slightly bigger, adjust 1.05–1.25 if needed */
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
  pointer-events: none;
}

/* Optional: make the icon box a bit larger for tall character art */
.class-card .icon{
  width: 64px;
  height: 64px;
  padding: 6px;             /* gives breathing room */
}

/* =========================
   INLINE BUTTONS (Register / Update Password)
   ========================= */

.btn-inline.primary{
  border-color: rgba(190, 140, 255, 0.55);
  background: linear-gradient(135deg,
    rgba(140, 60, 255, 0.85),
    rgba(200, 140, 255, 0.55)
  );
  box-shadow:
    0 0 18px rgba(160, 90, 255, 0.35),
    0 0 55px rgba(120, 40, 255, 0.20);
}

.btn-inline.primary:hover{
  border-color: rgba(220, 180, 255, 0.75);
  box-shadow:
    0 0 22px rgba(190, 140, 255, 0.45),
    0 0 85px rgba(140, 60, 255, 0.30);
}

.btn-inline.primary[disabled]{
  opacity: .60;
  filter: saturate(.8);
}

/* ===============================
   RTL DROPDOWN FIX (Arabic)
   =============================== */

/* Ensure dropdowns anchor inward instead of off-screen */
body.rtl .nav-dropdown-menu{
  right: 0;
  left: auto;
}

/* =========================================
   Helheim Inline Language Switcher
   (globe + inline like classic-conquer-veterans)
   ========================================= */

.lang-switcher{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(190,160,255,.22);
  background: rgba(12, 9, 18, .55);
  box-shadow: 0 0 18px rgba(170,120,255,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  /* ✅ FIX: push to the far right and prevent taking a whole row */
  margin-left: auto;
  flex: 0 0 auto;
  width: auto;

  white-space: nowrap;
}

.lang-icon svg{
  fill: rgba(220,200,255,.92);
  filter: drop-shadow(0 0 8px rgba(170,120,255,.35));
}

.lang-link{
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: rgba(235, 225, 255, .92);
  font: inherit;
  letter-spacing: .2px;
  opacity: .88;
  transition: transform .12s ease, opacity .12s ease, text-shadow .12s ease;
}

.lang-link:hover{
  opacity: 1;
  transform: translateY(-1px);
  text-shadow: 0 0 10px rgba(170,120,255,.45);
}

.lang-link.is-active{
  opacity: 1;
  color: #fff;
  text-shadow: 0 0 14px rgba(190,160,255,.65);
}

.lang-dot{
  opacity: .55;
}

/* Responsive: allow wrapping if the nav gets tight */
@media (max-width: 980px){
  .lang-switcher{
    white-space: normal;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* RTL: keep spacing natural (Arabic) */
body.rtl .lang-switcher{
  margin-left: 0;
  margin-right: auto; /* ✅ keep it to the left in RTL flow */
}

/* Prevent viewport overflow on small screens */
.nav-dropdown-menu{
  max-width: calc(100vw - 20px);
}