/* ===================================================
   FoxHub — style.css
   Theme: Dark Cyberpunk/Gaming, Fox Orange Accent
   =================================================== */

/* ---- CSS VARIABLES ---- */
:root {
  --bg:          #0a0b10;
  --bg2:         #111318;
  --bg3:         #181b24;
  --bg4:         #1e2230;
  --border:      #2a2f40;
  --accent:      #ff6b35;
  --accent2:     #ff9a5c;
  --accent-glow: rgba(255,107,53,0.25);
  --blue:        #4f8ef7;
  --green:       #3ecf8e;
  --red:         #ff4f6a;
  --yellow:      #f5c518;
  --text:        #e8eaf0;
  --text2:       #9aa3b8;
  --text3:       #5c6480;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --transition:  0.2s ease;
  --font-main:   'Nunito', sans-serif;
  --font-display:'Rajdhani', sans-serif;
  --font-code:   'JetBrains Mono', monospace;
  --header-h:    62px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { cursor: pointer; color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-main); }
input, textarea, select {
  font-family: var(--font-main);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  transition: border var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; }
select option { background: var(--bg3); }
img { max-width: 100%; }
ul { list-style: none; }
.hidden { display: none !important; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* ---- BUTTONS ---- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e85d2a);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
  background: linear-gradient(135deg, var(--accent2), var(--accent));
}
.btn-primary.large { padding: 14px 32px; font-size: 16px; }
.btn-primary.full { width: 100%; justify-content: center; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.btn-ghost.large { padding: 14px 32px; font-size: 16px; }

.btn-danger {
  background: var(--red);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-danger:hover { background: #e0334f; transform: translateY(-1px); }

.btn-sm { padding: 6px 14px !important; font-size: 12px !important; }
.btn-green { background: var(--green) !important; }
.btn-blue { background: var(--blue) !important; }
.icon-btn {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.text-red { color: var(--red) !important; }

/* ---- HEADER ---- */
#main-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(10,11,16,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-fox { font-size: 26px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.logo-accent { color: var(--accent); }
.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-link {
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  cursor: pointer;
}
.nav-link:hover { color: var(--accent); background: var(--accent-glow); }
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar input {
  width: 220px;
  padding: 8px 40px 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
}
.search-bar button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 14px;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 1000;
  box-shadow: var(--shadow);
  max-height: 400px;
  overflow-y: auto;
}
.search-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-item:hover { background: var(--bg4); }
.search-item-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-glow); display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:14px;flex-shrink:0; }
.search-item-info { flex: 1; }
.search-item-name { font-weight: 600; font-size: 13px; }
.search-item-type { font-size: 11px; color: var(--text3); }
.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 600;
}
.user-avatar-wrap:hover { border-color: var(--accent); }
.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.user-dropdown {
  position: absolute;
  top: calc(var(--header-h) - 4px);
  right: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition);
  cursor: pointer;
}
.user-dropdown a:hover { background: var(--bg4); color: var(--accent); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); }
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- PAGES ---- */
#main-content { max-width: 1300px; margin: 0 auto; padding: 30px 24px; }
.page { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { display:flex;align-items:center;gap:10px; }
.page-header h1 i { color: var(--accent); }

/* ---- HERO ---- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 60px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  margin-bottom: 50px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-particles { position:absolute;inset:0;pointer-events:none;overflow:hidden; }
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(100%) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
.hero-content { flex: 1; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-title {
  font-size: 5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 14px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  color: var(--text2);
  font-size: 1.1rem;
  margin-bottom: 28px;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 30px;
}
.stat { text-align: center; }
.stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
}
.stat label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.hero-visual { flex-shrink: 0; position: relative; z-index: 1; }
.code-float {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,107,53,0.1);
  animation: floatAnim 4s ease-in-out infinite;
}
@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.code-header {
  background: var(--bg4);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-code);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-preview {
  padding: 20px;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text2);
}
.code-preview .kw { color: #ff7de4; }
.code-preview .fn { color: var(--text3); font-style: italic; }
.code-preview .str { color: var(--green); }

/* ---- SECTIONS ---- */
.section { margin-bottom: 50px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 { display:flex;align-items:center;gap:10px; }
.section-header h2 i { color: var(--accent); }
.see-all { font-size: 13px; color: var(--accent); font-weight: 600; display:flex;align-items:center;gap:6px; }
.see-all:hover { gap: 10px; }

/* ---- SCRIPTS GRID ---- */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.script-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.script-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.script-card-thumb {
  height: 140px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.script-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.script-card-thumb-icon { font-size: 40px; opacity: 0.3; }
.script-card-body { padding: 16px; flex: 1; }
.script-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.script-card-game { font-size: 12px; color: var(--accent); margin-bottom: 8px; display:flex;align-items:center;gap:4px; }
.script-card-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.script-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tag {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 600;
}
.tag.accent { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.script-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.script-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}
.script-card-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.script-stats { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text3); }
.script-stats span { display:flex;align-items:center;gap:3px; }

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar select { width: auto; }

/* ---- SCRIPT DETAIL ---- */
.script-detail { }
.script-detail-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.script-detail-hero {
  height: 220px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.script-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.script-detail-info { padding: 24px; }
.script-detail-info h1 { margin-bottom: 8px; }
.script-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text2);
}
.script-detail-actions { display:flex;gap:10px;flex-wrap:wrap; }
.script-detail-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}
.code-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.code-block-header {
  background: var(--bg3);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--text3);
}
.code-block pre {
  padding: 20px;
  font-family: var(--font-code);
  font-size: 13px;
  color: #a8b2d0;
  line-height: 1.7;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.comments-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
}
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-header { display:flex;align-items:center;gap:10px;margin-bottom:8px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-author { font-weight: 700; font-size: 13px; }
.comment-date { font-size: 11px; color: var(--text3); }
.comment-text { font-size: 14px; color: var(--text2); }
.comment-input-wrap { display:flex;gap:10px;margin-top:14px; }
.comment-input-wrap input { flex: 1; }

/* ---- INJECTORS ---- */
.injectors-tabs { display:flex;gap:8px;margin-bottom:24px; }
.injectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.injector-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}
.injector-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.injector-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent);
}
.injector-card h3 { font-size: 1.2rem; }
.injector-card p { color: var(--text2); font-size: 14px; line-height: 1.5; flex: 1; }
.injector-badges { display:flex;gap:6px;flex-wrap:wrap; }
.badge-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
}
.badge-tag.green { background: rgba(62,207,142,0.15); border-color: var(--green); color: var(--green); }
.badge-tag.blue { background: rgba(79,142,247,0.15); border-color: var(--blue); color: var(--blue); }
.badge-tag.yellow { background: rgba(245,197,24,0.15); border-color: var(--yellow); color: var(--yellow); }

