:root{
  --bg:#101630;
  --fg:#f4f7ff;
  --muted:#a9b3d1;
  --card:rgba(18,28,62,.82);
  --line:rgba(120,145,210,.26);
  --brand:#5865f2;
  --brand2:#4f7cff;
  --ok:#26e68a;
  --bad:#ef4444;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100%;
}

.hero-connect{
    margin:12px 0 18px;
    padding:12px 16px;
    border-radius:12px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    line-height:1.6;
}

.hero-server-name{
    font-size:1.15rem;
    font-weight:700;
    color:var(--accent,#00d4ff);
    text-shadow:0 0 10px rgba(0,212,255,.4);
}

body{
  font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;
  background:#101630;
  color:var(--fg);
}

a{color:inherit}

.wrap{
  max-width:1280px;
  margin:auto;
  padding:24px;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.nav b{font-size:22px}

.glass{
  background:linear-gradient(180deg,rgba(22,35,78,.88),rgba(13,22,52,.88));
  border:1px solid var(--line);
  box-shadow:0 20px 60px rgba(0,0,0,.28);
  border-radius:18px;
}

/* HERO */

.hero{
  min-height:340px;
  padding:24px;
  display:grid;
  grid-template-columns:1fr 620px;
  gap:24px;
  align-items:center;
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(180deg,rgba(22,35,78,.92),rgba(13,22,52,.92));
}

.hero:after{
  content:"";
  display:block;
  width:100%;
  height:100%;
  min-height:292px;
  border-radius:18px;
  background:url('/assets/header1.webp') center center/cover no-repeat;
}

.hero-content,
.hero > div{
  position:relative;
  z-index:1;
  max-width:100%;
}

.hero h1{
  font-size:42px;
  line-height:1.1;
  margin:18px 0 12px;
}

.hero-text{
  max-width:560px;
  font-size:16px;
  line-height:1.7;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.btn{
  border:0;
  border-radius:8px;
  padding:12px 16px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:white;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
}

.btn.secondary{
  background:rgba(18,28,62,.72);
  border:1px solid var(--line);
}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}

.card{
  padding:24px;
  transition:.22s ease;
}

.card:hover{
  border-color:rgba(120,145,255,.55);
  transform:translateY(-2px);
}

.stat{
  font-size:40px;
  line-height:1;
  font-weight:900;
  margin-top:6px;
}

.muted{color:var(--muted)}

.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(38,230,138,.12);
  border:1px solid rgba(38,230,138,.18);
  color:#4dffad;
}

.dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--bad);
}

.dot.on{
  background:var(--ok);
  box-shadow:0 0 18px var(--ok);
}

.split{
  display:grid;
  grid-template-columns:1.45fr 1fr;
  gap:14px;
}

