/* ===================================================================================== */
/* Root Variables                                                                        */
/* ===================================================================================== */

:root {
  --brand-bg: #43382d;
  --brand-orange: #ff9a31;
  --brand-orange-hover: #ffb84d;
  --text-light: #fff;
  --text-dark: #292929;
  --border-dark: #000;
}

/* ===================================================================================== */
/* Base Layout & Resets                                                                  */
/* ===================================================================================== */

* { box-sizing: border-box; }

html, body { overflow-x: auto; }

body {
  margin: 0;
  height: 100%;
  width: 100%;
  min-width: 1240px;
  font-family: "Arial", sans-serif;
  background-color: var(--brand-bg);

  /* Optional background image:
  background: url("img/paradox_park.jpg") top no-repeat black fixed;
  background-size: cover;
  */
}

#wrap {
  margin: 0 auto;
  padding: 0;
  min-width: 1240px;
}

#flex { display: flex; }

/* ===================================================================================== */
/* Header                                                                                */
/* ===================================================================================== */

#header {
  width: 100%;
  min-width: 1200px;
  height: 186px; /* default larger */
  background: 
    url("/img/layout/header_bg.png") repeat-x center,
    url("/img/layout/neb1.png") no-repeat center/cover,
    var(--brand-bg);
  background-size: auto, cover;
  position: relative;
  overflow: hidden;
  clear: both;
}

/* Left side */
#header-left {
  float: left;
  width: auto;
  padding: 8px 10px;
  color: var(--text-light);
  font-size: 9px;
}

.headerlinks {
  margin-bottom: 5px;
}
.headerlinks a {
  font-size: 9px;
  color: var(--brand-orange);
  text-decoration: none;
}
.headerlinks a:hover {
  text-decoration: underline;
}

/* Logo */
#header-left img {
  max-height: 140px;
  width: auto;
  height: auto;
  margin-left: 30px;
  margin-top: 24px;
}

/* Right side */
#header-right {
  float: right;
}
#header-right img {
  max-height: 186px;
  height: auto;
  width: auto;
}

header {
  position: relative;
  overflow: hidden; /* Contain snowflakes */
}

/* Snowflake effect */
.snowflake {
  position: absolute;
  top: -50px;
  font-size: 1em;
  color: var(--text-light);
  pointer-events: none;
  animation: fall linear;
}
@keyframes fall {
  0%   { transform: translate(0, 0) rotate(0); }
  50%  { transform: translate(20px, 50vh) rotate(180deg); }
  100% { transform: translate(-20px, 100vh) rotate(360deg); }
}

/* ===================================================================================== */
/* Sidebars                                                                              */
/* ===================================================================================== */

/* Left Sidebar */
#sidebar-left {
  float: left;
  width: 190px;
  height: 100%;
  margin-left: -208px;
  padding: 8px 12px;
  background: #000;
  border-radius: 0 15px 15px 0;
}
#sidebar-left p {
  margin: 4px 0 4px 10px;
  line-height: 1.3;
}
#sidebar-left a {
  font-size: 1em;
  color: var(--brand-orange);
  text-decoration: none;
}
#sidebar-left a:hover {
  color: var(--brand-orange-hover);
  text-decoration: underline;
}

/* Right Sidebar */
#sidebar-right {
  flex: 0 0 167px;
  width: 167px;
  margin-left: 20px;
  padding-top: 60px;
  position: relative;
  z-index: 0;
  align-self: stretch;
  overflow: hidden;
  background: transparent;
}
#sidebar-right::before {
  content: "";
  position: absolute;
  top: 62px;
  left: 0; right: 0; bottom: 0;
  background: #000;
  border-radius: 15px 0 15px 0;
  z-index: -1;
}
#sidebar-right h3,
#sidebar-right h4 {
  width: 100%;
  margin: 0;
  padding: 10px 0;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text-light);
  text-align: center;
  border-left: 0 solid var(--brand-orange);
}
#sidebar-right h4 { background-color: var(--brand-bg); }
#sidebar-right h4 a { color: var(--text-light); }

/* ===================================================================================== */
/* Search                                                                                */
/* ===================================================================================== */

