/* ================================
   5LEAKS GLOBAL FOUNDATION
================================== */
:root{
  --bg:#05070b;
  --text:#f2f5f9;
  --muted:#9ca6b5;

  --card:#12161d;
  --card-2:#0f1319;
  --panel:#11151b;

  --accent:#ff7a00;
  --accent-light:#ff9a2f;
  --accent-dark:#cc5d00;

  --line:rgba(255,255,255,.08);
  --line-soft:rgba(255,255,255,.05);

  --radius:16px;
  --radius-lg:20px;
  --shadow:0 12px 30px rgba(0,0,0,.35);
  --shadow-lg:0 24px 70px rgba(0,0,0,.34);
}

/* ================================
   BASE / RESET
================================== */
*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
  color:var(--text);
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

/* IMPORTANT:
   No hard body background here.
   Let each redesigned page control its own background cleanly.
*/
body{
  background:transparent;
  overflow-x:hidden;
}

a{
  color:inherit;
  text-decoration:none;
}

button{
  cursor:pointer;
  border:0;
  font:inherit;
}

img,
video{
  max-width:100%;
  display:block;
}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:24px;
}

/* ================================
   LEGACY NAV SUPPORT
   (safe fallback for any pages still using old nav classes)
================================== */
.nav{
  position:relative;
  z-index:40;
}

.nav-inner{
  display:flex;
  align-items:center;
  gap:16px;
  max-width:1200px;
  margin:0 auto;
  padding:14px 24px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}

.logo-img{
  height:32px;
  width:auto;
  object-fit:contain;
  border-radius:8px;
}

.nav-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
}

/* ================================
   SHARED SEARCH
================================== */
.search{
  position:relative;
  flex:1;
  max-width:420px;
}

.search form{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
}

.search input,
.search-input{
  width:100%;
  padding:12px 44px 12px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:#11161d;
  color:var(--text);
  outline:none;
  transition:border-color .15s, box-shadow .15s, background .15s;
}

.search input::placeholder,
.search-input::placeholder{
  color:#7f8898;
}

.search input:focus,
.search-input:focus{
  border-color:rgba(255,122,0,.45);
  box-shadow:0 0 0 3px rgba(255,122,0,.14);
  background:#131922;
}

.search svg{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  opacity:.75;
  pointer-events:none;
}

/* ================================
   DROPDOWN FALLBACKS
================================== */
.dropdown{
  position:relative;
  display:inline-block;
}

.dd-btn{
  background:transparent;
  border:none;
  cursor:pointer;
  padding:8px 12px;
  font-size:14px;
}

