@font-face {
  font-family: 'Ethnocentric';
  src: url('../assets/fonts/ethnocentric-bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

:root {
  --bg:#090d10;
  --panel:#0f1418;
  --border:#1b2430;
  --border-subtle:#25313d;
  --muted:#9aa5b1;
  --text:#e9eef3;
  --rev-green:#17f25f;
  --rev-green-dark:#0fb14a;
  --title-green:#36ff84;
  --radius:14px;
  --shadow:0 6px 16px rgba(0,0,0,0.4);
  font-family:"Inter",system-ui;
}

body {
  margin:0;
  color:var(--text);
  background:var(--bg);
  position:relative;
  overflow-x:hidden;
}

body::before {
  content:'';
  position:fixed;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background:
    radial-gradient(circle at 20% 50%,rgba(23,242,95,0.08) 0%,transparent 25%),
    radial-gradient(circle at 80% 80%,rgba(54,255,132,0.06) 0%,transparent 25%),
    radial-gradient(circle at 40% 20%,rgba(23,242,95,0.05) 0%,transparent 20%);
  z-index:0;
  pointer-events:none;
  animation:gradientFloat 20s ease-in-out infinite;
}

body::after {
  content:'';
  position:fixed;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background-image:
    repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(23,242,95,0.03) 2px,rgba(23,242,95,0.03) 4px),
    repeating-linear-gradient(90deg,transparent,transparent 2px,rgba(23,242,95,0.03) 2px,rgba(23,242,95,0.03) 4px);
  background-size:80px 80px;
  opacity:.5;
  z-index:0;
  pointer-events:none;
}

@keyframes gradientFloat {
  0%,100%{transform:translate(0,0) scale(1);}
  33%{transform:translate(30px,-30px) scale(1.1);}
  66%{transform:translate(-20px,20px) scale(0.9);}
}

/* Layout */
.wrap {
  position:relative;
  z-index:1;
  max-width:1200px;
  margin:0 auto;
  padding:50px 24px 80px;
}

.main-layout {
  display:grid;
  grid-template-columns:1fr 240px;
  gap:24px;
  margin-top:20px;
}

.sidebar {
  display:flex;
  flex-direction:column;
  gap:18px;
}

@media (max-width:992px){
  .main-layout{grid-template-columns:1fr;gap:20px;}
  .sidebar{display:none;}
}

/* Header */
header.top {
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
}

.logo img {
  width:50px;
  height:50px;
  border-radius:10px;
  display:block;
}

.brand b {
  font-family: 'Ethnocentric', sans-serif;
  font-weight: bold;
  font-size: 38px;
  letter-spacing: 1px;
  color: var(--title-green);
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(23, 242, 95, 0.3);
}

.brand span {
  color:var(--muted);
  font-size:15px;
}

/* Mobile title adjustment */
@media (max-width: 600px) {
  .brand b {
    font-size: 28px;
  }
}

/* Search & Filters */
.controls {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:24px;
}

.search {
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  background:#0c1115;
  border:1px solid var(--border-subtle);
  border-radius:12px;
  padding:12px 14px;
  transition:border-color .2s,box-shadow .2s;
}

.search:focus-within {
  border-color:var(--rev-green);
  box-shadow:0 0 0 3px rgba(23,242,95,0.15);
}

.search input {
  flex:1;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:16px;
}

.tabs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chip {
  border:1px solid var(--border-subtle);
  background:#101518;
  color:var(--muted);
  padding:10px 16px;
  border-radius:999px;
  font-size:14px;
  cursor:pointer;
  transition:all .2s ease;
}

.chip:hover{border-color:var(--border);color:var(--text);}
.chip.active{
  background:#132216;
  color:var(--rev-green);
  border-color:#1d3f2a;
  box-shadow:0 2px 5px rgba(23,242,95,0.1);
}

/* Banner */
.banner {
  background:linear-gradient(135deg,#111820,#0e1c12);
  border:1px solid var(--border);
  border-radius:var(--radius);
  color:var(--muted);
  padding:20px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
  box-shadow:var(--shadow);
}

.banner span{font-size:16px;font-weight:600;}
.banner button{
  border:none;
  border-radius:10px;
  padding:10px 20px;
  font-weight:700;
  cursor:pointer;
  background:var(--rev-green);
  color:#02150a;
  box-shadow:0 2px 6px rgba(23,242,95,0.3);
  transition:all 0.25s ease;
}
.banner button:hover{
  background:#15da55;
  box-shadow:0 3px 10px rgba(23,242,95,0.35);
  transform:translateY(-1px);
}

/* Categories & Cards */
.category-header {
  font-size:20px;
  font-weight:800;
  color:var(--text);
  margin:28px 0 12px;
  padding-bottom:5px;
  border-bottom:1px solid var(--border);
  letter-spacing:-.5px;
}

.cards{display:flex;flex-direction:column;gap:18px;}

.card {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  box-shadow:var(--shadow);
  transition:transform .2s,border-color .2s;
  cursor:pointer;
}
.card:hover{transform:translateY(-2px);border-color:#243340;}

.card-header{display:flex;justify-content:space-between;align-items:flex-start;}
.meta{flex-grow:1;}
.meta-row{display:flex;align-items:center;}
.name{font-weight:800;font-size:18px;}
.version{font-size:14px;color:var(--rev-green);margin-left:8px;}
.sub{color:var(--muted);font-size:14px;}

.status {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:14px;
  color:var(--muted);
  font-weight:600;
}
.dot{width:12px;height:12px;border-radius:50%;border:2px solid rgba(255,255,255,0.1);}
.up{background:var(--rev-green);}
.down{background:#ef4444;}
.maint{background:#f59e0b;}

.body {
  font-size:14px;
  color:var(--muted);
  max-height:0;
  overflow:hidden;
  opacity:0;
  padding-left:5px;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height, opacity;
}

.card.expanded .body {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}

.foot {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:10px;
  padding-left:5px;
  flex-wrap:wrap;
}

/* Buttons */
.btn {
  padding:10px 18px;
  border-radius:10px;
  border:1px solid var(--border-subtle);
  background:#11181c;
  color:var(--text);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s ease;
}

.btn:hover {
  border-color:var(--border);
  background:#151d22;
  transform:translateY(-1px);
}

.btn.primary {
  background:var(--rev-green);
  color:#041c0a;
  border:none;
  box-shadow:0 3px 8px rgba(23,242,95,0.25);
  transition:all 0.25s ease;
}
.btn.primary:hover {
  background:#15da55;
  box-shadow:0 4px 12px rgba(23,242,95,0.35);
  transform:translateY(-1.5px);
}

.btn.sunc-btn {
  background: #132216;
  color: var(--rev-green);
  border: 1px solid #1d3f2a;
  box-shadow: 0 2px 5px rgba(23,242,95,0.1);
  transition: all 0.25s ease;
}

.btn.sunc-btn:hover {
  background: #1a2e1d;
  border-color: #2a5738;
  box-shadow: 0 3px 8px rgba(23,242,95,0.2);
  transform: translateY(-1px);
}

.caret{margin-left:auto;cursor:pointer;transition:transform .3s;font-size:20px;color:var(--text);}
.card.expanded .caret{transform:rotate(180deg);}

/* Modal */
.modal-overlay {
  position:fixed;
  top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,0.75);
  display:none;justify-content:center;align-items:center;
  z-index:1000;opacity:0;transition:opacity 0.3s;
}
.modal-overlay.open{display:flex;opacity:1;}
.modal {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  max-width:500px;width:90%;
  padding:25px;
  box-shadow:var(--shadow);
  transform:scale(0.9);
  transition:transform 0.3s;
}
.modal-overlay.open .modal{transform:scale(1);}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid var(--border);}
.modal-header h2{font-size:24px;font-weight:800;color:var(--title-green);}
.modal-close{background:none;border:none;color:var(--muted);font-size:24px;cursor:pointer;}
.modal-close:hover{color:var(--text);}
.modal-body{max-height:400px;overflow-y:auto;padding-right:15px;}
.modal-body p{color:var(--muted);line-height:1.6;margin:0 0 15px;white-space:pre-wrap;}

/* sUNC Modal Specific Styles */
.sunc-modal {
  max-width: 800px;
  width: 92%;
}

.sunc-modal-body {
  max-height: none;
  padding: 0;
  overflow: hidden;
}

#sunc-widget {
  width: 100%;
  height: 610px;
  border: none;
  border-radius: 8px;
  display: block;
}

/* Misc */
.loading,.error{text-align:center;padding:40px;font-size:16px;}
.loading{color:var(--muted);}
.error{color:#ef4444;}
.badge{display:inline-block;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;margin-left:8px;}
.badge.free{background:#132216;color:var(--rev-green);}
.badge.paid{background:#2a1c12;color:#f59e0b;}

/* Sidebar Ads */
.side-ad {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-decoration:none;
  background:#101518;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  color:var(--text);
  font-size:15px;
  font-weight:600;
  line-height:1.6;
  padding:24px;
  width:80%;
  min-height:230px;
  text-align:center;
  transition:background 0.2s ease;
  cursor:pointer;
}
.side-ad:hover{background:#0f1418;}
.side-ad b{color:var(--rev-green);display:block;margin-bottom:4px;}

/* Mobile Ads - FIXED */
.mobile-ad {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background: #101518;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  padding: 24px;
  width: 80%;
  min-height: 200px;
  text-align: center;
  margin: 20px 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-ad:hover {
  background: #0f1418;
}

.mobile-ad b {
  color: var(--rev-green);
  display: block;
  margin-bottom: 4px;
}

@media (max-width: 992px) {
  .mobile-ad {
    display: flex;
  }
}

.chat-bubble {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 1001;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(23, 242, 95, 0.3);
}
.chat-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-notif {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ff2b2b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
}


.chat-box {
  position: fixed;
  bottom: 100px;
  left: 25px;
  width: 310px;
  max-width: 90%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 1002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInChat 0.3s ease;
}

@keyframes fadeInChat {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-header {
  background: #0f1418;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.chat-header b {
  color: var(--rev-green);
  font-size: 16px;
  font-weight: 700;
}

.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  font-weight: 800;
  transition: color 0.2s ease;
}
.chat-close:hover { color: var(--text); }

.chat-body {
  padding: 16px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  background: rgba(255,255,255,0.02);
}
.chat-body a {
  color: var(--rev-green);
  font-weight: 600;
  text-decoration: none;
}
.chat-body a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .chat-bubble {
    width: 55px;
    height: 55px;
    bottom: 20px;
    left: 20px;
  }
  .chat-box {
    bottom: 85px;
    left: 15px;
    width: calc(100% - 30px);
  }
}

/* Body divs styling */
.body div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.body div:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}

.body div b {
  color: var(--rev-green);
  font-weight: 700;
  font-size: 13.5px;
}
