/* 只改前端版式，对齐 game4freak.io 的深色社区外观。功能与文案不动。 */
:root,
[data-bs-theme=light],
[data-bs-theme=dark] {
  --ri-body-bg: #000;
  --ri-body-bg-rgb: 0, 0, 0;
  --ri-body-color: #e8eef5;
  --ri-body-color-rgb: 232, 238, 245;
  --ri-emphasis-color: #fff;
  --ri-emphasis-color-rgb: 255, 255, 255;
  --ri-secondary-color: #93a3b5;
  --ri-secondary-bg: #0e1a26;
  --ri-secondary-bg-rgb: 14, 26, 38;
  --ri-tertiary-bg: #101820;
  --ri-tertiary-bg-rgb: 16, 24, 32;
  --ri-link-color: #49a6e4;
  --ri-link-hover-color: #9fd0f5;
  --ri-primary: #1d6fbf;
  --ri-primary-rgb: 29, 111, 191;
  --ri-primary-text: #9fd0f5;
  --ri-info: #49a6e4;
  --ri-warning: #f0a31a;
  --ri-light: #121a24;
  --ri-light-rgb: 18, 26, 36;
  --ri-dark: #e8eef5;
  --ri-border-color: #1d6488;
  --ri-border-color-translucent: rgba(29, 100, 136, 0.7);
  --ri-highlight-bg: #14324e;
  color-scheme: dark;
}

html,
body {
  background: #000 !important;
  color: #e8eef5 !important;
}

a { color: #49a6e4; }
a:hover { color: #9fd0f5; }

.site-header {
  background: #071422 !important;
  color: #e8eef5 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 8px 0 10px !important;
}
.site-header.navbar-now {
  transform: translateY(-100%) !important;
}
.site-header.navbar-sticky {
  background: #071422 !important;
  box-shadow: 0 1px 0 #10263a !important;
}
.header-gap { height: 118px !important; }
.header-transparent .header-gap { height: 118px !important; }
.header-transparent .site-header,
.header-transparent .site-header:not(.navbar-sticky) {
  background: #071422 !important;
}

.g4f-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}
.g4f-slogan {
  margin: 0;
  color: #5eb4ea;
  font-size: 16px;
}
.logo-wrapper .logo,
.navbar .logo {
  max-height: 52px;
  width: auto;
}
.logo-wrapper .logo.text {
  color: #7dff3a;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 1px;
}

.site-header .navbar {
  height: auto !important;
  min-height: 40px;
  align-items: center;
}
.site-header .nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.site-header .nav-list > .menu-item > a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px !important;
  border-radius: 3px;
  background: #101c2c !important;
  color: #d5deea !important;
  line-height: 1;
}
.site-header .nav-list > .menu-item > a:hover,
.site-header .nav-list > .menu-item.current-menu-item > a,
.site-header .nav-list > .menu-item.current-menu-ancestor > a {
  background: #173049 !important;
  color: #fff !important;
}
.site-header .actions .action-btn,
.site-header .avatar-warp {
  background: #101c2c;
  border-radius: 3px;
  color: #d5deea !important;
  min-height: 32px;
}
.site-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer {
  background: #0c2744 !important;
  color: #c5d4e4 !important;
  border-top: 0;
}
.site-footer a,
.site-footer .footer-links .h6,
.site-footer .footer-links h6 {
  color: #d5e6f5 !important;
}
.site-footer a:hover { color: #9fd0f5 !important; }

main,
.home-widget,
.archive-filter,
.sidebar .widget,
.widget,
.card,
.comments-area,
.comment-body,
.ri-popup-body,
.modal-content,
.user-center,
.uc-content,
.entry-content,
.post-content {
  color: #e8eef5;
}

.post-item,
.card,
.widget,
.home-widget .widget-title,
.sidebar .widget,
.comment-body,
.archive-filter {
  background: #0e1926 !important;
  color: #e8eef5 !important;
  border: 1px solid #1d6488 !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}
.post-item:hover {
  transform: none !important;
  background: #132433 !important;
  box-shadow: none !important;
}
.post-item::before,
.post-item:hover::before { display: none !important; }

.entry-title,
.entry-title a {
  color: #49a6e4 !important;
  background: none !important;
  -webkit-text-fill-color: #49a6e4 !important;
}
.entry-title a:hover { color: #9fd0f5 !important; -webkit-text-fill-color: #9fd0f5 !important; }
.entry-desc,
.entry-meta,
.post-meta,
.text-muted,
.small {
  color: #93a3b5 !important;
}
.entry-wrapper { background: transparent !important; }

.site-sale-banner {
  width: min(1100px, calc(100% - 28px));
  margin: 16px auto 8px;
  background: #f4ead8;
  color: #e36b14;
  text-align: center;
  border-radius: 4px;
  padding: 12px 16px 10px;
}
.site-sale-title { font-size: 16px; font-weight: 700; }
.site-sale-time { margin-top: 3px; color: #c9843a; font-size: 13px; }
.meta-price s,
.prices-default s {
  margin-left: 6px;
  color: #8b98a8;
  font-weight: 400;
}

.entry-media.ratio > .thumb-original {
  position: absolute !important;
  top: auto !important;
  left: auto !important;
  right: 4px !important;
  bottom: 2px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  z-index: 5;
  color: #f5c518 !important;
  -webkit-text-fill-color: #f5c518 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.btn,
button.btn {
  border-radius: 4px !important;
  box-shadow: none !important;
}
.btn-primary,
.btn-info {
  background: #1d6fbf !important;
  border-color: #1d6fbf !important;
  color: #fff !important;
}
.btn-warning,
.bg-warning {
  background: linear-gradient(#d09a52, #8d5a22) !important;
  border-color: #6e4516 !important;
  color: #fff !important;
}
.btn-outline-primary,
.btn-outline-light,
.btn-light {
  background: #121a24 !important;
  border-color: #3a4e62 !important;
  color: #e8eef5 !important;
}

.form-control,
.form-select,
input[type="search"],
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
.search-form input {
  background: #0b121a !important;
  border: 1px solid #2a3d52 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.form-control:focus,
.search-form input:focus {
  border-color: #1d6fbf !important;
  box-shadow: none !important;
}

.pagination .page-numbers,
.page-numbers {
  background: #16324a !important;
  color: #fff !important;
  border: 0 !important;
}
.pagination .page-numbers.current,
.page-numbers.current {
  background: #1d6fbf !important;
}

.badge {
  border-radius: 3px;
}
.bg-white,
.bg-light {
  background: #101820 !important;
  color: #e8eef5 !important;
}
.text-dark { color: #e8eef5 !important; }

.navbar-search,
.search-input-group,
.home-search-box .search-form {
  background: transparent;
}

.post-shot-gallery {
  position: relative;
  margin: 0 0 16px;
  padding: 0 42px;
}
.post-shot-gallery .shot-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.post-shot-gallery .shot-track::-webkit-scrollbar { display: none; }
.post-shot-gallery .shot-track a {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
.post-shot-gallery img {
  width: 240px;
  height: 135px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #111;
}
.post-shot-gallery .shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #1b1b1b;
  color: #fff;
  font-size: 22px;
  line-height: 32px;
  cursor: pointer;
}
.post-shot-gallery .shot-prev { left: 4px; }
.post-shot-gallery .shot-next { right: 4px; }

@media (max-width: 991.98px) {
  .g4f-brand { align-items: flex-start; flex-direction: column; gap: 4px; }
  .g4f-slogan { font-size: 14px; }
  .header-gap,
  .header-transparent .header-gap { height: 132px !important; }
}