.dd-list{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:220px;
  padding:6px;
  background:linear-gradient(180deg, #171b22 0%, #0f1319 100%);
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  opacity:0;
  transform:translateY(-8px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:999;
}

.dropdown:hover .dd-list,
.dropdown.open .dd-list,
.dd-list.open{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.dd-list a{
  display:block;
  padding:10px 12px;
  color:#dce2eb;
  text-decoration:none;
  border-radius:8px;
  font-size:14px;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

.dd-list a:hover,
.dd-list a:focus{
  background:rgba(255,122,0,.12);
  color:#fff;
  outline:none;
  transform:translateX(2px);
}

/* ================================
   BUTTONS
================================== */
.btn{
  --shine:rgba(255,255,255,.18);
  min-height:42px;
  padding:10px 16px;
  border-radius:14px;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-light)),
    radial-gradient(120px 40px at 10% 0%, var(--shine), transparent);
  color:#fff;
  font-weight:800;
  letter-spacing:.2px;
  box-shadow:0 6px 18px rgba(255,122,0,.28);
  transition:transform .15s, box-shadow .15s, filter .15s, background .15s;
  border:1px solid rgba(255,122,0,.38);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(255,122,0,.34);
}

.btn:active{
  transform:translateY(0);
  filter:saturate(112%);
}

.btn.ghost{
  background:rgba(255,255,255,.04);
  color:var(--text);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:none;
  border-radius:12px;
}

.btn.ghost:hover{
  background:rgba(255,255,255,.06);
}

.btn.small{
  min-height:36px;
  padding:6px 10px;
  border-radius:10px;
  font-weight:700;
}

.btn.discord{
  background:linear-gradient(135deg, #5865F2, #7986ff);
  box-shadow:0 6px 18px rgba(88,101,242,.28);
  border:1px solid rgba(88,101,242,.45);
}

.btn.discord:hover{
  box-shadow:0 12px 28px rgba(88,101,242,.36);
}

/* ================================
   GENERIC HERO / SECTION HEADERS
================================== */
.hero{
  padding:40px 24px 10px;
}

.hero h1{
  font-size:40px;
  margin:0 0 8px;
  color:#fff;
}

.hero p{
  color:var(--muted);
  margin:0;
}

.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin:18px 0 10px;
  width:100%;
}

.section-head h2,
.section-title{
  margin:0;
  font-size:22px;
  font-weight:900;
  color:#fff;
}

.section-title{
  text-transform:capitalize;
}

.see-all{
  color:#fff;
  font-weight:700;
  font-size:14px;
  padding:6px 10px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow:0 4px 12px rgba(255,122,0,.20);
  border:1px solid rgba(255,122,0,.35);
}

/* ================================
   GENERIC CARDS / GRID
================================== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:14px;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.card:hover{
  transform:translateY(-4px);
  border-color:rgba(255,122,0,.18);
  box-shadow:0 14px 28px rgba(255,122,0,.08), var(--shadow);
}

.thumb{
  aspect-ratio:16/9;
  background:#0b1016;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.thumb img,
.thumb video{
  width:100%;
  height:100%;
  object-fit:cover;
}

.card-body{
  padding:12px;
}

.title{
  font-weight:800;
  color:#fff;
}

.muted{
  color:var(--muted);
  font-size:13px;
}

/* ================================
   CATEGORY / LIST CARDS
================================== */
.list{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
}

.rowcard{
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.rowcard:hover{
  transform:translateY(-4px);
  border-color:rgba(255,122,0,.18);
  box-shadow:0 14px 28px rgba(255,122,0,.08), var(--shadow);
}

.row-thumb{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  background:#0b1016;
  overflow:hidden;
}

.row-thumb img,
.row-thumb video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.row-meta{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.row-title{
  font-weight:800;
  font-size:16px;
  color:#fff;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.row-sub{
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ================================
   FEATURED CARD HELPERS
================================== */
.category-block{
  margin:32px 0;
}

.featured-row{
  display:flex;
  align-items:flex-start;
  gap:20px;
}

.card-large{
  display:block;
  width:100%;
  max-width:280px;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.card-large:hover{
  transform:translateY(-4px);
  border-color:rgba(255,122,0,.18);
  box-shadow:0 14px 28px rgba(255,122,0,.08), var(--shadow);
}

.card-large .thumb{
  aspect-ratio:16/9;
  height:auto;
  max-height:180px;
  background:#0b1016;
  overflow:hidden;
}

.card-large img,
.card-large video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.card-large .card-body{
  padding:12px;
}

/* ================================
   GENERIC FORM / ADMIN SUPPORT
================================== */
.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.panel{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:16px;
}

label{
  display:block;
  margin:10px 0 6px;
  color:#e1e7ee;
}

input,
select,
textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#11161d;
  color:#fff;
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

select{
  background-image:none;
}

option{
  background:#0f1319;
  color:#fff;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(255,122,0,.45);
  box-shadow:0 0 0 3px rgba(255,122,0,.14);
}

textarea{
  min-height:120px;
  resize:vertical;
}

.links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.link-row{
  display:grid;
  grid-template-columns:1fr 2fr auto;
  gap:10px;
}

.chip{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,122,0,.10);
  border:1px solid rgba(255,122,0,.25);
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:10px;
  text-align:left;
}

.table tr:hover{
  background:rgba(255,122,0,.04);
}

/* ================================
   ITEM MEDIA HELPER
================================== */
.item-page .media--constrained .ratio{
  position:relative;
  width:100%;
  padding-top:56.25%;
  overflow:hidden;
  border-radius:12px;
  background:#0b1016;
}

.item-page .media--constrained .ratio > img,
.item-page .media--constrained .ratio > video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ================================
   ANNOUNCEMENT
================================== */
.announcement-box{
  margin:20px auto;
  padding:12px 18px;
  max-width:700px;
  background:linear-gradient(90deg, #ff5b1a, #ff9100);
  color:#fff;
  font-weight:bold;
  text-align:center;
  border-radius:8px;
  box-shadow:0 4px 12px rgba(0,0,0,0.25);
}

.announcement-box a{
  color:#fff;
  font-weight:bold;
  margin-left:10px;
  text-decoration:underline;
}

/* ================================
   FOOTER
================================== */
footer{
  padding:40px 24px;
  color:#9b9b9d;
  text-align:center;
}

/* ================================
   RESPONSIVE
================================== */
@media (max-width:900px){
  .row{
    grid-template-columns:1fr;
  }

  .nav-inner{
    flex-wrap:wrap;
    gap:10px;
    padding:10px 16px;
  }

  .search{
    order:3;
    flex:1 1 100%;
    max-width:none;
    margin-left:0 !important;
  }

  .search form{
    width:100%;
  }

  .search input{
    width:100%;
    padding:10px 40px 10px 12px;
    font-size:14px;
  }

  .nav-right{
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
  }

  .dropdown .dd-list{
    position:static;
    min-width:100%;
    box-shadow:none;
    border-radius:8px;
  }

  .btn{
    padding:8px 10px;
    font-size:13px;
  }

  .logo-img{
    height:28px;
  }
}

@media (max-width:700px){
  .list{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .row-thumb{
    aspect-ratio:16/9;
  }

  .row-title{
    font-size:15px;
  }

  .row-sub{
    font-size:12px;
  }

  body.all-categories .rowcard{
    flex-direction:column;
    align-items:flex-start;
  }

  body.all-categories .row-thumb{
    width:100%;
    height:auto;
  }

  body.all-categories .row-meta{
    padding:8px 0;
  }

  .hero h1{
    font-size:28px;
  }

  .section-head h2,
  .section-title{
    font-size:18px;
  }

  .nav{
    padding:10px 12px;
  }

  .nav-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  .brand{
    display:flex;
    align-items:center;
    gap:6px;
  }

  .search{
    order:3;
    width:100%;
    margin-top:6px;
  }

  .nav-right{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    justify-content:flex-start;
    width:100%;
  }

  .nav-right .btn{
    flex:1 1 calc(50% - 6px);
    text-align:center;
    padding:10px 0;
    font-size:14px;
  }

  .dropdown{
    width:100%;
  }

  .dropdown .dd-btn{
    width:100%;
  }
}

@media (max-width:480px){
  .nav-right{
    flex-direction:column;
    align-items:stretch;
  }

  .nav-right .btn,
  .btn{
    width:100%;
    text-align:center;
  }

  .list{
    grid-template-columns:1fr;
  }

  .rowcard{
    border-radius:12px;
  }

  .search input{
    font-size:13px;
  }
}