:root {
  --bg: #070b0d;
  --panel: #10171a;
  --panel2: #152024;
  --line: #28363a;
  --text: #e8e9df;
  --muted: #8f9c9d;
  --red: #9ebc47;
  --red2: #536c29;
  --green: #69d6a5;
  --amber: #c9a85f;
}

body {
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 73, 72, .12), transparent 34%),
    var(--bg);
}

.topbar {
  background: linear-gradient(180deg, rgba(4, 8, 10, .98), rgba(5, 12, 14, .72), transparent);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 4px;
  font: 700 11px var(--body);
  letter-spacing: 1px;
}

.language-switch a,
.language-switch strong {
  min-width: 30px;
  padding: 7px 8px;
  border: 1px solid rgba(150, 177, 74, .3);
  text-align: center;
}

.language-switch strong {
  color: var(--lime);
  background: rgba(150, 177, 74, .1);
}

.brand-mark {
  border-color: #718b3b;
  box-shadow: inset 0 0 20px rgba(158, 188, 71, .13), 0 0 22px rgba(68, 108, 95, .08);
}

.hero {
  background:
    linear-gradient(90deg, rgba(4, 9, 11, .94) 0%, rgba(4, 9, 11, .72) 38%, rgba(4, 9, 11, .28) 72%, rgba(4, 9, 11, .48) 100%),
    linear-gradient(0deg, rgba(5, 10, 12, .72), transparent 42%),
    url('/assets/hero-island-v4.webp') center center / cover no-repeat,
    #071012;
}

.hero-fog {
  position: absolute;
  z-index: 1;
  inset: 12% -25% -5%;
  pointer-events: none;
  opacity: .52;
  background:
    radial-gradient(ellipse at 18% 64%, rgba(184, 214, 204, .29), transparent 35%),
    radial-gradient(ellipse at 55% 48%, rgba(126, 169, 160, .24), transparent 34%),
    radial-gradient(ellipse at 88% 70%, rgba(153, 188, 180, .18), transparent 32%);
  filter: blur(24px);
  animation: island-fog 18s ease-in-out infinite alternate;
}