.search-bar {
  margin: 20px auto;
  width: 100%;
  text-align: center;
}
.search-bar form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.search-bar input[type="text"],
.search-bar button {
  width: 94%;
  max-width: 300px;
  padding: 6px;
  margin-bottom: 10px;
  border-radius: 5px;
}
.search-bar input[type="text"] { border: 1px solid #ccc; }
.search-bar button {
  border: none;
  cursor: pointer;
  color: var(--text-light);
  background-color: var(--brand-bg);
}
.search-bar button:hover { background-color: #463762; }

/* ===================================================================================== */
/* Main Content                                                                          */
/* ===================================================================================== */

#container {
  margin: 0 18px 0 205px;
  min-height: 300px;
  display: flex;
  align-items: stretch;
  background: var(--text-dark);
  border: 2px solid var(--border-dark);
  border-radius: 15px;
  z-index: 3;
}
#content {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 40px;
  position: relative;
  font-family: "Verdana", sans-serif;
  color: var(--text-light);
}

/* ===================================================================================== */
/* Footer                                                                                */
/* ===================================================================================== */

#footer {
  width: 100%;
  margin: 0 auto;
}
#footer-left,
#footer-right {
  margin: 0;
  padding: 0 10px;
  font-size: 0.7rem;
  color: var(--text-light);
}
#footer-left  { float: left;  text-align: left; }
#footer-right { float: right; text-align: right; }

.footerlinks p {
  margin: 0;
  padding: 3px;
  font-size: 0.7rem;

  color: var(--text-light);
}

.footerlinks { margin-bottom: 5px; }
.footerlinks a {
  color: var(--brand-orange);
  text-decoration: none;
}
.footerlinks a:hover { text-decoration: underline; }

/* ===================================================================================== */
/* Content Styling (Images, Buttons, Callouts, Pre/Code)                                 */
/* ===================================================================================== */

.image-container,
.image-container-maps { margin: 20px 0; }

.image-container-maps img {
  width: 100%;
  max-width: 1024px;
}

.download-button { margin: 20px 0 0 20px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  color: var(--text-light);
  background: var(--brand-orange);
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.btn:hover { background: #E88C2F; }

/* Update banner */
#update {
  display: flex;
  align-items: center;
  justify-content: left;
  height: 30px;
  margin-bottom: 20px;
  background: #000;
  border-radius: 20px;
}
#update img { margin-right: 20px; }
#update h1 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  font-family: Arial, sans-serif;
  color: var(--text-light);
}

/* Pre / Code */
pre {
  margin: 16px 0;
  padding: 10px 14px;
  font-size: 13px;
  font-family: "Courier New", monospace;
  background: #111;
  color: var(--brand-orange);
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}
code {
  padding: 2px 6px;
  font-size: 12px;
  font-family: "Courier New", monospace;
  background: #222;
  color: #ffd280;
  border-radius: 4px;
}

/* Callouts */
.callout {
  margin: 15px 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-light);
  background: #1a1a1a;
  border-left: 4px solid var(--brand-orange);
  border-radius: 4px;
}
.callout strong { color: var(--brand-orange); }

.callout.funfact {
  margin: 20px 0;
  padding: 16px 20px;
  background: #222;
  border-left: 4px solid var(--brand-orange);
  border-radius: 6px;
}
.callout.funfact h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--brand-orange);
  display: flex;
  align-items: center;
  gap: 6px;
}
.callout.funfact p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-light);
}

/* Example pairs */
.example-pair {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.example-pair .gallery {
  flex: 1;
  padding: 6px;
  background: #000;
  border: 1px solid #444;
  border-radius: 6px;
  text-align: center;
}
.example-pair img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Spacers */
hr {
  border: 0;
  height: 1px;
  margin: 30px 0;
  background: linear-gradient(to right, transparent, #555, transparent);
}
#adsense, #spacer, #spacer-small, .imgspacer {
  margin: auto;
  text-align: center;
}
#adsense      { padding: 40px; }
#spacer       { padding: 20px; }
#spacer-small { padding: 10px; }
.imgspacer    { padding: 20px 0; }

/* ===================================================================================== */
/* Map Review Monday                                                                     */
/* ===================================================================================== */

.section-title {
  margin-top: 40px;
  margin-bottom: 10px;
  padding-left: 6px;
  border-left: 3px solid var(--brand-orange);
  color: var(--text-light);
}
.section-title.highlight {
  margin: 15px 0;
  padding: 8px 12px;
  line-height: 1.5;
  color: var(--text-light);
  background: #1a1a1a;
  border-left: 4px solid var(--brand-orange);
  border-radius: 4px;
}

/* Review header */
.review-header {
  margin: 20px 0;
  padding: 12px 16px;
  background: #111;
  border-left: 5px solid #ff6600;
  border-radius: 6px;
}
.review-header .map-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: #ffcc66;
}
.review-header .map-date {
  font-size: 0.9rem;
  color: #aaa;
}

