/* ============================================================
   GTA: VALEN COUNTY - JOGJAGAMERS (IPS 4) MODERN BLUE EDITION
   Animated Blue Gradients + Glassmorphism + Full Micro-Motion
   ============================================================ */
:root {
  --bg-grad: linear-gradient(135deg, #dceafe 0%, #eef5ff 36%, #dbeafe 72%, #e6f0ff 100%);
  --orb-1: rgba(37, 99, 235, 0.22);
  --orb-2: rgba(56, 189, 248, 0.2);

  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: rgba(241, 246, 254, 0.9);
  --surface-hover: rgba(219, 234, 254, 0.58);

  --header-grad: linear-gradient(125deg, #071a38 0%, #0e346b 38%, #1a5bc2 72%, #0d2b5c 100%);
  --nav-primary-grad: linear-gradient(90deg, #124ba3 0%, #1d6ce0 50%, #1659bf 100%);
  --nav-sub-bg: rgba(255, 255, 255, 0.84);
  --cat-grad: linear-gradient(100deg, #1a63cf 0%, #2575ec 52%, #1553b3 100%);

  --border: rgba(148, 178, 219, 0.36);
  --border-strong: rgba(114, 152, 206, 0.52);

  --text-primary: #1e293b;
  --text-secondary: #334155;
  --text-muted: #5b6e87;
  --text-heading: #0b1930;

  --accent: #1a63cf;
  --accent-hover: #124ba3;
  --accent-soft: rgba(29, 108, 224, 0.12);
  --accent-border: rgba(29, 108, 224, 0.32);

  --gold: #c97f00;
  --gold-soft: rgba(245, 158, 11, 0.14);
  --gold-border: rgba(245, 158, 11, 0.42);

  --green: #15803d;
  --green-soft: rgba(22, 163, 74, 0.12);
  --green-border: rgba(22, 163, 74, 0.35);

  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.11);
  --red-border: rgba(220, 38, 38, 0.34);

  --discord: #5865f2;

  /* Compatibility aliases */
  --ips-surface: var(--surface);
  --ips-surface-2: var(--surface-soft);
  --ips-border: var(--border);
  --ips-muted: var(--text-muted);
  --ips-gold: var(--gold);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-box: 0 8px 28px rgba(15, 42, 92, 0.08), 0 1px 3px rgba(15, 42, 92, 0.05);
  --shadow-hover: 0 14px 36px rgba(24, 96, 195, 0.14), 0 2px 6px rgba(15, 42, 92, 0.07);
}

[data-theme="dark"] {
  --bg-grad: linear-gradient(135deg, #060b17 0%, #0b1730 38%, #0e2246 72%, #071022 100%);
  --orb-1: rgba(37, 99, 235, 0.26);
  --orb-2: rgba(14, 165, 233, 0.18);

  --surface: rgba(17, 25, 42, 0.84);
  --surface-solid: #11192a;
  --surface-soft: rgba(24, 36, 59, 0.86);
  --surface-hover: rgba(37, 99, 235, 0.15);

  --header-grad: linear-gradient(125deg, #050f24 0%, #0b234d 40%, #154596 74%, #091a38 100%);
  --nav-primary-grad: linear-gradient(90deg, #0e3b82 0%, #195cc2 50%, #124699 100%);
  --nav-sub-bg: rgba(14, 21, 36, 0.82);
  --cat-grad: linear-gradient(100deg, #144ca3 0%, #1e66d1 52%, #113f8a 100%);

  --border: rgba(96, 140, 210, 0.18);
  --border-strong: rgba(120, 165, 235, 0.34);

  --text-primary: #e6effb;
  --text-secondary: #cbd9ee;
  --text-muted: #8ea4c4;
  --text-heading: #ffffff;

  --accent: #5ba4ff;
  --accent-hover: #8ac0ff;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --accent-border: rgba(96, 165, 250, 0.4);

  --gold: #f6c453;
  --gold-soft: rgba(246, 196, 83, 0.15);
  --gold-border: rgba(246, 196, 83, 0.38);

  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.15);
  --green-border: rgba(52, 211, 153, 0.38);

  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);
  --red-border: rgba(248, 113, 113, 0.38);

  --shadow-box: 0 10px 32px rgba(0, 0, 0, 0.38);
  --shadow-hover: 0 16px 42px rgba(20, 90, 210, 0.22);
}

/* ── KEYFRAME ANIMATIONS ── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatOrbA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(42px, 28px, 0) scale(1.08); }
}

@keyframes floatOrbB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-46px, -24px, 0) scale(1.1); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sheenSweep {
  0% { transform: translateX(-140%) skewX(-22deg); }
  100% { transform: translateX(260%) skewX(-22deg); }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-grad);
  background-size: 200% 200%;
  animation: gradientShift 18s ease infinite;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Floating Ambient Blue Gradient Orbs */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, var(--orb-1), transparent 70%);
  animation: floatOrbA 16s ease-in-out infinite;
}

body::after {
  width: 480px;
  height: 480px;
  bottom: -140px;
  right: -100px;
  background: radial-gradient(circle, var(--orb-2), transparent 70%);
  animation: floatOrbB 20s ease-in-out infinite;
}

header, nav, .ips-subnav, .ips-breadcrumb-bar, main, footer {
  position: relative;
  z-index: 1;
}

h1, h2, h3, .ips-brand-title, .ips-box-title, .ips-page-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--accent-hover); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-primary);
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }

