/* ── Toast notifications ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.fw-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1c25;
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 11px 14px;
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  pointer-events: all;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fw-toast.fw-toast-show {
  opacity: 1;
  transform: translateY(0);
}
.fw-toast-success { border-left-color: #2ecc71; }
.fw-toast-error   { border-left-color: #e74c3c; }
.fw-toast-info    { border-left-color: rgba(var(--theme-color), 1); }
.fw-toast-icon { font-size: 15px; flex-shrink: 0; }
.fw-toast-success .fw-toast-icon { color: #2ecc71; }
.fw-toast-error   .fw-toast-icon { color: #e74c3c; }
.fw-toast-info    .fw-toast-icon { color: rgba(var(--theme-color), 1); }
.fw-toast-msg {
  flex: 1;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  line-height: 1.4;
}
.fw-toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.fw-toast-close:hover { color: rgba(255,255,255,0.7); }

@font-face {
  font-family: 'GothamSSm';
  src: url('../fonts/GothamSSm-Light.woff2') format('woff2'),
       url('../fonts/GothamSSm-Light.ttf')   format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* TogaMU theme colors — adjust to match TogaMU branding */
  --theme-color: 186, 99, 86;
  --theme-color2: 135, 40, 21;
  --theme-color3: 229, 31, 10;

  /* Font override */
  --theme-font:  'GothamSSm', sans-serif;
  --theme-font2: 'GothamSSm', sans-serif;
  --theme-font3: 'GothamSSm', sans-serif;

  /* Override gradient buttons și culori default să folosească theme colors */
  --default-color:  rgba(var(--theme-color), 1);
  --default-color2: rgba(var(--theme-color2), 1);

  --bs-gradient:   linear-gradient(to right, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
  --bs-gradient-5: linear-gradient(to right, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
  --bs-gradient-2: linear-gradient(to right, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
}

/* ── Nav active state ───────────────────────────────────────────── */
.menu-style3 > ul > li.active > a,
.menu-style3 > ul > li.active > a:hover {
  color: #ffffff !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  position: relative;
  z-index: 1;
}
.menu-style3 > ul > li.active {
  position: relative;
}
.menu-style3 > ul > li.active::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(var(--theme-color2), 0.85) 0%, rgba(var(--theme-color), 0.6) 100%);
  transform: skewX(-10deg);
  pointer-events: none;
}
/* mega-menu-wrap must stay static so dropdown positions against the header */
.menu-style3 > ul > li.mega-menu-wrap.active {
  position: static;
}
.menu-style3 > ul > li.mega-menu-wrap.active::before {
  display: none;
}
.menu-style3 > ul > li.mega-menu-wrap.active > a {
  color: rgba(var(--theme-color), 1) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── text-default override ──────────────────────────────────────── */
.text-default {
  color: rgba(var(--theme-color), 1) !important;
}

/* ── Patch Notes sidebar icon ───────────────────────────────────── */
.patch-icon {
  font-size: 13px;
  margin-right: 7px;
  background: linear-gradient(135deg, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero video edge shadow ─────────────────────────────────────── */
.vs-hero-wrapper {
  position: relative;
  overflow: hidden;
  box-shadow: inset 120px 0 120px -20px rgba(15,17,22,0.98),
              inset -120px 0 120px -20px rgba(15,17,22,0.98),
              inset 0 200px 160px -40px rgba(15,17,22,0.98),
              inset 0 -200px 160px -40px rgba(15,17,22,0.98);
}

/* ── Guild Wars equal height cards ─────────────────────────────── */
.vs-video-area .slick-track {
  display: flex !important;
}
.vs-video-area .slick-slide {
  height: auto !important;
  display: flex !important;
  flex-direction: column;
}
.vs-video-area .slick-slide > div,
.vs-video-area .slick-slide > div > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}
.vs-video-area .slick-slide .w-100.bg-light-dark {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.vs-video-area .slick-slide .vs-events {
  flex: 1;
}

/* ── News banner image ───────────────────────────────────────────── */
.vs-blog .blog-img {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}
.vs-blog .blog-img img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.vs-blog .blog-img:hover img {
  transform: scale(1.04);
}

/* ── Rankings tab buttons ────────────────────────────────────────── */
.rk-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.rk-tab-btn:hover {
  color: #fff;
  background: rgba(var(--theme-color), 0.15);
  border-color: rgba(var(--theme-color), 0.5);
  text-decoration: none;
}
.rk-tab-btn.active {
  background: linear-gradient(to right, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
  color: #fff;
  border-color: transparent;
}
.rk-tab-btn i {
  font-size: 12px;
}

/* ── Shared rk-arrow design (Rankings + Guild Wars) ─────────────── */
.rk-arrow-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(var(--theme-color2), 0.85) 0%, rgba(var(--theme-color), 0.75) 100%);
  color: #fff;
  font-size: 17px;
  clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
  transition: background 0.25s ease, clip-path 0.2s ease;
}
.rk-arrow:hover .rk-arrow-inner {
  background: linear-gradient(160deg, rgba(var(--theme-color2), 1) 0%, rgba(var(--theme-color), 1) 100%);
  clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
}
.slick-prev.rk-arrow .rk-arrow-inner {
  clip-path: polygon(0% 0%, 85% 0%, 100% 100%, 15% 100%);
}
.slick-prev.rk-arrow:hover .rk-arrow-inner {
  clip-path: polygon(0% 0%, 90% 0%, 100% 100%, 10% 100%);
}

/* ── Guild Wars carousel arrows ──────────────────────────────────── */
.gw-carousel-wrap {
  position: relative;
  padding-left: 30px;
  padding-right: 30px;
}
.gw-carousel-wrap .slick-arrow.rk-arrow {
  opacity: 1 !important;
  visibility: visible !important;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 72px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}
.gw-carousel-wrap .slick-arrow.slick-next.rk-arrow {
  left: auto;
  right: -4px;
}
.gw-carousel-wrap .slick-arrow.slick-disabled {
  opacity: 0.18 !important;
  cursor: default;
  pointer-events: none;
}

/* ── Rankings carousel arrows ────────────────────────────────────── */
.rk-tab-pane {
  position: relative;
  padding-left: 30px;
  padding-right: 30px;
}
.rk-tab-pane .slick-arrow.rk-arrow {
  opacity: 1 !important;
  visibility: visible !important;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 72px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}
.rk-tab-pane .slick-arrow.slick-next.rk-arrow {
  left: auto;
  right: -4px;
}
.rk-tab-pane .slick-arrow.slick-disabled {
  opacity: 0.18 !important;
  cursor: default;
  pointer-events: none;
}

/* ── Rankings equal-height slides ───────────────────────────────── */
.rk-tab-pane .slick-track {
  display: flex !important;
  align-items: stretch;
}
.rk-tab-pane .slick-slide {
  height: auto !important;
  display: flex !important;
  flex-direction: column;
}
.rk-tab-pane .slick-slide > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}
.rk-tab-pane .slick-slide > div > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}
.rk-tab-pane .slick-slide .vs-sidebox {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.rk-tab-pane .slick-slide .rk-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.rk-tab-pane .slick-slide .rk-inner .ranking {
  flex: 1;
}

/* ── Header auth buttons (Sign In / Register) ────────────────────── */
.hdr-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  text-decoration: none !important;
  border-radius: 3px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.hdr-btn i {
  font-size: 11px;
}
/* Sign In — outlined */
.hdr-btn-outline {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.18);
}
.hdr-btn-outline:hover {
  color: #fff;
  background: rgba(var(--theme-color), 0.12);
  border-color: rgba(var(--theme-color), 0.6);
}
/* Register — gradient fill */
.hdr-btn-gradient {
  color: #fff;
  background: linear-gradient(to right, rgba(var(--theme-color2),1) 0%, rgba(var(--theme-color),1) 100%);
  border: 1px solid transparent;
}
.hdr-btn-gradient:hover {
  color: #fff;
  opacity: 0.88;
}
/* ── Header logged-in user widget ───────────────────────────────── */
.hdr-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hdr-user-avatar {
  position: relative;
  display: inline-block;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.hdr-av-img {
  width: 65px;
  height: 69px;
  background-size: 65px 69px;
  background-repeat: no-repeat;
  background-position: center center;
  position: absolute;
  margin-left: 13px;
  margin-top: 11px;
  border-radius: 64px;
  z-index: 0;
}
.hdr-av-frame {
  width: 90px;
  height: 90px;
  background-image: url('../images/avatar/frames.png');
  background-size: 313px;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.hdr-av-frame.prehistoric {
  background-position-x: -14px;
  background-position-y: -100px;
}
.hdr-av-frame.ancient {
  background-position-x: -109px;
  background-position-y: -100px;
}
.hdr-av-frame.medieval {
  background-position-x: -208px;
  background-position-y: -100px;
}
.hdr-av-frame.modern {
  background-position-x: -208px;
  background-position-y: -4px;
}
.hdr-av-frame.contemporary {
  background-position-x: -109px;
  background-position-y: -4px;
}
.hdr-av-frame.premium {
  background-position-x: -14px;
  background-position-y: -4px;
}
.hdr-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.2;
}
.hdr-user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.hdr-user-nick {
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  font-size: 12px;
}
.hdr-user-coins {
  color: rgba(var(--theme-color), 1);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.hdr-user-coins i {
  font-size: 10px;
  margin-right: 3px;
}
.hdr-user-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}
.hdr-user-btns .hdr-btn {
  padding: 5px 10px;
  font-size: 10px;
  gap: 5px;
}
.hdr-user-btns .hdr-btn i {
  font-size: 9px;
}
/* ── Header icon buttons (settings, logout) ─────────────────────── */
.hdr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.hdr-icon-btn:hover {
  background: rgba(var(--theme-color), 0.18);
  border-color: rgba(var(--theme-color), 0.6);
  color: #fff;
}
.hdr-icon-btn-danger:hover {
  background: rgba(220,60,60,0.18);
  border-color: rgba(220,60,60,0.6);
  color: #ff7272;
}
/* ── Settings modal ─────────────────────────────────────────────── */
.sm-dialog { max-width: min(1400px, 98vw); margin: 1vh auto; }
#settingsModal .modal-content { width: 100% !important; }
.sm-modal-body { padding: 0; }
.sm-layout { display: flex; min-height: 540px; }
.sm-nav {
  width: 165px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm-nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}
.sm-nav-btn i { width: 14px; font-size: 13px; text-align: center; flex-shrink: 0; }
.sm-nav-btn:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.05); }
.sm-nav-btn.active {
  color: rgba(var(--theme-color), 1);
  background: rgba(var(--theme-color), 0.08);
  border-left-color: rgba(var(--theme-color), 1);
}
.sm-content { flex: 1; padding: 26px 28px; overflow-y: auto; max-height: 680px; }
.sm-tab-pane { display: none; }
.sm-tab-pane.active { display: block; }
/* Avatar tab */
.sm-av-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sm-av-preview {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.sm-av-preview .hdr-av-img { width: 65px; height: 69px; background-size: 65px 69px; margin-left: 13px; margin-top: 11px; }
.sm-av-preview .hdr-av-frame { width: 90px; height: 90px; background-size: 313px; }
.sm-av-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.sm-av-item {
  width: 62px;
  height: 62px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.sm-av-item:hover { border-color: rgba(var(--theme-color), 0.5); transform: scale(1.08); }
.sm-av-item.selected { border-color: rgba(var(--theme-color), 1); box-shadow: 0 0 0 2px rgba(var(--theme-color),0.3); }
.sm-av-item[data-uploaded] { outline: 2px solid rgba(var(--theme-color),0.55); outline-offset: 2px; }
/* Upload zone */
.sm-upload-zone {
  border: 2px dashed rgba(var(--theme-color), 0.35);
  border-radius: 8px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: rgba(0,0,0,0.12);
  margin-bottom: 16px;
  user-select: none;
}
.sm-upload-zone:hover,
.sm-upload-zone.drag-over {
  border-color: rgba(var(--theme-color), 0.85);
  background: rgba(var(--theme-color), 0.06);
}
.sm-upload-zone i {
  font-size: 26px;
  color: rgba(var(--theme-color), 0.55);
  display: block;
  margin-bottom: 8px;
}
.sm-upload-zone-text { font-size: 12px; color: rgba(255,255,255,0.4); }
.sm-upload-zone-text strong { color: rgba(var(--theme-color), 0.9); }
/* Cropper */
.sm-cropper-area {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.sm-cropper-canvas-wrap {
  position: relative;
  flex-shrink: 0;
  width: 450px;
  max-width: 450px;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  background: rgba(0,0,0,0.3);
}
#sm-crop-canvas {
  display: block;
  cursor: grab;
  width: 100%;
  aspect-ratio: 1 / 1;
}
#sm-crop-canvas:active { cursor: grabbing; }
.sm-crop-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 48%, rgba(0,0,0,0.62) 48%);
  pointer-events: none;
}
.sm-cropper-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 4px;
}
.sm-crop-preview-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 10px;
}
.sm-crop-preview-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid rgba(var(--theme-color), 0.45);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255,255,255,0.04);
  margin-bottom: 18px;
}
.sm-crop-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
  line-height: 1.8;
}
.sm-cropper-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sm-crop-cancel-btn {
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sm-crop-cancel-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }
.sm-crop-cancel-btn:disabled { opacity: .4; cursor: not-allowed; }
/* Upload progress */
.sm-upload-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 7px;
  width: 100%;
  max-width: 240px;
}
.sm-upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(to right, rgba(var(--theme-color2),1), rgba(var(--theme-color),1));
  transition: width .2s;
}
/* Grid divider */
.sm-av-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,0.22);
}
.sm-av-divider::before,
.sm-av-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
/* Profile / Security fields */
.sm-field { margin-bottom: 16px; }
/* ── Select2 dark theme (fw-dark) ───────────────────────────────── */
.select2-container--fw-dark .select2-selection--single {
  background: #1a1c22;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  height: 38px;
  display: flex;
  align-items: center;
  transition: border-color .2s;
}
.select2-container--fw-dark.select2-container--open .select2-selection--single,
.select2-container--fw-dark.select2-container--focus .select2-selection--single {
  border-color: rgba(var(--theme-color), 0.55);
  outline: none;
}
.select2-container--fw-dark .select2-selection--single .select2-selection__rendered {
  color: #fff;
  font-size: 13px;
  padding-left: 12px;
  padding-right: 30px;
  line-height: 36px;
}
.select2-container--fw-dark .select2-selection--single .select2-selection__placeholder {
  color: rgba(255,255,255,0.3);
}
.select2-container--fw-dark .select2-selection--single .select2-selection__arrow {
  height: 36px;
  right: 8px;
}
.select2-container--fw-dark .select2-selection--single .select2-selection__arrow b {
  border-color: rgba(255,255,255,0.35) transparent transparent transparent;
}
.select2-container--fw-dark.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent rgba(255,255,255,0.35) transparent;
}
.select2-container--fw-dark .select2-dropdown {
  background: #1a1c22;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.select2-container--fw-dark .select2-search--dropdown {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.select2-container--fw-dark .select2-search--dropdown .select2-search__field {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  padding: 5px 9px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.select2-container--fw-dark .select2-results__option {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  padding: 8px 12px;
}
.select2-container--fw-dark .select2-results__option--highlighted {
  background: rgba(var(--theme-color), 0.18);
  color: #fff;
}
.select2-container--fw-dark .select2-results__option[aria-selected=true] {
  background: rgba(var(--theme-color), 0.3);
  color: rgba(var(--theme-color), 1);
}
.select2-container--fw-dark .select2-results { max-height: 220px; overflow-y: auto; }
/* ─────────────────────────────────────────────────────────────────── */
.sm-label {
  display: block;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.sm-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
select.sm-input {
  background-color: #1a1c22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.35)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
select.sm-input option {
  background-color: #1a1c22;
  color: #fff;
}
.sm-input:focus { border-color: rgba(var(--theme-color), 0.55); }
.sm-input[readonly], .sm-input:disabled { opacity: 0.45; cursor: not-allowed; }
.sm-input-row { display: flex; gap: 8px; align-items: flex-start; }
.sm-input-row .sm-input { flex: 1; }
.sm-save-inline {
  padding: 9px 14px;
  background: linear-gradient(to right, rgba(var(--theme-color2),1) 0%, rgba(var(--theme-color),1) 100%);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.sm-save-inline:hover { opacity: 0.88; }
.sm-save-inline:disabled { opacity: 0.5; cursor: not-allowed; }
.sm-field-msg { font-size: 11px; margin-top: 5px; }
.sm-field-msg.ok { color: #5cb85c; }
.sm-field-msg.err { color: #e74c3c; }
/* Password strength */
.sm-pw-strength { height: 3px; border-radius: 2px; margin-top: 7px; background: rgba(255,255,255,0.08); overflow: hidden; }
.sm-pw-strength-bar { height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.sm-pw-level { font-size: 10px; margin-top: 4px; color: rgba(255,255,255,0.35); }
/* ── Logout overlay (custom, no Bootstrap modal) ────────────────── */
#lo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}
#lo-overlay.lo-visible {
  display: flex;
  animation: loFadeIn 0.15s ease;
}
@keyframes loFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lo-card {
  background: #13151c;
  border-radius: 12px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.07);
  animation: loSlideIn 0.18s ease;
}
@keyframes loSlideIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.lo-stripe {
  height: 4px;
  background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}
.lo-inner {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lo-av {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(231,76,60,0.4);
  position: relative;
}
.lo-av-frame {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(231,76,60,0.2);
  pointer-events: none;
}
.lo-text { flex: 1; min-width: 0; }
.lo-text strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lo-text span {
  color: rgba(255,255,255,0.38);
  font-size: 11px;
}
.lo-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.lo-action {
  flex: 1;
  padding: 11px 0;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lo-action + .lo-action {
  border-left: 1px solid rgba(255,255,255,0.07);
}
.lo-action-cancel {
  color: rgba(255,255,255,0.45);
}
.lo-action-cancel:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.75); }
.lo-action-confirm {
  color: #e74c3c;
}
.lo-action-confirm:hover { background: rgba(231,76,60,0.08); }
.lo-action-confirm:disabled { opacity: 0.5; cursor: not-allowed; }
/* Mobile variant — stacked layout */
.hdr-user-mobile {
  flex-wrap: wrap;
  gap: 8px;
}
.hdr-user-mobile .hdr-user-btns {
  width: 100%;
  margin-left: 0;
}
.hdr-user-mobile .hdr-user-btns .hdr-btn {
  flex: 1;
  justify-content: center;
}

/* Mobile: stretch both buttons equally */
@media (max-width: 991px) {
  .hdr-auth-group {
    width: 100%;
  }
  .hdr-auth-group .hdr-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
  }
}

/* ── Login Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  --bs-backdrop-opacity: 0.75;
}
.lm-dialog {
  margin-top: 8vh;
  margin-bottom: 2vh;
}
.lm-card {
  background: #0f1116;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  position: relative;
}
.lm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.07);
  border: none;
  color: rgba(255,255,255,0.45);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 12px;
  transition: background 0.2s, color 0.2s;
}
.lm-close:hover {
  background: rgba(var(--theme-color), 0.25);
  color: #fff;
}
.lm-top {
  text-align: center;
  padding: 32px 32px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lm-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, rgba(var(--theme-color2),1) 0%, rgba(var(--theme-color),1) 100%);
}
.lm-logo {
  height: 44px;
  margin-bottom: 14px;
}
.lm-title {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 5px;
}
.lm-sub {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin: 0;
}
#lm-form {
  padding: 22px 28px 0;
}
.lm-field {
  position: relative;
  margin-bottom: 13px;
}
.lm-field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  padding: 11px 42px 11px 40px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.lm-field input:focus {
  border-color: rgba(var(--theme-color), 0.6);
  background: rgba(255,255,255,0.08);
}
.lm-field input::placeholder {
  color: rgba(255,255,255,0.28);
}
.lm-fi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(var(--theme-color), 0.75);
  font-size: 13px;
  pointer-events: none;
}
#lm-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  transition: color 0.2s;
}
#lm-eye:hover { color: rgba(255,255,255,0.65); }
.lm-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px 24px;
}
.lm-links a {
  color: rgba(255,255,255,0.38);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}
.lm-links a:hover {
  color: rgba(var(--theme-color), 1);
  text-decoration: none;
}
.lm-link-accent {
  color: rgba(var(--theme-color), 0.85) !important;
}
.lm-link-accent:hover {
  color: rgba(var(--theme-color), 1) !important;
}
#lm-form .vs-btn.gradient-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  margin-bottom: 0;
}

/* ── Auth pages (login.tpl, register.tpl, etc.) ──────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding: 60px 0;
}
.auth-card {
  background: #171920;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.auth-card-accent {
  height: 3px;
  background: linear-gradient(to right, rgba(var(--theme-color2),1) 0%, rgba(var(--theme-color),1) 100%);
}
.auth-card-header {
  padding: 28px 36px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.auth-logo {
  height: 48px;
  margin-bottom: 14px;
}
.auth-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}
.auth-sub {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin: 0;
}
.auth-form {
  padding: 26px 36px 0;
}
.auth-field {
  position: relative;
  margin-bottom: 15px;
}
.auth-field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  padding: 12px 42px 12px 42px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  border-color: rgba(var(--theme-color), 0.6);
  background: rgba(255,255,255,0.08);
}
.auth-field input::placeholder {
  color: rgba(255,255,255,0.28);
}
.auth-fi {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(var(--theme-color), 0.75);
  font-size: 13px;
  pointer-events: none;
}
#auth-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  transition: color 0.2s;
}
#auth-eye:hover { color: rgba(255,255,255,0.65); }
.auth-msg {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.auth-msg.success {
  background: rgba(40,180,80,0.12);
  border: 1px solid rgba(40,180,80,0.28);
  color: #72e094;
}
.auth-msg.error {
  background: rgba(220,50,50,0.12);
  border: 1px solid rgba(220,50,50,0.28);
  color: #f18888;
}
.auth-form .vs-btn.gradient-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  padding: 18px 36px 0;
  gap: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-divider span {
  color: rgba(255,255,255,0.22);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 36px 28px;
}
.auth-footer-links a {
  color: rgba(255,255,255,0.38);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-footer-links a:hover {
  color: rgba(var(--theme-color), 1);
  text-decoration: none;
}
.auth-link-accent {
  color: rgba(var(--theme-color), 0.85) !important;
}
.auth-link-accent:hover {
  color: rgba(var(--theme-color), 1) !important;
}

/* ── Footer widget wrapper — remove top padding ─────────────────── */
.footer-layout1 .footer-widget-wrapper {
  padding-top: 0 !important;
}

/* ── Rankings section — theme-color overrides ───────────────────── */
/* First cell (rank number) uses theme gradient instead of hardcoded color */
.cell-ranking:nth-child(1) {
  background: linear-gradient(135deg, rgba(var(--theme-color), 1) 85%, var(--light-dark-color) 50%) !important;
}
.row-ranking:nth-child(odd) .cell-ranking:nth-child(1) {
  background: linear-gradient(135deg, rgba(var(--theme-color2), 1) 85%, var(--light-dark-color) 50%) !important;
}
/* value badge uses theme color */
.cell-ranking span {
  color: rgba(var(--theme-color), 1) !important;
}
/* hover link color */
.cell-ranking a:hover {
  color: rgba(var(--theme-color), 1) !important;
}

/* ── FW Diamond gem icon ─────────────────────────────────────────────
   Usage:  <i class="fw-diamond"></i>
   Replaces fas fa-gem everywhere coins/WCoin are shown.
   Image: diamonds.png (45×72px, 3 gems stacked — middle gem = rows 1/3)
   ──────────────────────────────────────────────────────────────────── */
.fw-diamond {
  display:          inline-block;
  vertical-align:   middle;
  /* crop to middle gem: show 45×24px window offset 24px from top */
  width:            1em;
  height:           1em;
  background-image:    url('../images/diamonds.png'); 
  background-size:     auto 300%;   /* scale so full height = 3× element */
  background-position: 87% 50%;  /* 50% = middle third */
  background-repeat:   no-repeat;
  position:         relative;
  filter:           drop-shadow(0 0 3px rgba(120, 80, 255, 0.55));
  animation:        fwDiamondGlow 2.4s ease-in-out infinite;
  line-height:      1;
}

/* Shine sweep pseudo-element */
.fw-diamond::after {
  content:          '';
  position:         absolute;
  inset:            0;

  background-size:  200% 200%;
  background-position: -100% -100%;
  pointer-events:   none;
}

/* Glow pulse */
@keyframes fwDiamondGlow {
  0%,  100% { filter: drop-shadow(0 0 3px rgba(120,  80, 255, 0.55)); }
  50%       { filter: drop-shadow(0 0 7px rgba(100, 180, 255, 0.85))
                       drop-shadow(0 0 14px rgba(120,  80, 255, 0.4)); }
}

/* Shine sweep */
@keyframes fwDiamondShine {
  0%        { background-position: -100% -100%; opacity: 0; }
  30%       { opacity: 0; }
  45%       { background-position: -100% -100%; opacity: 1; }
  65%       { background-position:  200%  200%; opacity: 0; }
  100%      { background-position:  200%  200%; opacity: 0; }
}

/* Size helpers — use like fa-xs / fa-lg */
.fw-diamond.fw-diamond-xs  { font-size: 10px; }
.fw-diamond.fw-diamond-sm  { font-size: 13px; }
.fw-diamond.fw-diamond-lg  { font-size: 20px; }
.fw-diamond.fw-diamond-xl  { font-size: 28px; }
.fw-diamond.fw-diamond-2x  { font-size: 2em;  }

/* Slower / no-anim variants */
.fw-diamond.fw-diamond-slow { animation-duration: 5s; }
.fw-diamond.fw-diamond-still {
  animation: none;
  filter: drop-shadow(0 0 3px rgba(120, 80, 255, 0.5));
}
.fw-diamond.fw-diamond-still::after { animation: none; opacity: 0; }