.recommend    { display: block; color: #77dd77; margin-top: 4px; }
.notrecommend { display: block; color: #df492e; margin-top: 4px; }

/* Map Facts */
.map-facts {
  margin: 20px 0;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
}
.map-facts h4 {
  margin-bottom: 8px;
  color: #ffcc66;
}
.map-facts ul {
  margin: 0;
  padding-left: 18px;
  color: #ccc;
}

/* Score Section */
.score-section {
  margin: 20px 0;
  padding: 8px 12px;
  background: #222;
  border-left: 5px solid var(--brand-orange);
  border-radius: 4px;
}
.score-section h3 {
  margin: 0;
  font-size: 16px;
  color: #ffcc66;
  border: none;
  padding-left: 0;
}
.score-section .recommend {
  margin-top: 6px;
  font-size: 13px;
  color: #77dd77;
}

/* Video Section */
.video-section h3 {
  margin-bottom: 10px;
  padding: 8px 12px;
  color: #ffcc66;
  background: #222;
  border-left: 5px solid #ff6600;
  border-radius: 4px;
}
.video-wrapper {
  display: flex;
  justify-content: center;
}

/* ===================================================================================== */
/* Responsive Image Galleries                                                            */
/* ===================================================================================== */

.gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Maps */
.gallery-item-maps {
  width: 320px;
  margin-bottom: 10px;
  text-align: center;
  background: #000;
  border: 1px solid #777;
  transition: border-color 0.3s;
}
.gallery-item-maps img {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
}
.gallery-item-maps:hover { border-color: #ccc; }
@media (max-width: 1450px) {
  .gallery-item-maps { width: 260px; }
}

/* Models */
.gallery-item-models {
  width: 164px;
  margin-bottom: 10px;
  text-align: center;
  background: #000;
  border: 1px solid #777;
  transition: border-color 0.3s;
}
.gallery-item-models a {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #111;
}
.gallery-item-models img {
  width: 164px;
  height: 200px;
  object-fit: cover;
  object-position: top center;
}
.gallery-item-models .desc {
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Weapons */
.gallery-item-weapons {
  width: 380px;
  margin-bottom: 10px;
  text-align: left;
  background: #000;
  border: 1px solid #777;
  transition: border-color 0.3s;
}
.gallery-item-weapons img {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
}
.gallery-item-weapons:hover { border-color: #ccc; }

/* Captions */
.desc {
  margin-top: 5px;
  font-size: 14px;
  color: var(--text-light);
}

/* ===================================================================================== */
/* Pagination                                                                            */
/* ===================================================================================== */

.pagination {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.pagination a {
  padding: 2px 6px;
  margin-right: 2px;
  font-size: 9px;
  color: var(--brand-orange);
  background: #2b2b2b;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}
.pagination a:hover,
.pagination a.active {
  color: var(--text-light);
  background: var(--brand-orange);
}
.pagination a.active { font-weight: bold; }

/* ===================================================================================== */
/* LGSL (Server List)                                                                    */
/* ===================================================================================== */

.sidebarserver { font-size: 10px; }

div.gallery {
  margin-bottom: 14px;
  background: #000;
  border: 1px solid #ccc;
}
div.gallery:hover {
  background: #111;
  border-color: #777;
}
div.gallery img { width: 100%; height: auto; }
div.desc {
  padding: 8px;
  font-size: 10px;
  text-align: center;
}

.responsive {
  float: left;
  padding: 0 6px;
  max-width: 20%;
}
@media (max-width: 700px) {
  .responsive { width: 400px; margin: 6px 0; }
}
@media (max-width: 500px) {
  .responsive { width: 100%; }
}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Game Icons */
img.game_icon { width: 28px; }
.status_icon_onl,
.status_icon_nrs { display: none; }
.connectlink_cell,
.map_cell,
.players_cell { text-align: center; }

/* ===================================================================================== */
/* Typography                                                                            */
/* ===================================================================================== */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: bold;
  color: var(--text-light);
}
h1 { font-size: 1.2rem; }
h2 { font-size: 1rem; }
h3 { font-size: 18px; }
h4 { font-size: 1rem; line-height: 2.6; margin-left: 5px; }

h1 a {
  color: var(--text-light) !important;
  text-decoration: none;
}
h1 a:hover { text-decoration: underline; }

h2 {
  margin: 28px 0 16px;
  padding: 6px 10px;
  font-weight: bold;
  color: var(--text-light);
  background: #111;
  border-left: 4px solid var(--brand-orange);
}
h3 {
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-light);
  border: none;
  padding: 0;
}

a { color: var(--brand-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}
ul, ol {
  margin: 12px 0;
  padding-left: 24px;
}
ul li:last-child { margin-bottom: 1rem; }
li { margin-bottom: 6px; }
ol { margin-top: 1rem; }

p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}
small { font-size: 11px; color: var(--brand-orange); }

table {
  margin: 20px 0;
  text-align: center;
  font: 12px "Arial", sans-serif;
  color: var(--text-light);
}
th { text-align: center; }

/* ===================================================================================== */
/* Lightbox (Downloads)                                                                  */
/* ===================================================================================== */

.mx-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.75);
  z-index: 9999;
}
.mx-modal.mx-open { display: flex; }

.mx-modal__dialog {
  max-width: min(1000px, 92vw);
  max-height: 90vh;
  background: #111;
  color: var(--text-light);
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.mx-modal__img { display: block; max-width: 100%; height: auto; }
.mx-modal__meta { padding: 16px; }
.mx-modal__title { margin: 0 0 12px; font-size: 1.25rem; }
.mx-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.mx-modal__close {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 28px;
  line-height: 1;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
}

.mx-btn {
  display: inline-block;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: var(--brand-orange);
  color: var(--text-light);
  text-decoration: none;
}
.mx-btn:hover { filter: brightness(1.1); }
.mx-btn--ghost { background: transparent; border: 1px solid var(--text-light); }

@media (prefers-reduced-motion:no-preference){
  .mx-modal__dialog { transition: transform .18s ease, opacity .18s ease; }
  .mx-open .mx-modal__dialog { transform: translateY(0); opacity: 1; }
}

/* ===================================================================================== */
/* Plugins Table                                                                         */
/* ===================================================================================== */
.plugin-table {
  width: 90%;
  margin: 20px auto;
  border-collapse: collapse;
  font-size: 14px;
}

.plugin-table th,
.plugin-table td {
  padding: 10px;
  border: 1px solid #444;
  text-align: left;
}

.plugin-table th {
  background-color: var(--brand-orange);
  color: #000;
}

.plugin-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.plugin-table tr:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* ===================================================================================== */
/* Xen Bar                                                                               */
/* ===================================================================================== */

#xen-bar {
  position: absolute;
  top: 62px;
  left: 0;
  right: 0;
  height: 62px;
  background: url('/img/xen-bar.png') repeat-x center;
  overflow: hidden;
  z-index: 1;
}
.firefly {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0.8;
  border-radius: 50%;
  background: radial-gradient(circle, #8affc1 0%, transparent 70%);
  animation: orbit 6s infinite linear, flicker 2s infinite ease-in-out alternate;	
}
.firefly:nth-child(1) { top: 15px; left: 80px;  animation-duration: 5s; }
.firefly:nth-child(2) { top: 25px; left: 50px;  animation-duration: 7s; }
.firefly:nth-child(3) { top: 35px; left: 90px;  animation-duration: 9s; }
.firefly:nth-child(4) { top: 10px; left: 100px; animation-duration: 6s; }
.firefly:nth-child(5) { top: 10px; left: 120px; animation-duration: 6s; }

@keyframes orbit {
  0%   { transform: rotate(0deg) translateX(15px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(15px) rotate(-360deg); }
}


/* ===================================================================================== */
/* Responsive Adjustments                                                                */
/* ===================================================================================== */

/* At 1366px (HD ready) and below */
@media (max-width: 1366px) {
  #sidebar-left {
    width: 150px;         /* reduced from 190px */
    margin-left: -168px;  /* width + 8px padding */
  }

  #container {
    margin: 0 18px 0 165px;  /* sidebar width (150) + 5px buffer */
  }

  #sidebar-left a { font-size: 0.7rem; }
  #sidebar-left p { line-height: 1.0; }
  p, ul, li       { font-size: 0.8rem; }
  .review-header .map-title { font-size: 1.1rem !important; }
  h1 { font-size: 1.0rem; }

  }

/* At 1920px (Full HD) and below */
@media (max-width: 1920px) {
  #sidebar-left {
    width: 165px;         /* reduced from 190px */
    margin-left: -183px;  /* width + 8px padding */
  }

  #container {
    margin: 0 18px 0 180px;  /* sidebar width (175) + 5px buffer */
  }

  #sidebar-left a { font-size: 0.8rem; }
  #sidebar-left p { line-height: 1.1; }
  p, ul, li       { font-size: 0.85rem; }
  .review-header .map-title { font-size: 1.2rem !important; }
  h1 { font-size: 1.1rem; }
}