.ips-wrap {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── ANIMATED BLUE GRADIENT HEADER BANNER ── */
.ips-header {
  background: var(--header-grad);
  background-size: 220% 220%;
  animation: gradientShift 14s ease infinite;
  color: #fff;
  overflow: hidden;
}

.ips-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  width: 45%;
  animation: sheenSweep 9s ease-in-out infinite;
  pointer-events: none;
}

.ips-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
  position: relative;
  z-index: 2;
}

.ips-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none !important;
  transition: transform 0.22s ease;
}

.ips-brand:hover {
  transform: translateY(-1px);
  color: #fff;
}

.ips-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.ips-brand:hover .ips-brand-logo {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.45);
}

.ips-brand-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.35px;
  color: #fff;
  line-height: 1.15;
}

.ips-brand-sub {
  display: block;
  font-size: 12px;
  color: #bfdbfe;
  font-weight: 500;
  margin-top: 2px;
}

.ips-userbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ips-signin-link {
  color: #dbeafe !important;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.ips-signin-link:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  color: #fff !important;
}

.ips-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 4px 14px 4px 5px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ips-user-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.ips-user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── TIER 1: PRIMARY BLUE GRADIENT NAV BAR ── */
.ips-navbar {
  background: var(--nav-primary-grad);
  background-size: 180% 180%;
  animation: gradientShift 16s ease infinite;
  box-shadow: 0 4px 16px rgba(15, 42, 92, 0.2);
}

.ips-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  flex-wrap: wrap;
}

.ips-nav-links {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.ips-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 17px 11px;
  border-radius: 9px 9px 0 0;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.ips-nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.ips-nav-link.active {
  background: var(--nav-sub-bg);
  color: var(--accent);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.ips-search-form {
  display: flex;
  align-items: center;
  background: rgba(7, 20, 46, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 2px 4px 2px 14px;
  margin: 6px 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ips-search-form:focus-within {
  background: rgba(7, 20, 46, 0.54);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}

.ips-search-form input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 5px 8px 5px 0;
  font-size: 12.5px;
  width: 205px;
  font-family: inherit;
}
.ips-search-form input:focus { outline: none; }
.ips-search-form input::placeholder { color: rgba(255, 255, 255, 0.72); }

.ips-search-form button {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.18s ease, transform 0.15s ease;
}
.ips-search-form button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.03);
}

/* ── TIER 2: STICKY GLASS SUB-NAV BAR ── */
.ips-subnav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--nav-sub-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(15, 42, 92, 0.06);
}

.ips-subnav-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  overflow-x: auto;
}

.ips-subnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 13px;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color 0.18s ease;
}

.ips-subnav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ips-subnav-link:hover,
.ips-subnav-link.active {
  color: var(--accent);
}

.ips-subnav-link:hover::after,
.ips-subnav-link.active::after {
  transform: scaleX(1);
}

/* ── BREADCRUMB ── */
.ips-breadcrumb-bar {
  padding: 14px 0 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ips-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ips-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ips-breadcrumb a {
  color: var(--text-secondary);
  font-weight: 500;
}
.ips-breadcrumb a:hover { color: var(--accent); }
.ips-breadcrumb span.sep { color: var(--text-muted); opacity: 0.6; }

/* ── PAGE HEADER ROW ── */
.ips-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ips-page-title {
  font-size: 25px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.4px;
}

/* ── MAIN 2-COLUMN LAYOUT ── */
.ips-main {
  flex: 1;
  padding: 10px 0 50px;
}

.ips-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 20px;
  align-items: start;
}

.ips-layout-single {
  max-width: 980px;
  margin: 0 auto;
}

