*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Chakra Petch', sans-serif;
  background: #000;
  color: #fff;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); backdrop-filter: blur(40px); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #8D71FF 48.3%, #322859 99.89%); }

.app { display: flex; height: 100vh; overflow: hidden; }
main {
  flex: 1;
  padding-top: 80px;
  padding-left: 23rem;
  padding-right: 16px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}
@media (max-width: 1600px) { main { padding-left: 21rem; } }
@media (max-width: 1500px) { main { padding-left: 19rem; } }
@media (max-width: 1000px) { main { padding: 80px 0 0 0; } }

/* ===== TOP NAVBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1030;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 40px;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-logo { display: flex; align-items: center; gap: 10px; font-family: 'Orbitron', sans-serif; font-size: 18px; text-transform: uppercase; }
.topbar-logo img { height: 36px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.hamburger-btn {
  display: none;
  background: none; border: none; color: #fff;
  font-size: 24px; cursor: pointer; padding: 8px;
}
.wallet-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(90deg, rgba(69,174,255,0.15), rgba(69,174,255,0.05));
  border: 1px solid rgba(69,174,255,0.3);
  border-radius: 100px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.wallet-btn:hover { border-color: #45aeff; background: rgba(69,174,255,0.15); }
.wallet-btn i { font-size: 16px; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 80px;
  left: 0;
  bottom: 0;
  width: 23rem;
  z-index: 1020;
  background: rgba(0,0,0,0.95);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 0;
}
.sidebar-logo { display: none; padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 16px; }
.sidebar-logo img { height: 32px; }
.sidebar-section { padding: 8px 20px; }
.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
  font-weight: 600;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
  margin-bottom: 2px;
}
.sidebar-link i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(255,107,0,0.15), transparent);
  color: #FF6B00;
  border-right: 3px solid #FF6B00;
}
.sidebar-link.active i { color: #FF6B00; }
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.sidebar-user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B00, #8D71FF);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.sidebar-user-info .name { font-size: 14px; font-weight: 600; }
.sidebar-user-info .role { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ===== PAGE TITLE ===== */
.page-title {
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  transition: all 0.3s;
}
.stat-card:hover { border-color: rgba(255,107,0,0.2); background: rgba(255,107,0,0.03); }
.stat-card .title-text {
  font-size: 13px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.stat-card .title-value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}