/* ---- TAB BUTTONS ---- */
.tab-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-btn:hover, .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- COMMUNITIES ---- */
.communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.community-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}
.community-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.community-banner {
  height: 90px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  overflow: hidden;
}
.community-banner img { width: 100%; height: 100%; object-fit: cover; }
.community-card-body { padding: 16px; }
.community-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -28px;
  margin-bottom: 10px;
}
.community-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 3px solid var(--bg2);
  object-fit: cover;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.community-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.community-card-desc { font-size: 13px; color: var(--text2); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.community-members { font-size: 12px; color: var(--text3); display:flex;align-items:center;gap:4px; }

/* ---- COMMUNITY DETAIL ---- */
.community-detail-banner {
  height: 200px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.community-detail-banner img { width: 100%; height: 100%; object-fit: cover; }
.community-detail-info {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.community-detail-avatar {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 3px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.community-detail-text { flex: 1; }
.community-detail-name { font-size: 2rem; margin-bottom: 4px; }
.community-detail-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:10px; }
.community-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}
.community-sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.community-main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.community-post {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.community-roles h4, .community-members-list h4 {
  font-size: 0.85rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.role-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.member-item:last-child { border-bottom: none; }
.member-item img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.member-name { flex: 1; font-weight: 600; }
.member-role { font-size: 11px; color: var(--text3); }

/* ---- FORUM ---- */
.forum-list { display:flex;flex-direction:column;gap:10px; }
.forum-topic {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}
.forum-topic:hover { border-color: var(--accent); background: var(--bg3); }
.forum-topic-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
}
.forum-topic-info { flex: 1; }
.forum-topic-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.forum-topic-meta { font-size: 12px; color: var(--text3); display:flex;align-items:center;gap:10px; }
.forum-topic-stats { display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:12px;color:var(--text3); }

/* ---- RULES & FAQ ---- */
.rules-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  line-height: 1.9;
  color: var(--text2);
  white-space: pre-wrap;
  font-size: 15px;
}
.faq-list { display:flex;flex-direction:column;gap:10px; }
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg3); }
.faq-question i { color: var(--accent); transition: transform var(--transition); }
.faq-question.open i { transform: rotate(180deg); }
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  color: var(--text2);
  font-size: 14px;
}
.faq-answer.open { max-height: 300px; padding: 0 20px 16px; }