/* ── MODERN ANIMATED BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

.btn-primary {
  background: linear-gradient(135deg, #2575ec 0%, #1655b8 100%);
  color: #fff !important;
  box-shadow: 0 5px 16px rgba(24, 96, 195, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3384fa 0%, #1d64cf 100%);
  box-shadow: 0 8px 22px rgba(29, 108, 224, 0.42);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff !important;
  box-shadow: 0 5px 15px rgba(217, 119, 6, 0.28);
}

.btn-discord {
  background: linear-gradient(135deg, #6370f7 0%, #4752c4 100%);
  color: #fff !important;
  box-shadow: 0 5px 16px rgba(88, 101, 242, 0.32);
}
.btn-discord:hover {
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.45);
}

.btn-secondary {
  background: var(--surface-solid);
  color: var(--text-primary) !important;
  border-color: var(--border-strong);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary) !important;
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
}

.ips-header .btn-ghost {
  color: #dbeafe !important;
  border-color: rgba(255, 255, 255, 0.3);
}
.ips-header .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red) !important;
  border-color: var(--red-border);
}
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.2);
}

/* ── ALERTS ── */
.ips-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  animation: fadeSlideUp 0.35s ease both;
}
.ips-alert.warn { border-color: var(--gold-border); background: var(--gold-soft); color: var(--gold); }
.ips-alert.error { border-color: var(--red-border); background: var(--red-soft); color: var(--red); }
.ips-alert.success { border-color: var(--green-border); background: var(--green-soft); color: var(--green); }

/* ── GLASS ELEVATED IPS CATEGORY & WIDGET CARDS ── */
.ips-box {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-box);
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.ips-box:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

#forumMain > .ips-box:nth-child(1) { animation-delay: 0.04s; }
#forumMain > .ips-box:nth-child(2) { animation-delay: 0.1s; }
#forumMain > .ips-box:nth-child(3) { animation-delay: 0.16s; }
#forumMain > .ips-box:nth-child(4) { animation-delay: 0.22s; }
#forumMain > .ips-box:nth-child(5) { animation-delay: 0.28s; }

.ips-sidebar > .ips-box:nth-child(1) { animation-delay: 0.08s; }
.ips-sidebar > .ips-box:nth-child(2) { animation-delay: 0.16s; }
.ips-sidebar > .ips-box:nth-child(3) { animation-delay: 0.24s; }

/* Signature Blue Gradient Category Header Bar */
.ips-box-title {
  background: var(--cat-grad);
  background-size: 180% 180%;
  color: #ffffff;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background-position 0.4s ease, filter 0.2s ease;
}