@keyframes island-fog {
  from { transform: translate3d(-10%, 2%, 0) scale(1.03); opacity: .35; }
  to { transform: translate3d(10%, -3%, 0) scale(1.12); opacity: .68; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fog { animation: none; }
}

.hero-glow {
  border-color: rgba(116, 151, 94, .13);
  box-shadow: 0 0 100px rgba(35, 104, 91, .08), inset 0 0 100px rgba(158, 188, 71, .035);
}

.hero-grid {
  opacity: .22;
  background-image:
    linear-gradient(rgba(139, 172, 151, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 172, 151, .035) 1px, transparent 1px);
}

.button.primary {
  background: linear-gradient(135deg, #91ad43, #455e2a);
  border-color: #9ebc47;
  color: #081006;
  box-shadow: 0 8px 28px rgba(93, 126, 51, .22);
}

.button.primary:hover {
  background: linear-gradient(135deg, #b4ce65, #5d7934);
  border-color: #c9dc7a;
}

.hero-status {
  background: rgba(8, 16, 18, .88);
  border-color: #304247;
}

.server-section {
  background: #091013;
}

.server-card {
  background: linear-gradient(135deg, #121b1e, #0c1316);
}

.server-card::after {
  border-color: rgba(158, 188, 71, .09);
}

.server-brand-name { color: #a9c653; }

.features-section {
  background:
    radial-gradient(circle at 25% 45%, rgba(47, 96, 87, .12), transparent 30%),
    #070d0f;
}

.feature-card {
  background: #0e171a;
}

.feature-card:hover {
  background: #142125;
}

.connect-section {
  background:
    linear-gradient(115deg, rgba(74, 103, 48, .22), transparent 45%),
    #10191c;
}

.connect-panel {
  background: rgba(6, 12, 14, .72);
  border-color: #314247;
}

.rules-section {
  background: #080e10;
}

.state.offline {
  color: #d78368;
  border-color: rgba(215, 131, 104, .35);
}

.cinematic-scene {
  --scene-opacity: 0;
  --scene-shift: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #071012;
}

.cinematic-scene::before,
.cinematic-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cinematic-scene::before {
  z-index: -2;
  inset: -12vh 0;
  opacity: var(--scene-opacity);
  background-image: var(--scene-image);
  background-position: center;
  background-size: cover;
  transform: translate3d(0, var(--scene-shift), 0) scale(1.075);
  will-change: transform, opacity;
}

.cinematic-scene::after {
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #071012 0%, rgba(7, 16, 18, .18) 18%, rgba(7, 16, 18, .22) 78%, #071012 100%),
    linear-gradient(90deg, rgba(4, 10, 12, .78), rgba(4, 10, 12, .28) 55%, rgba(4, 10, 12, .42));
}

.scene-prison { --scene-image: url('/assets/hero-island-base.webp'); }
.scene-builder { --scene-image: url('/assets/scene-builder.webp'); }
.scene-event { --scene-image: url('/assets/scene-event-v3.webp'); }
.scene-community { --scene-image: url('/assets/scene-community.webp'); }

.scene-prison .server-card,
.scene-builder .feature-card,
.scene-event .connect-panel,
.scene-community .rules-grid {
  backdrop-filter: blur(9px);
}

.scene-prison .server-card { background: rgba(9, 17, 20, .82); }
.scene-builder .feature-card { background: rgba(9, 18, 20, .78); }
.scene-event .connect-panel { background: rgba(5, 12, 14, .74); }

.dedicated-hardware {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(158, 188, 71, .28);
  background: linear-gradient(100deg, rgba(10, 20, 21, .92), rgba(17, 31, 31, .78));
  box-shadow: inset 3px 0 0 #91ad43, 0 14px 40px rgba(0, 0, 0, .18);
}

.hardware-icon { color: #a9c653; font-size: 29px; line-height: 1; }

.dedicated-hardware strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--text);
}

.dedicated-hardware p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }

.hardware-badge {
  padding: 7px 10px;
  border: 1px solid rgba(105, 214, 165, .34);
  color: var(--green);
  background: rgba(105, 214, 165, .07);
  font: 700 11px/1 'Inter', sans-serif;
  letter-spacing: .12em;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dedicated-hardware { grid-template-columns: auto 1fr; }
  .hardware-badge { grid-column: 2; justify-self: start; }
}
.scene-community .rules-grid { background: rgba(5, 12, 14, .66); }

.feature-status {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 8px;
  border: 1px solid rgba(158, 188, 71, .42);
  color: #b8ce74;
  background: rgba(158, 188, 71, .08);
  font: 700 9px var(--body);
  letter-spacing: 1.3px;
}

.server-card-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.server-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.server-details-link {
  position: relative;
  z-index: 2;
  color: #a9c653;
  border-left: 1px solid rgba(169, 198, 83, .28);
  padding-left: 18px;
  font: 700 10px var(--body);
  letter-spacing: 1px;
  transition: color .2s;
}

.server-details-link:hover { color: #d7eb8f; }

.server-detail-page {
  min-height: 100vh;
  background: #071013;
}

.server-detail-nav { background: rgba(5, 12, 15, .92); }
.detail-navigation { display: flex !important; }

.server-detail-main {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 145px max(28px, 8vw) 80px;
  display: flex;
  align-items: flex-start;
}

.server-detail-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 15, .98) 0%, rgba(5, 12, 15, .88) 48%, rgba(5, 12, 15, .68) 100%),
    linear-gradient(0deg, #071013 0%, transparent 32%),
    url('/assets/hero-island-v4.webp') center/cover no-repeat;
  filter: saturate(.72);
}

.server-detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000, transparent 88%);
}

.server-detail-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.detail-back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: #899396;
  font: 700 10px var(--body);
  letter-spacing: 1.4px;
}

.detail-back-link:hover { color: #d7eb8f; }

.detail-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(169, 198, 83, .2);
}