/* ---- COMPLAINTS ---- */
.complaints-wrap { display:grid;grid-template-columns:1fr 1fr;gap:24px; }
.complaint-form-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.complaint-form-box h3 { margin-bottom: 20px; font-size: 1.2rem; }
.my-complaints { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.complaint-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.complaint-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.status-pending { background: rgba(245,197,24,0.15); color: var(--yellow); }
.status-resolved { background: rgba(62,207,142,0.15); color: var(--green); }
.status-rejected { background: rgba(255,79,106,0.15); color: var(--red); }

/* ---- MESSAGES ---- */
.messages-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - var(--header-h) - 100px);
  min-height: 500px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.conversations-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.conv-search { padding: 14px; border-bottom: 1px solid var(--border); }
.conv-search input { padding: 8px 12px; }
.conv-item {
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
}
.conv-item:hover, .conv-item.active { background: var(--bg3); }
.conv-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-info { flex: 1; overflow: hidden; }
.conv-name { font-weight: 700; font-size: 14px; }
.conv-preview { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-area {
  display: flex;
  flex-direction: column;
}
.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text3);
}
.chat-placeholder i { font-size: 48px; }
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
}
.chat-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chat-header-name { font-weight: 700; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  display: flex;
  gap: 10px;
  max-width: 70%;
}
.msg.own { flex-direction: row-reverse; align-self: flex-end; }
.msg img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 4px; }
.msg-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.msg.own .msg-bubble {
  background: linear-gradient(135deg, var(--accent), #e85d2a);
  color: #fff;
  border-color: transparent;
}
.msg-time { font-size: 10px; color: var(--text3); margin-top: 4px; text-align: right; }
.chat-input-wrap {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.chat-input-wrap input { flex: 1; }

/* ---- PROFILE ---- */
.profile-banner {
  height: 200px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-info-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  margin-top: -50px;
}
.profile-text { flex: 1; }
.profile-username {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.verify-badge {
  background: linear-gradient(135deg, var(--blue), #3570d4);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.badge-item {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 16px;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  title: attr(data-title);
}
.profile-actions { display:flex;gap:10px;margin-top:12px;flex-wrap:wrap; }
.profile-tabs { display:flex;gap:8px;margin-bottom:20px; }
.profile-content-area { }

/* ---- ADMIN PANEL ---- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.admin-card.accent { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
.admin-card.wide { grid-column: 1 / -1; }
.admin-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 16px; display:flex;align-items:center;gap:8px; }
.admin-card h3 i { color: var(--accent); }
.admin-stats { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.admin-stat {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.admin-stat span { display:block;font-family:var(--font-display);font-size:1.8rem;font-weight:900;color:var(--accent); }
.admin-stat label { font-size: 12px; color: var(--text3); }
.admin-note { font-size: 13px; color: var(--text3); margin-top: 8px; }
.toggle-wrap { display:flex;align-items:center;gap:12px; }
.toggle { position:relative;display:inline-block;width:44px;height:24px; }
.toggle input { opacity:0;width:0;height:0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg4);
  border-radius: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text3);
  border-radius: 50%;
  transition: var(--transition);
}
input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }
.admin-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.admin-user-item:last-child { border-bottom: none; }
.admin-user-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.admin-user-actions { display:flex;gap:6px;margin-left:auto; }
.admin-faq-item { margin-bottom: 12px; }
.admin-faq-item input { margin-bottom: 6px; }
.admin-verify-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.admin-verify-item:last-child { border-bottom: none; }
.verify-actions { display:flex;gap:6px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display:block;font-size:13px;font-weight:700;margin-bottom:6px;color:var(--text2); }
.form-error {
  background: rgba(255,79,106,0.1);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
}
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-top: 10px; border: 2px solid var(--accent); }
.banner-preview { width: 100%; height: 100px; object-fit: cover; margin-top: 10px; border-radius: var(--radius); border: 1px solid var(--border); }
.code-textarea { font-family: var(--font-code); font-size: 13px; background: var(--bg); }
.tags-selector { display:flex;flex-wrap:wrap;gap:8px; }
.tag-option {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.tag-option.selected { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* ---- AUTH MODAL ---- */
.auth-logo { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; text-align: center; margin-bottom: 20px; }
.auth-logo .logo-fox { font-size: 28px; }
.auth-switch { font-size: 13px; color: var(--text3); text-align: center; margin-top: 12px; }
.auth-switch a { color: var(--accent); font-weight: 700; cursor: pointer; }

/* ---- MODALS ---- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-content.large { max-width: 640px; }
.modal-content h2 { margin-bottom: 24px; display:flex;align-items:center;gap:10px; }
.modal-content h2 i { color: var(--accent); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ---- INFO BANNER ---- */
.info-banner {
  background: rgba(79,142,247,0.1);
  border: 1px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  color: var(--text2);
  font-size: 14px;
  white-space: pre-wrap;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.info { border-color: var(--accent); color: var(--accent); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ---- OFFLINE OVERLAY ---- */
#offline-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.offline-box { text-align: center; }
.offline-fox { font-size: 80px; margin-bottom: 16px; }
#offline-overlay h1 { font-size: 2.5rem; margin-bottom: 10px; }
#offline-overlay p { color: var(--text2); margin-bottom: 6px; }
.offline-sub { font-size: 13px; color: var(--text3); }
#offline-overlay .btn-primary { margin-top: 20px; }

/* ---- SEARCH PAGE ---- */
.search-tabs { display:flex;gap:8px;margin-bottom:24px; }
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.user-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.user-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.user-card img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); margin-bottom: 10px; }
.user-card-name { font-weight: 700; font-family: var(--font-display); }
.user-card-info { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ---- CLICKABLE LINKS ---- */
.auto-link { color: var(--blue); text-decoration: underline; word-break: break-all; }
.auto-link:hover { color: var(--accent2); }

/* ---- COMMUNITY POST FORM ---- */
.post-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.post-form img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-form-inner { flex: 1; }
.post-form textarea { margin-bottom: 10px; }

/* ---- MISC ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; color: var(--text3); }
.separator { height: 1px; background: var(--border); margin: 16px 0; }
.likes-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  cursor: pointer;
}
.likes-btn:hover, .likes-btn.liked { background: rgba(255,79,106,0.1); border-color: var(--red); color: var(--red); }
.copy-btn {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.ver-badge { display:inline-flex;align-items:center;gap:3px;background:rgba(79,142,247,0.15);border:1px solid var(--blue);color:var(--blue);font-size:11px;padding:2px 8px;border-radius:20px;font-weight:700; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .main-nav { display:none; }
  .hero { flex-direction: column; padding: 36px 24px; }
  .hero-visual { width: 100%; }
  .code-float { width: 100%; }
  .hero-title { font-size: 3.5rem; }
  .script-detail-body { grid-template-columns: 1fr; }
  .community-layout { grid-template-columns: 1fr; }
  .complaints-wrap { grid-template-columns: 1fr; }
  .messages-wrap { grid-template-columns: 1fr; height: auto; }
  .conversations-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 250px; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2.5rem; }
  .header-inner { padding: 0 14px; gap: 10px; }
  .search-bar input { width: 130px; }
  #main-content { padding: 20px 14px; }
  .modal-content { padding: 24px 18px; }
  .scripts-grid, .communities-grid { grid-template-columns: 1fr; }
}