.stat-card .title-value.orange { color: #FF6B00; }
.stat-card .title-value.blue { color: #256FFF; }
.stat-card .title-value.cyan { color: #48CAE4; }
.stat-card .title-value.green { color: #2d9e06; }
.stat-card .sub-text {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
}

/* ===== CONTENT ROW ===== */
.content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: calc(100vh - 80px - 180px - 120px);
}
.col-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.col-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #FF6B00;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.col-header .count {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}
.col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* ===== MISSIONS ===== */
.mission {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.mission:last-child { border: none; }
.mission:hover { background: rgba(255,255,255,0.02); }
.mission-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(72,202,228,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #48CAE4;
  flex-shrink: 0;
}
.mission-icon.completed { background: rgba(45,158,6,0.1); color: #2d9e06; }
.mission-icon.locked { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.2); }
.mission-info { flex: 1; }
.mission-info .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.mission-info .desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.mission-reward {
  font-size: 13px;
  font-weight: 600;
  color: #FF6B00;
  text-align: right;
}

/* ===== TOP OFFICERS ===== */
.top-officers-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-officers-header span {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #FF6B00;
}
.officer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.officer:last-child { border: none; }
.officer:hover { background: rgba(255,255,255,0.02); }
.officer-rank {
  width: 28px;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-align: center;
  flex-shrink: 0;
}
.officer-rank.gold { color: #FFD700; }
.officer-rank.silver { color: #C0C0C0; }
.officer-rank.bronze { color: #CD7F32; }
.officer-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8D71FF, #322859);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.officer-info { flex: 1; }
.officer-info .name { font-size: 14px; font-weight: 600; }
.officer-info .xp { font-size: 12px; color: rgba(255,255,255,0.4); }
.officer-points {
  font-size: 14px;
  font-weight: 700;
  color: #48CAE4;
}

/* ===== IDO CARDS ===== */
.ido-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding-bottom: 24px;
}
.ido-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
}
.ido-card:hover { border-color: rgba(255,107,0,0.2); transform: translateY(-2px); }
.ido-banner {
  height: 120px;
  background: linear-gradient(135deg, rgba(255,107,0,0.2), rgba(141,113,255,0.2));
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.ido-logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.ido-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.ido-status.live { background: rgba(45,158,6,0.2); color: #4ade80; border: 1px solid rgba(45,158,6,0.3); }
.ido-status.upcoming { background: rgba(255,107,0,0.15); color: #FF6B00; border: 1px solid rgba(255,107,0,0.2); }
.ido-status.ended { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.06); }
.ido-body { padding: 16px 20px 20px; }
.ido-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.ido-ticker {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.ido-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ido-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.ido-detail .label { color: rgba(255,255,255,0.4); }
.ido-detail .value { font-weight: 600; }
.ido-progress {
  margin-top: 12px;
}
.ido-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ido-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF6B00, #FFA500);
  transition: width 0.5s;
}
.ido-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ===== RAFFLES ===== */
.raffle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding-bottom: 24px;
}
.raffle-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
}
.raffle-card:hover { border-color: rgba(37,111,255,0.2); transform: translateY(-2px); }
.raffle-header {
  background: linear-gradient(135deg, rgba(37,111,255,0.15), rgba(72,202,228,0.1));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.raffle-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #256FFF, #48CAE4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.raffle-header-info { flex: 1; }
.raffle-header-info .name { font-size: 18px; font-weight: 700; }
.raffle-header-info .pool { font-size: 13px; color: rgba(255,255,255,0.4); }
.raffle-body { padding: 16px 20px 20px; }
.raffle-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.raffle-detail .label { color: rgba(255,255,255,0.4); }
.raffle-detail .value { font-weight: 600; color: #48CAE4; }
.raffle-timer {
  text-align: center;
  padding: 12px;
  background: rgba(37,111,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.04);
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  color: #48CAE4;
}
.raffle-timer .label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  display: block;
  margin-bottom: 4px;
}

/* ===== STAKING ===== */
.staking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding-bottom: 24px;
}
.stake-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  text-align: center;
}
.stake-card:hover { border-color: rgba(72,202,228,0.2); transform: translateY(-2px); }
.stake-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.stake-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.stake-icon.orange { background: rgba(255,107,0,0.1); color: #FF6B00; }
.stake-icon.blue { background: rgba(37,111,255,0.1); color: #256FFF; }
.stake-icon.cyan { background: rgba(72,202,228,0.1); color: #48CAE4; }
.stake-icon.purple { background: rgba(141,113,255,0.1); color: #8D71FF; }
.stake-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.stake-apr {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #48CAE4;
  margin: 8px 0;
}
.stake-apr .pct { font-size: 16px; color: rgba(255,255,255,0.4); }
.stake-body { padding: 16px 20px 20px; }
.stake-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.stake-detail .label { color: rgba(255,255,255,0.4); }
.stake-detail .value { font-weight: 600; }
.stake-action {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(72,202,228,0.3);
  background: rgba(72,202,228,0.1);
  color: #48CAE4;
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.stake-action:hover { background: rgba(72,202,228,0.2); }

/* ===== BUTTONS ===== */
.btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-orange:hover { background: #e06000; }
.btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #256FFF;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-blue:hover { background: #1a5ae0; }

/* ===== WALLET MODAL ===== */
.wallet-modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 1050;
  align-items: center;
  justify-content: center;
}
.wallet-modal.active { display: flex; }
.wallet-modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
}
.wallet-modal-card {
  position: relative;
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 400px;
  max-width: 90vw;
  padding: 32px;
}
.wallet-modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}
.wallet-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  font-size: 20px;
  cursor: pointer;
}
.wallet-modal-close:hover { color: #fff; }
.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}
.wallet-option:hover { background: rgba(255,255,255,0.06); border-color: rgba(69,174,255,0.3); }
.wallet-option-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.wallet-option-info { flex: 1; }
.wallet-option-info .name { font-size: 15px; font-weight: 600; }
.wallet-option-info .desc { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .hamburger-btn { display: block; }
  .topbar { padding: 0 16px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 300px;
    z-index: 1025;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-logo { display: flex; align-items: center; gap: 10px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .content-row { grid-template-columns: 1fr; height: auto; }
  .col-card { min-height: 400px; }
  main { padding: 80px 0 0 0; }
  .page { padding: 16px; }
  .ido-grid, .raffle-grid, .staking-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  .stats-row { grid-template-columns: 1fr; }
  .stat-card .title-value { font-size: 22px; }
  .page-title { font-size: 24px; }
}