.ips-box-title.collapsible {
  cursor: pointer;
  user-select: none;
}
.ips-box-title.collapsible:hover {
  background-position: 100% 50%;
  filter: brightness(1.04);
}
.ips-box-title .chev {
  display: inline-block;
  font-size: 12px;
  opacity: 0.9;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.ips-box-title.is-collapsed .chev {
  transform: rotate(-90deg);
}

/* Sidebar Widget Header */
.ips-sidebar .ips-box-title {
  background: linear-gradient(90deg, var(--accent-soft) 0%, var(--surface-soft) 100%);
  color: var(--text-heading);
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  padding: 12px 16px;
  border-left: 3.5px solid var(--accent);
}

.ips-box-body { padding: 18px; }

/* ── ANIMATED IPS 4 FORUM ROW ── */
.ips-forum-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 88px 238px;
  gap: 15px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease, padding-left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ips-forum-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  transform: scaleY(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ips-forum-row:last-child { border-bottom: none; }
.ips-forum-row:hover {
  background: var(--surface-hover);
  padding-left: 22px;
}
.ips-forum-row:hover::before { transform: scaleY(1); }
.ips-forum-row.locked { opacity: 0.72; }

/* Circular Blue Icon Badge with Glow Pop */
.ips-forum-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b7df5 0%, #1553b3 100%);
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(24, 96, 195, 0.28);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
}

.ips-forum-row:hover .ips-forum-icon {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 6px 18px rgba(37, 117, 236, 0.45);
}

.ips-forum-icon.faction {
  background: linear-gradient(135deg, #1e5ec4 0%, #0d3a82 100%);
}

.ips-forum-icon.locked-icon {
  background: var(--border-strong);
  color: var(--surface-solid);
  box-shadow: none;
}

.ips-forum-main h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
  transition: color 0.18s ease;
}

.ips-forum-row:hover .ips-forum-main h3 { color: var(--accent); }

.ips-forum-main p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.ips-forum-meta-pills {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ips-forum-stats {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  padding-right: 4px;
}

.ips-forum-stats strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.ips-lastpost {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
}

.ips-lastpost img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ips-forum-row:hover .ips-lastpost img {
  transform: scale(1.06);
  border-color: var(--accent);
}

.ips-lastpost-info { min-width: 0; }

.ips-lastpost-title {
  display: block;
  color: var(--text-heading);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ips-lastpost-sub {
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── PILLS & ROLE BADGES ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.pill-open { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.pill-locked { border-color: var(--red-border); color: var(--red); background: var(--red-soft); }
.pill-pin { border-color: var(--gold-border); color: var(--gold); background: var(--gold-soft); }

/* ── SIDEBAR WIDGETS ── */
.ips-widget-list { list-style: none; }

.ips-widget-item {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: background 0.18s ease, padding-left 0.18s ease;
}
.ips-widget-item:last-child { border-bottom: none; }
.ips-widget-item:hover {
  background: var(--surface-hover);
  padding-left: 19px;
}

.ips-widget-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid var(--border);
}

.ips-widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ips-widget-meta { font-size: 11.5px; color: var(--text-muted); }
.ips-widget-cat { font-size: 11px; color: var(--accent); margin-top: 2px; font-weight: 600; }

.ips-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.ips-stat-cell {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.ips-stat-cell:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
}
.ips-stat-cell span { display: block; font-size: 11px; color: var(--text-muted); }
.ips-stat-cell strong { font-size: 16.5px; color: var(--text-heading); }

/* ── COMMUNITY STATISTICS STRIP ── */
.ips-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ips-stats-strip-item {
  padding: 18px 14px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.ips-stats-strip-item:last-child { border-right: none; }
.ips-stats-strip-item:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.ips-stats-strip-item strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.ips-stats-strip-item span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── THREAD LIST ── */
.ips-topic-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 140px;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s ease, padding-left 0.2s ease;
}
.ips-topic-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}
.ips-topic-row:last-child { border-bottom: none; }
.ips-topic-row:hover {
  background: var(--surface-hover);
  padding-left: 22px;
}
.ips-topic-row:hover::before { transform: scaleY(1); }

.ips-topic-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  transition: color 0.18s ease;
}
.ips-topic-row:hover .ips-topic-title { color: var(--accent); }

.ips-topic-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* ── 2-COLUMN TOPIC POST VIEW ── */
.ips-post {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-box);
  animation: fadeSlideUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ips-post-author {
  background: var(--surface-soft);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  text-align: center;
}

.ips-post-author img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--accent-border);
  margin-bottom: 9px;
  box-shadow: 0 6px 16px rgba(24, 96, 195, 0.2);
}

.ips-post-author-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-heading);
  margin-bottom: 6px;
  word-break: break-word;
}

.ips-post-content-col { display: flex; flex-direction: column; }

.ips-post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-soft);
}

.ips-post-body {
  padding: 18px;
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

/* ── FORMS & ACCOUNT / CHARACTER CARDS ── */
.form-group { margin-bottom: 15px; }
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}

.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 12px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.kv-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kv-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: 0 6px 18px rgba(24, 96, 195, 0.1);
}
.kv-card span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.kv-card strong {
  font-size: 14.5px;
  color: var(--text-heading);
  word-break: break-all;
}

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

.char-card {
  display: flex;
  gap: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}
.char-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-hover);
}

.char-skin {
  width: 72px;
  height: 112px;
  object-fit: contain;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.char-card:hover .char-skin { transform: scale(1.05); }

.char-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 12px;
  font-size: 12.5px;
  margin-top: 8px;
}
.char-stats span { color: var(--text-muted); }
.money { color: var(--green); }

/* ── MODAL WITH SPRING POP-IN ── */
.ips-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.ips-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 36, 0.68);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.22s ease both;
}
.ips-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 610px;
  max-height: 90dvh;
  overflow-y: auto;
  margin-bottom: 0;
  animation: modalPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── LIVE SERVER STATUS, ONLINE IC & SERVER RULES (SCREENSHOT STYLE) ── */
@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.server-status-badge.status-online {
  background: var(--green-soft);
  border-color: var(--green-border);
  color: var(--green);
}
.server-status-badge.status-online .live-dot {
  background: var(--green);
  animation: pulseLive 1.8s ease-in-out infinite;
}

.server-status-badge.status-maint {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold);
}
.server-status-badge.status-maint .live-dot {
  background: var(--gold);
}

.server-status-badge.status-offline {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}
.server-status-badge.status-offline .live-dot {
  background: var(--red);
}

