/* hackvshack.lol - Real HvH Theme */
:root {
  --bg-main: #0f0f12;
  --bg-sidebar: #121216;
  --bg-card: #18181c;
  --bg-card-hover: #1e1e24;
  --bg-input: #1a1a1f;
  --border: #2a2a32;
  --border-light: #33333d;
  --text-primary: #e8e8ed;
  --text-secondary: #9a9aa8;
  --text-muted: #6b6b78;
  --accent: #7c5cff;
  --accent-hover: #9478ff;
  --green: #3dd68c;
  --red: #ff5c5c;
  --yellow: #ffcc00;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo span { color: var(--accent); }
.logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.5px; }

.nav-section { padding: 12px 10px; flex: 1; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover, .nav-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
}
.nav-item svg { width: 18px; height: 18px; opacity: 0.8; }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-box { position: relative; }
.search-box input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  width: 220px;
  outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.content { padding: 24px; flex: 1; }

.banner {
  background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.banner h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.banner p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }

.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover, .tab.active {
  background: rgba(124, 92, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.forum-section { margin-bottom: 28px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.forum-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all 0.15s;
  cursor: pointer;
}
.forum-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.forum-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.forum-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.forum-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.forum-card p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.forum-stats {
  display: flex; gap: 14px; margin-top: 12px;
  font-size: 12px; color: var(--text-muted);
}

.thread-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.thread-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: var(--bg-card-hover); }
.thread-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.thread-info { flex: 1; min-width: 0; }
.thread-title {
  font-size: 14px; font-weight: 550; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thread-meta { font-size: 12px; color: var(--text-muted); }
.thread-meta .author { color: var(--accent); }
.thread-stats { text-align: right; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.thread-stats .replies { font-weight: 600; color: var(--text-secondary); }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
}
.tag-new { background: rgba(61, 214, 140, 0.15); color: var(--green); }
.tag-hot { background: rgba(255, 92, 92, 0.15); color: var(--red); }
.tag-pinned { background: rgba(124, 92, 255, 0.15); color: var(--accent); }
.tag-leak { background: rgba(255, 204, 0, 0.15); color: var(--yellow); }

.right-panel { width: 280px; flex-shrink: 0; padding: 0 0 0 20px; }
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.widget-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.content-with-panel { display: flex; gap: 0; }
.content-main { flex: 1; min-width: 0; }

.stats-bar {
  display: flex; gap: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 13px;
}
.stat-item strong { color: var(--accent); font-weight: 600; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.modal h2 { font-size: 20px; margin-bottom: 6px; }
.modal p { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.modal input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}
.modal input:focus { border-color: var(--accent); }
.modal .btn { width: 100%; justify-content: center; padding: 11px; margin-top: 8px; }
.modal-close {
  float: right; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1;
}
.modal-error {
  background: rgba(255, 92, 92, 0.12);
  color: var(--red);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: none;
}
.modal-error.show { display: block; }
.modal-success {
  background: rgba(61, 214, 140, 0.12);
  color: var(--green);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: none;
}
.modal-success.show { display: block; }

.footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.page-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.page-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.15s;
  cursor: pointer;
}
.market-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.market-img {
  height: 120px;
  background: linear-gradient(135deg, #1a1a28, #12121c);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  border-bottom: 1px solid var(--border);
}
.market-body { padding: 14px; }
.market-body h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.market-body p { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.market-price { font-size: 15px; font-weight: 700; color: var(--green); }
.market-seller { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 300;
  display: none;
  align-items: center;
  gap: 10px;
}
.toast.show { display: flex; animation: slideIn 0.25s ease; }
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.user-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
}
.user-badge .name { color: var(--accent); font-weight: 600; }

.online-list { font-size: 13px; }
.online-user { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.hidden { display: none !important; }

@media (max-width: 1100px) { .right-panel { display: none; } }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .banner { padding: 20px; }
  .banner h1 { font-size: 20px; }
  .search-box input { width: 140px; }
}