.detail-heading-row h1 {
  font-size: clamp(62px, 7vw, 105px);
  letter-spacing: -2px;
}

.detail-server-name {
  margin: 16px 0 0;
  color: #a9c653;
  font: 600 17px var(--body);
}

.detail-live-state {
  min-width: 290px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  border: 1px solid rgba(169, 198, 83, .22);
  background: rgba(7, 16, 19, .8);
  backdrop-filter: blur(12px);
}

.detail-live-state small,
.detail-connect-panel small {
  display: block;
  color: #727d80;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.detail-live-state strong {
  display: block;
  margin-top: 3px;
  color: #e9eee9;
  font: 700 15px var(--display);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.detail-pulse-starting { background: var(--amber); box-shadow: 0 0 0 6px rgba(230,167,53,.08); }
.detail-pulse-offline { background: #e66868; box-shadow: 0 0 0 6px rgba(230,104,104,.08); }

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 28px;
  border: 1px solid #283236;
  background: #283236;
}

.detail-stat-grid article {
  min-height: 180px;
  padding: 30px;
  background: rgba(8, 18, 21, .92);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.detail-stat-grid small {
  margin-bottom: auto;
  color: #758084;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.detail-stat-grid strong {
  color: #f0f2ed;
  font: 700 clamp(32px, 3vw, 48px) var(--display);
  line-height: 1;
}

.detail-stat-grid span {
  margin-top: 7px;
  color: #667174;
  font-size: 10px;
}

.detail-connect-panel {
  margin-top: 18px;
  padding: 24px 26px;
  border: 1px solid #293337;
  background: rgba(8, 18, 21, .9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.detail-connect-panel strong {
  display: block;
  color: #a9c653;
  font: 700 28px var(--display);
  letter-spacing: .5px;
}

.detail-connect-panel span { color: #697477; font-size: 10px; }

.detail-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: #687376;
  font-size: 10px;
}

.detail-operations-grid,
.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  margin-top: 18px;
}

.detail-info-panel,
.detail-list-panel {
  padding: 26px;
  border: 1px solid #293337;
  background: rgba(8, 18, 21, .9);
  backdrop-filter: blur(12px);
}

.detail-list-panel { align-self: start; }

.detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(169, 198, 83, .16);
}

.detail-section-heading small,
.detail-content-heading > p:last-child {
  color: #727d80;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.detail-section-heading h2,
.detail-section-heading h3 {
  margin: 4px 0 0;
  color: #edf0e9;
  font: 700 25px/1 var(--display);
  letter-spacing: .5px;
}

.detail-count {
  min-width: 42px;
  padding: 7px 9px;
  border: 1px solid rgba(169, 198, 83, .3);
  color: #b8ce74;
  background: rgba(158, 188, 71, .08);
  font: 700 11px var(--body);
  text-align: center;
}

.detail-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 20px;
}

.detail-service-chip {
  padding: 9px 11px;
  border: 1px solid #2c383b;
  color: #8c999b;
  background: #0b1417;
  font: 600 10px var(--body);
}

.detail-service-chip.active {
  border-color: rgba(105, 214, 165, .3);
  color: var(--green);
  background: rgba(105, 214, 165, .06);
}

.detail-service-chip.inactive { opacity: .58; }

.detail-restart-panel {
  background: linear-gradient(135deg, rgba(19, 31, 29, .94), rgba(8, 18, 21, .9));
}

.detail-restart-time {
  display: block;
  margin-top: 22px;
  color: #a9c653;
  font: 800 55px/1 var(--display);
}

.detail-restart-panel p {
  margin: 7px 0 18px;
  color: #e2e7df;
  font: 600 13px var(--body);
}

.detail-restart-panel > span { color: #697477; font-size: 10px; line-height: 1.6; }

.detail-map-section {
  margin-top: 70px;
  padding-top: 55px;
  border-top: 1px solid rgba(169, 198, 83, .2);
}

.detail-map-panel {
  margin-top: 26px;
  border: 1px solid #293337;
  background: rgba(8, 18, 21, .9);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.detail-map-viewport {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 78vh;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05080a;
  position: relative;
}

.detail-map-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 1440px;
  transform-origin: 0 0;
}

.detail-map-stage img {
  width: 1440px;
  height: 1440px;
  display: block;
  user-select: none;
  pointer-events: none;
}

.detail-map-stage svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 1440px;
  pointer-events: none;
}

.detail-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.detail-map-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font: 600 11px var(--body);
  color: #a7b0b1;
  letter-spacing: .3px;
}

.map-legend-item { display: inline-flex; align-items: center; gap: 8px; }

.map-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.map-dot-player { background: #69d6a5; }
.map-dot-cargo { background: #ffd23f; }
.map-dot-zone { background: #ff4d6d; border-radius: 2px; }

.map-player-dot { fill: #69d6a5; stroke: #05100a; stroke-width: 1.5; }
.map-cargo-dot { fill: #ffd23f; stroke: #241c02; stroke-width: 1.5; }

@media (max-width: 900px) {
  .detail-map-viewport { max-height: 92vw; }
  .detail-map-panel { padding: 14px; }
}

.detail-live-content {
  margin-top: 70px;
  padding-top: 55px;
  border-top: 1px solid rgba(169, 198, 83, .2);
}

.detail-content-heading { max-width: 720px; }

.detail-content-heading h2 {
  margin: 8px 0 10px;
  color: #f0f2ed;
  font: 800 clamp(46px, 6vw, 76px)/.92 var(--display);
  letter-spacing: -1px;
}

.detail-content-heading > p:last-child {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .2px;
}

.detail-content-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
}

.detail-card-list {
  display: grid;
  gap: 1px;
  margin-top: 18px;
  background: #263134;
}

#detail-events { grid-template-columns: 1fr 1fr; }

#detail-events .detail-list-card {
  min-height: 82px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

#detail-events .detail-list-card b { text-align: left; }

.detail-list-card {
  min-height: 72px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #0b1518;
}

.detail-list-card strong,
.detail-list-card span { display: block; }

.detail-list-card strong {
  color: #e7ebe4;
  font: 700 15px var(--display);
  letter-spacing: .25px;
}

.detail-list-card span {
  margin-top: 4px;
  color: #707c7e;
  font-size: 9px;
}

.detail-list-card b {
  flex: 0 0 auto;
  color: #a9c653;
  font: 700 9px var(--body);
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: right;
}

.detail-empty {
  margin: 0;
  padding: 18px 0;
  color: #6f7a7d;
  font-size: 10px;
}

.detail-update-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #a9c653;
}

@media(max-width:900px) {
  .topbar nav .language-switch { padding: 10px 24px; }
  .topbar nav .language-switch a { padding: 7px 8px; }
  .server-grid { grid-template-columns: 1fr; }
  .detail-heading-row { align-items: stretch; flex-direction: column; }
  .detail-live-state { min-width: 0; }
  .detail-stat-grid { grid-template-columns: 1fr 1fr; }
  .detail-operations-grid,
  .detail-content-grid { grid-template-columns: 1fr; }
  .server-card .server-address { align-items: flex-start; gap: 15px; flex-direction: column; }
}

@media(max-width:600px) {
  .server-detail-main { padding: 125px 20px 55px; }
  .detail-navigation .nav-discord { display: none; }
  .detail-heading-row h1 { font-size: 58px; }
  .detail-stat-grid { grid-template-columns: 1fr; }
  .detail-stat-grid article { min-height: 135px; }
  .detail-connect-panel { align-items: stretch; flex-direction: column; }
  .detail-footer-row { flex-direction: column; gap: 0; }
  .detail-info-panel,
  .detail-list-panel { padding: 20px; }
  .detail-list-card { align-items: flex-start; flex-direction: column; gap: 9px; }
  .detail-list-card b { text-align: left; }
  #detail-events { grid-template-columns: 1fr; }
  .server-card-actions { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-scene::before {
    transform: none;
    opacity: .62;
    will-change: auto;
  }
}