.online-ic-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.online-ic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 7px;
}

.online-ic-head strong {
  font-size: 14px;
  color: var(--accent);
}

.players-bar {
  width: 100%;
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.players-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #0ea5e9 100%);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.rules-list {
  padding: 4px 0;
}

.rules-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  transition: background 0.15s ease;
}
.rules-row:last-child { border-bottom: none; }
.rules-row:hover { background: var(--surface-hover); }

.rules-key {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.1px;
}

.rules-val {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ips-stats-strip-5 {
  grid-template-columns: repeat(5, 1fr);
}

.char-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

/* ── SEAMLESS BLENDED GRADIENT MINIMALIST FOOTER ── */
.ips-footer {
  background: linear-gradient(180deg, rgba(220, 234, 254, 0) 0%, rgba(186, 214, 255, 0.45) 100%);
  border-top: none;
  padding: 34px 0 24px;
  font-size: 12.5px;
  color: var(--text-muted);
  box-shadow: none;
}

[data-theme="dark"] .ips-footer {
  background: linear-gradient(180deg, rgba(11, 23, 48, 0) 0%, rgba(20, 56, 120, 0.36) 100%);
  color: var(--text-muted);
}

.ips-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ips-theme-toggle {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.ips-theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--surface-solid);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── FULL MOBILE & TABLET RESPONSIVENESS ── */
.ips-nav-links,
.ips-subnav-inner {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ips-nav-links::-webkit-scrollbar,
.ips-subnav-inner::-webkit-scrollbar {
  display: none;
}

@media (max-width: 960px) {
  .ips-layout { grid-template-columns: 1fr; }
  .ips-forum-row { grid-template-columns: 42px minmax(0, 1fr); gap: 10px 12px; }
  .ips-forum-stats, .ips-lastpost { grid-column: 2; text-align: left; }
  .ips-forum-stats { display: inline-flex; align-items: baseline; gap: 5px; }
  .ips-forum-stats strong { display: inline; font-size: 13px; }
  .ips-topic-row { grid-template-columns: 1fr; gap: 6px; }
  .ips-topic-row .ips-forum-stats { text-align: left; }
  .ips-post { grid-template-columns: 1fr; }
  .ips-post-author {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
  }
  .ips-post-author img { width: 46px; height: 46px; margin-bottom: 0; }
  .char-grid { grid-template-columns: 1fr; }
  .ips-stats-strip,
  .ips-stats-strip-5 { grid-template-columns: repeat(2, 1fr); }
  .ips-stats-strip-5 .ips-stats-strip-item:first-child {
    grid-column: 1 / -1;
    border-right: none;
  }
  .ips-stats-strip-item { border-bottom: 1px solid var(--border); }
}

@media (max-width: 720px) {
  .ips-wrap { padding: 0 13px; }

  .ips-header-inner {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .ips-brand-logo { width: 40px; height: 40px; border-radius: 10px; }
  .ips-brand-title { font-size: 17.5px; }
  .ips-brand-sub { font-size: 11px; }

  .ips-userbar {
    width: 100%;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .ips-navbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 8px;
  }

  .ips-nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-top: 6px;
  }

  .ips-nav-link {
    padding: 9px 13px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .ips-search-form {
    width: 100%;
    margin: 8px 0 2px;
  }
  .ips-search-form input {
    width: 100%;
    flex: 1;
    font-size: 15px;
  }

  .ips-page-title { font-size: 20px; }
  .ips-page-header { margin-bottom: 12px; }

  .ips-box { border-radius: 10px; margin-bottom: 14px; }
  .ips-box-title { padding: 11px 14px; font-size: 13.5px; }
  .ips-box-body { padding: 14px; }

  .ips-forum-row { padding: 13px 14px; }
  .ips-forum-row:hover { padding-left: 16px; }
  .ips-forum-icon { width: 38px; height: 38px; }
  .ips-forum-main h3 { font-size: 14px; }

  .ips-topic-row { padding: 13px 14px; }
  .ips-topic-row:hover { padding-left: 16px; }

  .ips-post-body { padding: 14px; font-size: 13.5px; }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px;
  }

  .ips-modal { padding: 12px; }
  .ips-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .char-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .char-card > div { width: 100%; text-align: left; }
  .char-skin { width: 82px; height: 118px; }
  .char-card-foot { flex-direction: column; align-items: stretch; }
  .char-card-foot .btn { width: 100%; }
  .kv-grid { grid-template-columns: 1fr; }
  .ips-page-header .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
