@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary: #ff1a1a;
  --primary-hover: #ff4d4d;
  --secondary: #800000;
  --secondary-hover: #b30000;
  --accent: #ff0000;
  --accent-gold: #ffd700;
  --bg-deep: #050000;
  --bg-main: #0a0505;
  --bg-card: #120a0a;
  --bg-elevated: #1a1010;
  --border-color: rgba(255, 26, 26, 0.08);
  --border-glow: rgba(255, 26, 26, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #d1d1d1;
  --text-muted: #7a7a7a;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.6);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.8);
  --shadow-lg: 0 16px 48px rgba(0,0,0,1);
  --shadow-glow: 0 0 30px rgba(255, 26, 26, 0.1);
  --accent-gradient: linear-gradient(135deg, #ff1a1a, #800000);
  --radius-sm: 8px;
  --radius-md: 14px;
  --border-hover: rgba(255, 26, 26, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.bg-mesh {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 0% 0%, rgba(255, 26, 26, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(128, 0, 0, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(5, 0, 0, 1) 0%, #000 100%);
  pointer-events: none; z-index: -3;
}

.bg-pattern {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(rgba(255, 26, 26, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none; z-index: -2;
}

.page-container {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
}

a { color: inherit; text-decoration: none; }

.gradient-text {
  background: linear-gradient(135deg, #ff1a1a, #ffffff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 900;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #1a0000; border-radius: 10px; border: 1px solid rgba(255, 26, 26, 0.2); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 6px currentColor; } 50% { box-shadow: 0 0 14px currentColor; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-25%); } }
@keyframes orb-move { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(10%, -10%) scale(1.1); } 66% { transform: translate(-5%, 15%) scale(0.9); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes icon-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.animate-in { animation: fadeInUp 0.5s ease forwards; }
.animate-fade { animation: fadeIn 0.4s ease forwards; }

/* ═══════════════════════════════════════════ */
/* NAVBAR */
/* ═══════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  background: rgba(5,5,5,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}
.navbar.scrolled {
  background: rgba(5,5,5,0.98);
  border-bottom-color: rgba(255,26,26,0.3);
  box-shadow: 0 4px 30px rgba(0,0,0,0.8);
}

.announcement-bar {
  background: linear-gradient(90deg, #800000, #ff1a1a, #800000);
  padding: 5px 0; overflow: hidden; position: relative;
}
.announcement-bar .marquee-content {
  display: flex; animation: marquee 25s linear infinite;
  white-space: nowrap; gap: 60px;
}
.announcement-bar span {
  font-size: 11px; font-weight: 800; color: white;
  letter-spacing: 0.05em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}

.nav-inner {
  height: 60px; display: flex; align-items: center;
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s;
}
.nav-logo:hover { transform: scale(1.02); }
.nav-logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255,26,26,0.3);
  color: white; font-size: 18px; font-weight: 900;
}
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-text .name { font-size: 16px; line-height: 1; }
.nav-logo-text .sub { font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; font-weight: 700; }

.nav-links {
  display: flex; gap: 4px; flex: 1; justify-content: center;
}
.nav-links a {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); display: flex; align-items: center; gap: 7px;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: #fff; background: rgba(255,26,26,0.08); transform: scale(1.02);
}

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-search-input {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,26,26,0.3);
  border-radius: 8px; padding: 6px 12px; color: white; font-size: 13px;
  outline: none; font-family: 'Inter', sans-serif; width: 170px;
  transition: all 0.3s;
}
.nav-search-input:focus { border-color: rgba(255,26,26,0.5); }

.nav-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-color);
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.nav-icon-btn:hover {
  background: rgba(255,26,26,0.12); color: #ff1a1a;
  border-color: rgba(255,26,26,0.4);
}

.nav-user-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
  cursor: pointer; transition: all 0.2s;
}
.nav-user-btn:hover { border-color: var(--border-hover); }

.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.nav-avatar-letter {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: white;
}

.user-menu {
  position: absolute; right: 0; top: 100%; margin-top: 10px;
  width: 200px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  z-index: 1000; display: none; animation: slideDown 0.2s ease;
}
.user-menu.active { display: block; }
.user-menu a, .user-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; color: var(--text-secondary); font-size: 13px;
  width: 100%; background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.user-menu a:hover, .user-menu button:hover { background: rgba(255,26,26,0.06); color: white; }
.user-menu .admin-link { color: #ff1a1a; font-weight: 700; border-bottom: 1px solid var(--border-color); }
.user-menu .logout-btn { color: #ff1a1a; font-weight: 600; border-top: 1px solid var(--border-color); }

.auth-buttons { display: flex; gap: 8px; }
.btn-login {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.btn-login:hover { background: rgba(255,255,255,0.05); color: white; }
.btn-register {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, #ff1a1a, #800000); color: white;
  box-shadow: 0 4px 15px rgba(255,26,26,0.3); transition: all 0.2s;
}
.btn-register:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(255,26,26,0.4); }

.nav-spacer { height: 100px; }

/* ═══════════════════════════════════════════ */
/* HERO */
/* ═══════════════════════════════════════════ */
.hero { padding: 36px 0 28px; position: relative; }
.hero-content { text-align: center; margin-bottom: 40px; animation: fadeInUp 0.6s ease; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 16px; background: rgba(255,26,26,0.1);
  border: 1px solid rgba(255,26,26,0.3); border-radius: 100px;
  margin-bottom: 18px; font-size: 12px; font-weight: 700; color: #ff1a1a;
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 58px); font-weight: 900;
  line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.03em;
}
.hero h1 .sub { color: var(--text-primary); font-size: 70%; display: block; }
.hero p {
  font-size: 15px; color: var(--text-secondary);
  max-width: 500px; margin: 0 auto 24px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  padding: 11px 26px; border-radius: 10px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  color: white; font-weight: 900; font-size: 14px;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 4px 15px rgba(255,26,26,0.3); transition: all 0.2s;
}
.btn-hero-primary:hover { transform: scale(1.04); box-shadow: 0 8px 28px rgba(255,26,26,0.5); }
.btn-hero-secondary {
  padding: 11px 26px; border-radius: 10px;
  background: rgba(5,5,5,0.4); color: #ff1a1a;
  font-weight: 900; font-size: 14px;
  border: 1px solid rgba(255,26,26,0.3);
  display: flex; align-items: center; gap: 7px; transition: all 0.2s;
}
.btn-hero-secondary:hover { background: rgba(255,26,26,0.08); transform: scale(1.02); }

/* Stats Grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: fadeInUp 0.6s ease 0.3s both;
}
.stat-card {
  padding: 20px 14px; text-align: center; background: var(--bg-card);
  transition: background 0.2s;
}
.stat-card:hover { background: rgba(255,26,26,0.04); }
.stat-card .icon { display: flex; justify-content: center; margin-bottom: 6px; color: #ff1a1a; }
.stat-card .icon.green { color: #4caf50; }
.stat-card .icon svg { animation: icon-pulse 3s ease-in-out infinite; }
.stat-card .value { font-size: 22px; font-weight: 900; color: white; }
.stat-card .label {
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 700; margin-top: 4px;
}

/* ═══════════════════════════════════════════ */
/* MAIN LAYOUT */
/* ═══════════════════════════════════════════ */
.main-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px; padding: 24px 16px 60px;
}
.main-content { display: flex; flex-direction: column; gap: 20px; }
.sidebar {
  position: sticky; top: 100px; height: fit-content;
  display: flex; flex-direction: column; gap: 4px;
}

/* ═══════════════════════════════════════════ */
/* CARDS */
/* ═══════════════════════════════════════════ */
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); overflow: hidden;
}
.card-header {
  padding: 11px 14px; border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02); display: flex; align-items: center; gap: 8px;
}
.card-header .title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.card-body { padding: 12px; }

/* ═══════════════════════════════════════════ */
/* CHAT */
/* ═══════════════════════════════════════════ */
.chat-container { animation: fadeInUp 0.4s ease; }
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; cursor: pointer; user-select: none;
  background: linear-gradient(135deg, rgba(255,26,26,0.08), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.chat-header-left { display: flex; align-items: center; gap: 10px; }
.chat-icon-box {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,26,26,0.12); border: 1px solid rgba(255,26,26,0.25);
  display: flex; align-items: center; justify-content: center;
}
.chat-title {
  font-size: 13px; font-weight: 800; color: white;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.chat-count { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.chat-messages {
  height: 260px; overflow-y: auto; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: white; margin-top: 2px;
}
.chat-msg-content { flex: 1; min-width: 0; }
.chat-msg-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-msg-name { font-size: 12px; font-weight: 700; }
.chat-msg-time { font-size: 9px; color: var(--text-muted); }
.chat-msg-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; word-break: break-word; }
.chat-input-area {
  padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.04);
  display: flex; gap: 8px; align-items: center;
}
.chat-input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: white; font-size: 13px; outline: none;
  font-family: 'Inter', sans-serif; transition: border-color 0.2s;
}
.chat-input:focus { border-color: rgba(255,26,26,0.3); }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: none; color: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.chat-send-btn.active {
  background: linear-gradient(135deg, #ff1a1a, #800000);
}
.chat-send-btn:hover { transform: scale(1.05); }

/* ═══════════════════════════════════════════ */
/* FORUM TABS */
/* ═══════════════════════════════════════════ */
.forum-tabs {
  display: flex; gap: 6px; margin-bottom: 28px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 5px; overflow: hidden;
}
.forum-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 10px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em;
  font-family: 'Inter', sans-serif; background: transparent;
  color: var(--text-muted); transition: all 0.2s;
}
.forum-tab:hover { transform: scale(1.02); }
.forum-tab.active {
  background: var(--accent-gradient); color: white;
  box-shadow: 0 4px 20px -4px rgba(255,26,26,0.35);
}
.forum-tab.active.hot {
  background: linear-gradient(135deg, #ff6b35, #cc2200);
  box-shadow: 0 4px 20px -4px rgba(255,107,53,0.4);
}
.forum-tab.active.vip {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  box-shadow: 0 4px 20px -4px rgba(255,215,0,0.3);
}
.forum-tab.hot-color { color: #ff6b35; }
.forum-tab.vip-color { color: #ffd700; }

/* ═══════════════════════════════════════════ */
/* CATEGORY BLOCKS */
/* ═══════════════════════════════════════════ */
.category-block {
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border-color); overflow: hidden;
  margin-bottom: 16px; animation: fadeInUp 0.4s ease both;
}
.category-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer; user-select: none;
  border-bottom: 1px solid rgba(255,255,255,0.04); transition: all 0.2s;
}
.category-header-left { display: flex; align-items: center; gap: 12px; }
.category-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.category-name {
  font-size: 14px; font-weight: 900; color: white;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.category-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.category-chevron { color: var(--text-muted); transition: transform 0.2s; }
.category-block.collapsed .category-chevron { transform: rotate(-90deg); }
.category-block.collapsed .category-body { display: none; }

/* Subcategory Rows */
.sub-row {
  display: grid; grid-template-columns: 1fr 80px 80px 1fr;
  align-items: center; padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.sub-row:last-child { border-bottom: none; }
.sub-row:hover { background: rgba(255,255,255,0.018); }

.sub-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sub-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.sub-info { min-width: 0; flex: 1; }
.sub-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub-name {
  font-size: 14px; font-weight: 700; color: white; transition: color 0.2s;
}
.sub-name:hover { color: var(--primary); }
.sub-desc {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sub-stat { text-align: center; }
.sub-stat .num { font-size: 14px; font-weight: 800; color: white; }
.sub-stat .lbl {
  font-size: 9px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 600;
}

.sub-last { display: flex; align-items: center; gap: 10px; min-width: 0; justify-content: flex-end; }
.sub-last-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: white;
}
.sub-last-info { min-width: 0; text-align: right; }
.sub-last-thread {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
  transition: color 0.2s;
}
.sub-last-thread:hover { color: white; }
.sub-last-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 4px;
  font-size: 9px; font-weight: 800; text-transform: uppercase;
}
.badge-vip { background: rgba(255,215,0,0.12); color: #ffd700; border: 1px solid rgba(255,215,0,0.2); }
.badge-admin { background: rgba(255,26,26,0.12); color: #ff1a1a; border: 1px solid rgba(255,26,26,0.2); }
.badge-pinned { background: rgba(33,150,243,0.15); color: #2196f3; border: 1px solid rgba(33,150,243,0.25); }
.badge-locked { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.badge-media { background: rgba(255,107,53,0.1); color: #ff6b35; border: 1px solid rgba(255,107,53,0.2); }
.badge-new-thread {
  padding: 3px 8px; border-radius: 5px; cursor: pointer;
  font-family: 'Inter', sans-serif; letter-spacing: 0.04em;
  transition: all 0.2s;
}
.badge-new-thread:hover { transform: scale(1.08); }

/* ═══════════════════════════════════════════ */
/* THREAD LIST */
/* ═══════════════════════════════════════════ */
.thread-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: rgba(255,26,26,0.04); }
.thread-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: white;
}
.thread-info { flex: 1; min-width: 0; }
.thread-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.thread-title {
  font-size: 13px; font-weight: 700; color: white;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px;
}
.thread-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.thread-meta .author { font-weight: 600; }
.thread-stats { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.thread-stat-item { width: 55px; text-align: center; }
.thread-stat-item .num { font-size: 13px; font-weight: 800; color: white; }
.thread-stat-item .lbl { font-size: 9px; color: var(--text-muted); font-weight: 600; }
.thread-time { width: 70px; text-align: center; font-size: 11px; color: var(--text-secondary); font-weight: 600; }

/* ═══════════════════════════════════════════ */
/* SIDEBAR */
/* ═══════════════════════════════════════════ */
.sidebar-card { margin-bottom: 14px; animation: fadeInUp 0.5s ease both; }
.sidebar-online {
  display: flex; align-items: center; gap: 8px;
}
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff1a1a; box-shadow: 0 0 8px #ff1a1a;
  animation: pulse-glow 2s ease-in-out infinite;
}
.online-count { font-size: 26px; font-weight: 900; color: #ff1a1a; }
.online-label { font-size: 12px; color: var(--text-muted); }

.hot-thread-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 8px; border-radius: 8px; border: 1px solid transparent;
  transition: all 0.2s;
}
.hot-thread-item:hover {
  background: rgba(255,26,26,0.06); border-color: rgba(255,26,26,0.2);
  transform: translateX(3px);
}
.hot-thread-rank { font-size: 12px; font-weight: 900; color: #ff1a1a; min-width: 16px; }
.hot-thread-title {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-thread-views { font-size: 10px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 3px; }

.vip-cta {
  padding: 20px; border-radius: 16px;
  background: linear-gradient(135deg, #121212, #050505);
  border: 1px solid rgba(255,26,26,0.2); text-align: center;
  margin-bottom: 14px; transition: all 0.3s;
}
.vip-cta:hover { border-color: rgba(255,26,26,0.4); box-shadow: 0 8px 30px rgba(255,26,26,0.1); }
.vip-cta h3 { font-size: 16px; font-weight: 900; color: white; margin: 12px 0 6px; }
.vip-cta p { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.vip-cta-btn {
  display: block; padding: 10px; border-radius: 10px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  color: white; font-weight: 900; font-size: 13px;
  box-shadow: 0 4px 12px rgba(255,26,26,0.3); transition: all 0.2s;
}
.vip-cta-btn:hover { transform: scale(1.03); }

.activity-item {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  padding: 4px 0; animation: fadeIn 0.3s ease both;
}
.activity-item .user { color: #ff1a1a; font-weight: 800; }
.activity-item .thread-link { color: white; font-weight: 600; }
.activity-item .thread-link:hover { color: var(--primary); }

/* ═══════════════════════════════════════════ */
/* FOOTER */
/* ═══════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(13,15,20,0.98); backdrop-filter: blur(20px);
  margin-top: 60px; position: relative; overflow: hidden;
}
.footer::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #ff1a1a, #800000, #ff1a1a, transparent);
}
.footer-grid {
  display: grid; grid-template-columns: 1fr repeat(3, auto);
  gap: 40px; margin-bottom: 40px;
}
.footer-brand-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.7; max-width: 240px;
}
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all 0.2s;
}
.footer-social a:hover {
  background: rgba(255,26,26,0.12); border-color: rgba(255,26,26,0.4);
  transform: scale(1.1);
}
.footer-section h4 {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}
.footer-section ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-section a {
  font-size: 13px; color: var(--text-secondary); transition: all 0.15s;
}
.footer-section a:hover { color: #ff1a1a; transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid var(--border-color); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: var(--text-muted); transition: color 0.2s; }
.footer-bottom-links a:hover { color: #ff1a1a; }

/* ═══════════════════════════════════════════ */
/* AUTH PAGES */
/* ═══════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
}
.auth-orb {
  position: absolute; border-radius: 50%; filter: blur(60px);
  pointer-events: none; animation: orb-move 15s ease-in-out infinite;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(10,5,5,0.95); border: 1px solid rgba(255,26,26,0.25);
  border-radius: 20px; padding: 36px; backdrop-filter: blur(20px);
  box-shadow: 0 25px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: fadeInUp 0.6s ease;
}
.auth-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; margin: 0 auto 12px;
  box-shadow: 0 8px 25px rgba(255,26,26,0.4); color: white;
  animation: pulse-glow 3s ease-in-out infinite;
}
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; text-align: center; }

.form-group { margin-bottom: 14px; }
.form-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input-wrap { position: relative; }
.form-input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); display: flex;
}
.form-input {
  width: 100%; padding: 10px 12px 10px 38px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: white; font-size: 14px; outline: none;
  font-family: 'Inter', sans-serif; transition: border-color 0.2s;
}
.form-input:focus { border-color: rgba(255,26,26,0.5); }

.form-error {
  padding: 10px 14px; background: rgba(255,26,26,0.1);
  border: 1px solid rgba(255,26,26,0.3); border-radius: 8px;
  font-size: 13px; color: #ff1a1a; margin-bottom: 14px;
  animation: fadeIn 0.3s ease;
}

.btn-submit {
  width: 100%; padding: 12px; border-radius: 10px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  border: none; color: white; font-weight: 700; font-size: 15px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.btn-submit:hover { transform: scale(1.02); box-shadow: 0 8px 25px rgba(255,26,26,0.5); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.auth-link { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 14px; }
.auth-link a { color: #ff1a1a; font-weight: 600; }

/* ═══════════════════════════════════════════ */
/* THREAD DETAIL */
/* ═══════════════════════════════════════════ */
.thread-detail-header {
  padding: 24px; border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(255,26,26,0.06), transparent);
}
.thread-detail-title { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.thread-detail-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

.post-item {
  padding: 20px; border-bottom: 1px solid var(--border-color);
  display: flex; gap: 16px; transition: background 0.2s;
}
.post-item:hover { background: rgba(255,26,26,0.02); }
.post-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: white;
}
.post-body { flex: 1; min-width: 0; }
.post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-author { font-size: 14px; font-weight: 700; }
.post-role-badge {
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  font-weight: 800; text-transform: uppercase;
}
.post-time { font-size: 11px; color: var(--text-muted); }
.post-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.post-content strong { color: white; }
.post-media { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-media img { max-width: 300px; border-radius: 8px; border: 1px solid var(--border-color); }
.post-media video { max-width: 400px; border-radius: 8px; }

.reply-form {
  padding: 20px; border-top: 1px solid var(--border-color);
  background: rgba(255,255,255,0.01);
}
.reply-textarea {
  width: 100%; min-height: 100px; padding: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: white; font-size: 14px; outline: none;
  font-family: 'Inter', sans-serif; resize: vertical; transition: border-color 0.2s;
}
.reply-textarea:focus { border-color: rgba(255,26,26,0.3); }

/* ═══════════════════════════════════════════ */
/* MEMBERS PAGE */
/* ═══════════════════════════════════════════ */
.member-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.member-card:last-child { border-bottom: none; }
.member-card:hover { background: rgba(255,26,26,0.04); }
.member-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: white; flex-shrink: 0;
}
.member-info { flex: 1; }
.member-name { font-size: 14px; font-weight: 700; color: white; }
.member-role { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.member-joined { font-size: 11px; color: var(--text-muted); }
.member-stats { display: flex; gap: 16px; }

/* ═══════════════════════════════════════════ */
/* PROFILE PAGE */
/* ═══════════════════════════════════════════ */
.profile-banner {
  height: 180px; border-radius: 16px 16px 0 0;
  position: relative; overflow: hidden;
}
.profile-info {
  padding: 0 24px 24px; margin-top: -40px; position: relative;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  border: 4px solid var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: white;
}
.profile-name { font-size: 22px; font-weight: 900; margin-top: 12px; }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: 8px; line-height: 1.6; }

/* ═══════════════════════════════════════════ */
/* ADMIN PANEL */
/* ═══════════════════════════════════════════ */
.admin-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.admin-stat-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 20px; text-align: center;
}
.admin-stat-card .value { font-size: 28px; font-weight: 900; }
.admin-stat-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border-color);
  background: transparent; color: var(--text-secondary); font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: 0.06em; transition: all 0.2s;
}
.admin-tab:hover { border-color: var(--border-hover); color: white; }
.admin-tab.active {
  background: var(--accent-gradient); color: white; border-color: transparent;
  box-shadow: 0 4px 15px rgba(255,26,26,0.3);
}

.admin-table {
  width: 100%; border-collapse: collapse;
}
.admin-table th {
  padding: 12px 16px; text-align: left; font-size: 11px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
}
.admin-table td {
  padding: 12px 16px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}
.admin-table tr:hover td { background: rgba(255,26,26,0.03); }

.admin-action-btn {
  padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--border-color); background: transparent;
  color: var(--text-secondary); cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.2s; margin-right: 4px;
}
.admin-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-action-btn.danger { color: #ff1a1a; border-color: rgba(255,26,26,0.3); }
.admin-action-btn.danger:hover { background: rgba(255,26,26,0.1); }

/* ═══════════════════════════════════════════ */
/* VIP PAGE */
/* ═══════════════════════════════════════════ */
.vip-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.vip-plan-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 28px; text-align: center;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.vip-plan-card:hover {
  transform: translateY(-4px); border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.vip-plan-card.featured {
  border-color: rgba(255,215,0,0.3);
  box-shadow: 0 8px 30px rgba(255,215,0,0.1);
}
.vip-plan-name { font-size: 18px; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }
.vip-plan-price { font-size: 36px; font-weight: 900; margin: 16px 0; }
.vip-plan-price .currency { font-size: 16px; font-weight: 600; }
.vip-plan-features { list-style: none; margin: 20px 0; text-align: left; }
.vip-plan-features li {
  padding: 8px 0; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px;
}
.vip-plan-features li:last-child { border-bottom: none; }
.vip-plan-btn {
  width: 100%; padding: 12px; border-radius: 10px; border: none;
  font-weight: 800; font-size: 14px; cursor: pointer;
  font-family: 'Inter', sans-serif; text-transform: uppercase;
  letter-spacing: 0.08em; transition: all 0.2s;
}

/* ═══════════════════════════════════════════ */
/* SUPPORT */
/* ═══════════════════════════════════════════ */
.ticket-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.ticket-card:hover { background: rgba(255,26,26,0.03); }
.ticket-status {
  padding: 4px 10px; border-radius: 6px; font-size: 10px;
  font-weight: 800; text-transform: uppercase;
}
.ticket-status.open { background: rgba(76,175,80,0.15); color: #4caf50; }
.ticket-status.in_progress { background: rgba(33,150,243,0.15); color: #2196f3; }
.ticket-status.resolved { background: rgba(255,152,0,0.15); color: #ff9800; }
.ticket-status.closed { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ═══════════════════════════════════════════ */
/* MODAL */
/* ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
.modal {
  width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; box-shadow: 0 25px 80px rgba(0,0,0,0.8);
  animation: fadeInUp 0.3s ease;
}
.modal-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: none;
  color: var(--text-muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,26,26,0.1); color: #ff1a1a; }
.modal-body { padding: 24px; }

/* ═══════════════════════════════════════════ */
/* LOADING */
/* ═══════════════════════════════════════════ */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,26,26,0.15);
  border-top-color: #ff1a1a; border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading-text {
  font-size: 11px; font-weight: 900; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-top: 14px;
}

/* ═══════════════════════════════════════════ */
/* RESPONSIVE */
/* ═══════════════════════════════════════════ */
@media (max-width: 992px) {
  .main-grid { grid-template-columns: 1fr !important; }
  .sidebar { position: static !important; }
}
@media (max-width: 900px) {
  .nav-links { display: none !important; }
}
@media (max-width: 768px) {
  .page-container { padding: 0 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sub-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .sub-stat, .sub-last { display: none; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .vip-plans-grid { grid-template-columns: 1fr; }
  .thread-stats { display: none; }
  .thread-time { display: none; }
}

/* ═══════════════════════════════════════════ */
/* NEW TOPIC BUTTON */
/* ═══════════════════════════════════════════ */
.new-topic-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(255, 26, 26, 0.08);
  border: 1px solid rgba(255, 26, 26, 0.25);
  color: #ff1a1a; font-size: 10px; font-weight: 800;
  cursor: pointer; font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.new-topic-btn:hover {
  background: rgba(255, 26, 26, 0.18);
  border-color: rgba(255, 26, 26, 0.5);
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(255, 26, 26, 0.2);
}
.new-topic-btn:active { transform: scale(0.95); }

.new-topic-btn-large {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px;
  background: linear-gradient(135deg, #ff1a1a, #800000);
  border: none; color: white; font-size: 13px; font-weight: 800;
  cursor: pointer; font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: 0.06em;
  box-shadow: 0 4px 15px rgba(255, 26, 26, 0.3);
  transition: all 0.2s ease;
}
.new-topic-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 26, 26, 0.45);
}
.new-topic-btn-large:active { transform: translateY(0); }

select {
  color-scheme: dark;
}
select option {
  background: #111 !important; color: #e0e0e0 !important; padding: 8px 12px;
}
select option:checked, select option:hover {
  background: #ff1a1a !important; color: white !important;
}