.double{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.donate-hero{
  padding-top:30px;
  padding-bottom:30px;
}

.donate-hero--with-goal{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:32px;
  align-items:center;
}

.donate-kicker{
  display:inline-block;
  margin-bottom:8px;
  color:#9cff3f;
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.donate-hero h1{
  margin:0 0 14px;
}

.donate-hero > div > p{
  max-width:680px;
  margin-bottom:0;
  line-height:1.7;
}

.donate-goal{
  padding:20px;
  background:rgba(5,8,24,.48);
  border:1px solid var(--line);
  border-radius:10px;
}

.donate-goal-head,
.donate-goal-total{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
}

.donate-goal-head{
  margin-bottom:14px;
}

.donate-goal-head strong,
.donate-goal-head span{
  display:block;
}

.donate-goal-head b{
  color:#9cff3f;
  font-size:24px;
}

.donate-goal-total{
  margin-top:12px;
}

.donate-goal-total strong{
  font-size:22px;
}

.donate-goal-description{
  margin:12px 0 0 !important;
  font-size:14px;
}

.donate-notes{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.donate-note{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:18px 20px;
  border-top:1px solid var(--line);
}

.donate-note > span{
  font-size:22px;
}

.donate-note p{
  margin:5px 0 0;
  line-height:1.5;
}

.triple{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.owner{
  display:flex;
  gap:16px;
  align-items:center;
}

.avatar{
  width:44px;
  height:44px;
  border-radius:10px;
  object-fit:cover;
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:14px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:middle;
}

.table th{
  color:var(--muted);
  font-weight:700;
}

.table tr:hover{
  background:rgba(255,255,255,.035);
}

.table a,
.mini-player a{
  color:#5f82ff;
  font-weight:800;
  text-decoration:none;
}

article{
  padding:14px 0;
  border-bottom:1px solid var(--line);
}

article h3{
  margin:0 0 6px;
  color:#5f82ff;
}

.news-images{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.news-images img{
  max-width:220px;
  width:100%;
  height:90px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--line);
}

.pagination{
  margin-top:16px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
}

.pagination-dots{
  display:inline-flex;
  align-items:center;
  padding:0 6px;
  color:var(--muted);
}

.empty{
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  line-height:1.6;
}

code{
  padding:2px 6px;
  border-radius:8px;
  background:rgba(255,255,255,.1);
}

.theme{display:none}

.player-search{
  display:flex;
  gap:10px;
  margin:0 0 16px;
  flex-wrap:wrap;
}

.player-search input,
.player-search select,
select{
  min-width:180px;
  padding:12px 14px;
  border-radius:8px;
  border:1px solid var(--line);
  background:rgba(18,28,62,.72);
  color:var(--fg);
}

.player-search input{
  flex:1;
  min-width:240px;
}

.mini-player{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}

.event-item{
    margin-bottom:10px;
    line-height:1.35;
}

.admin-news-item{
  padding:12px;
  border-bottom:1px solid var(--line);
}

.admin-news-images{
  display:flex;
  gap:8px;
  margin-top:10px;
  flex-wrap:wrap;
}

.admin-news-images img{
  width:72px;
  height:72px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--line);
}

.achievements{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.achievement{
  display:flex;
  gap:12px;
  align-items:center;
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}

.achievement-icon{
  font-size:28px;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:rgba(255,255,255,.06);
}

.top-players-line{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:18px;
  line-height:1.8;
  text-align:center;
  font-size:16px;
}

.top-players-line a{
  color:#5f82ff;
  text-decoration:none;
  font-weight:700;
  white-space:nowrap;
}

.footer{
  margin-top:24px;
  border-top:1px solid var(--line);
  background:rgba(13,22,52,.55);
}

.footer-content{
  min-height:72px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
}

.footer a{
  color:#5f82ff;
  text-decoration:none;
  font-weight:800;
}

.footer a:hover{
  text-decoration:underline;
}

.main-menu{
  margin-bottom:16px;
  padding:10px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.main-menu a{
  color:var(--muted);
  text-decoration:none;
  font-weight:800;
  padding:10px 14px;
  border-radius:999px;
  transition:.2s ease;
}

.main-menu a:hover{
  color:var(--fg);
  background:rgba(255,255,255,.06);
}

.main-menu a.active{
  color:white;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
}

.level-progress{
  width:100%;
  height:14px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
  border:1px solid var(--line);
}

.level-progress div{
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
}

.chart-box{
  height:360px;
}

.chart-box.small{
  height:300px;
}

.news-content{
  line-height:1.75;
}

.news-content img{
  max-width:100%;
  border-radius:16px;
  margin:14px 0;
  display:block;
}

.news-content iframe{
  width:100%;
  aspect-ratio:16/9;
  border:0;
  border-radius:16px;
  margin:14px 0;
}

.news-content blockquote{
  margin:16px 0;
  padding:14px 18px;
  border-left:4px solid var(--brand2);
  background:rgba(255,255,255,.05);
  border-radius:12px;
}

.news-content a{
  color:#7f9cff;
  font-weight:800;
}

.news-content ul,
.news-content ol{
  padding-left:22px;
}

.like-line{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.like-count{
    font-size:22px;
    font-weight:700;
}

.home-gallery-preview{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
    margin-top:12px;
}

.home-gallery-preview img{
    width:100%;
    height:90px;
    object-fit:cover;
    border-radius:10px;
    display:block;
}

.logistics-page .hero {
  margin-bottom: 24px;
}

.logistics-hero {
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 24px;
}

.logistics-hero h1 {
    margin: 10px 0;
}

.logistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.chain-card {
    padding: 22px;
    border-radius: 24px;
}

.chain-icon {
    font-size: 34px;
    margin-bottom: 12px;
}

.chain-card h2 {
    margin: 0 0 12px;
}

.chain-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0;
}

.chain-flow span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
}

.chain-flow b {
    color: var(--brand2, #4f7cff);
}

.chain-card p {
    color: var(--muted, #a9b3d1);
    margin-bottom: 0;
}

.wiki-auto-link {
    color: #7aa7ff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(122,167,255,.6);
}

.wiki-auto-link:hover {
    border-bottom-style: solid;
}

.news-images-preview img,
.news-images img,
.current-news-image img,
.zoomable-image,
.news-view img,
.article-content img {
    cursor: zoom-in;
    transition: transform .2s ease;
}

.zoomable-image:hover,
.news-images img:hover,
.news-images-preview img:hover,
.current-news-image img:hover,
.news-view img:hover,
.article-content img:hover {
    transform: scale(1.02);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 20px 80px rgba(0,0,0,.7);
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.ok{
    border-color:rgba(80,220,120,.45);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.company-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
    gap:20px;
}

.footer-version{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:1rem;
    font-weight:500;
    color:var(--muted);
    white-space:nowrap;
}

.footer-version span{
    color:var(--muted);
}

.footer-version b{
    color:#5f82ff;
    font-weight:700;
}

@keyframes eventItemNew {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Realtime events feed */

.events-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.45;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
}

.event-item .muted {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
}

.event-item-new {
    animation: eventItemNew 0.6s ease;
    border-color: rgba(95,130,255,.45);
    background: rgba(95,130,255,.10);
}

.stats-grid .card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 150px;
    padding: 16px;
}

.stats-grid .muted {
    font-size: 0.9rem;
    line-height: 1.3;
}

.stats-grid .stat {
    font-size: 2.3rem;
    line-height: 1.1;
    margin: 8px 0;
}

.quick-links .card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.quick-links .btn {
    font-size: 18px;
    padding: 14px 24px;
}

.share-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
    gap:12px;
}

.share-btn{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border-radius:12px;
    text-decoration:none;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    transition:.2s;
    color:inherit;
    cursor:pointer;
}

.share-btn:hover{
    transform:translateY(-2px);
}

.share-btn img{
    width:24px;
    height:24px;
}

/* Header / desktop actions / mobile menu */

.nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.nav-brand{
    min-width:0;
}

.nav-brand b{
    display:block;
    white-space:nowrap;
}

.nav-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

.mobile-menu-btn{
    display:none;
    min-width:44px;
    min-height:44px;
    align-items:center;
    justify-content:center;
    font-size:22px;
    line-height:1;
    padding:10px 14px;
}

.mobile-menu{
    display:none;
    margin-bottom:16px;
    padding:14px;
}

.mobile-menu a,
.mobile-menu button{
    width:100%;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    padding:12px 14px;
    border-radius:12px;
    color:var(--muted);
    text-align:left;
    text-decoration:none;
    font-weight:800;
    transition:.2s ease;
}

.mobile-menu a:hover,
.mobile-menu button:hover{
    color:var(--fg);
    background:rgba(255,255,255,.06);
}

.mobile-menu a.active{
    color:white;
    background:linear-gradient(135deg,var(--brand),var(--brand2));
}

.mobile-menu hr{
    width:100%;
    border:0;
    border-top:1px solid rgba(255,255,255,.15);
    margin:6px 0;
}

body.menu-open{
    overflow:auto;
}

@media(max-width:900px){
  .wrap{
    padding:14px;
  }

  .grid,
  .split,
  .double,
  .triple,
  .donate-notes,
  .donate-hero--with-goal,
  .achievements{
    grid-template-columns:1fr;
  }

  .nav{
    position:relative;
    align-items:center;
    margin-bottom:12px;
  }

  .nav-brand{
    flex:1;
    min-width:0;
  }

  .nav-brand b,
  .nav b{
    font-size:19px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .nav-actions{
    display:none !important;
  }

  .main-menu{
    display:none !important;
  }

  .mobile-menu-btn{
    display:inline-flex !important;
  }

  .mobile-menu{
    display:none !important;
  }

  .mobile-menu.open{
    display:flex !important;
    flex-direction:column;
    gap:8px;
    animation:mobileMenuIn .18s ease;
  }

  .hero{
    grid-template-columns:1fr;
    min-height:auto;
    padding:18px;
  }

  .hero:after{
    min-height:220px;
    height:220px;
    order:-1;
  }

  .hero-content,
  .hero > div{
    max-width:100%;
  }

  .hero h1{
    font-size:30px;
  }

  .table{
    font-size:14px;
  }

  .chart-box,
  .chart-box.small{
    height:260px;
  }

  .footer-content{
    text-align:center;
    justify-content:center;
    padding:12px 0;
  }

  .company-grid{
    grid-template-columns:1fr;
  }

  .admin-stats-grid{
    grid-template-columns:1fr;
  }

  .player-search input,
  .player-search select,
  select{
    width:100%;
    min-width:0;
  }
}

@keyframes mobileMenuIn{
    from{
        opacity:0;
        transform:translateY(-6px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}
/* HARD FIX mobile menu click */

@media(max-width:900px){

    .nav{
        position:relative !important;
        z-index:10000 !important;
    }

    .nav-brand{
        position:relative !important;
        z-index:1 !important;
        pointer-events:none !important;
    }

    .mobile-menu-btn{
        position:relative !important;
        z-index:10001 !important;
        pointer-events:auto !important;
        touch-action:manipulation !important;
        cursor:pointer !important;
    }

    .mobile-menu{
        position:relative !important;
        z-index:9999 !important;
    }

    body:before,
    body:after,
    .wrap:before,
    .wrap:after{
        pointer-events:none !important;
    }
}

@media(max-width:900px){
    body.menu-open{
        overflow:auto !important;
    }

    .mobile-menu.open{
        max-height:none !important;
        overflow:visible !important;
    }
}

/* Approved vehicle photos only; names without photos have no thumbnail wrapper. */
.company-vehicle-with-photo { display:inline-flex; align-items:center; gap:10px; max-width:100%; }
.company-vehicle-with-photo img { width:80px; height:45px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.vehicle-photo-review-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:16px; margin:16px 0; }
.company-vehicle-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.company-vehicle-list:empty { display:none; }
