/* ═══════════════════════════════════════════
   SERVERSCAPE — STYLESHEET
   ═══════════════════════════════════════════ */

:root {
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --bg2: #13151c;
  --bg3: #1a1d27;
  --bg4: #222534;
  --border: #2a2d3e;
  --text: #e8eaf0;
  --text2: #9499b0;
  --text3: #5a5f7a;
  --accent: #6c63ff;
  --accent2: #8b85ff;
  --accent-glow: rgba(108,99,255,0.3);
  --danger: #ff4d6a;
  --success: #3dd68c;
  --rich-color: #f5c518;
  --vip-color: #a78bfa;
  --aura-color: #38bdf8;
  --discord-color: #5865f2;
  --telegram-color: #2aabee;
}

[data-theme="light"] {
  --bg: #f0f2f8;
  --bg2: #ffffff;
  --bg3: #e8eaf2;
  --bg4: #dde0ed;
  --border: #d0d4e8;
  --text: #1a1d2e;
  --text2: #4a4f6a;
  --text3: #8a8fa8;
  --accent: #6c63ff;
  --accent2: #4f46e5;
  --accent-glow: rgba(108,99,255,0.15);
  --danger: #e53e5a;
  --success: #22a36b;
  --rich-color: #d4a017;
  --vip-color: #7c3aed;
  --aura-color: #0284c7;
  --discord-color: #4752c4;
  --telegram-color: #1a8db8;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  width: 100%;
  transition: border var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--bg3); }

/* ─── ANNOUNCEMENT ───────────────────────────────── */
#announcementBanner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; font-size: 0.95rem; font-weight: 500; gap: 12px;
  animation: slideDown 0.3s ease; min-height: 52px;
}
.announcement-prefix {
  font-weight: 800; font-size: 1rem; white-space: nowrap; margin-right: 6px; letter-spacing: 0.5px;
}

@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

#announcementBanner.style-info { background: linear-gradient(90deg, #1e3a5f, #1a2d4a); border-bottom: 1px solid #2563eb; color: #93c5fd; }
#announcementBanner.style-warning { background: linear-gradient(90deg, #3d2e00, #2d2200); border-bottom: 1px solid #d97706; color: #fcd34d; }
#announcementBanner.style-success { background: linear-gradient(90deg, #062a1a, #041f13); border-bottom: 1px solid #059669; color: #6ee7b7; }
#announcementBanner.style-danger { background: linear-gradient(90deg, #3d0a14, #2d0710); border-bottom: 1px solid #dc2626; color: #fca5a5; }
#announcementBanner.style-promo { background: linear-gradient(90deg, #2d1b5e, #1e1040); border-bottom: 1px solid #7c3aed; color: #c4b5fd; }

.announcement-inner { display: flex; align-items: center; gap: 10px; flex: 1; }
.announcement-inner a { text-decoration: underline; font-weight: 700; }
.announcement-close { background: none; border: none; opacity: 0.6; font-size: 1rem; flex-shrink: 0; }
.announcement-close:hover { opacity: 1; }

/* ─── NAVBAR ─────────────────────────────────────── */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.4rem; color: var(--accent);
}

.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text2); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
}

.chat-btn {
  position: relative; background: var(--bg3); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text);
}

.chat-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 0.65rem; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ─── BUTTONS ────────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-block;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary.big { padding: 14px 36px; font-size: 1.05rem; border-radius: var(--radius); }

.btn-outline {
  background: transparent; color: var(--text);
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9rem;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition);
  display: inline-block;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-admin {
  background: linear-gradient(135deg, #f5c518, #e0a800);
  color: #000; padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.85rem;
}

.btn-danger {
  background: var(--danger); color: #fff;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; display: inline-block;
}
.btn-sm {
  padding: 5px 12px; font-size: 0.8rem; border-radius: 6px;
}

.full { width: 100%; }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  position: relative; padding: 100px 32px 80px; text-align: center; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--accent-glow), transparent);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700; margin-bottom: 16px; line-height: 1.1; min-height: 1.2em;
}

.cursor { animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero p { color: var(--text2); font-size: 1.1rem; margin-bottom: 36px; }

.search-bar {
  display: flex; max-width: 520px; margin: 0 auto;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 50px; overflow: hidden;
  padding: 4px 4px 4px 20px; gap: 8px; align-items: center;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input { flex: 1; background: none; border: none; padding: 8px 0; font-size: 1rem; color: var(--text); }
.search-bar button {
  background: var(--accent); color: #fff;
  padding: 10px 24px; border-radius: 40px; font-weight: 600; font-size: 0.95rem; flex-shrink: 0;
}

/* ─── CATEGORIES ─────────────────────────────────── */
.categories-section, .servers-section {
  padding: 0 32px 24px; max-width: 1200px; margin: 0 auto;
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }

.category-pills { display: flex; flex-wrap: wrap; gap: 10px; }

.pill {
  background: var(--bg3); border: 1.5px solid var(--border);
  color: var(--text2); padding: 8px 18px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 500; transition: all var(--transition);
}
.pill:hover, .pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── SERVER CAROUSEL ────────────────────────────── */
.servers-section { padding-bottom: 60px; }

.carousel-wrapper {
  position: relative; display: flex; align-items: center; gap: 12px;
}

.arrow {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg3); border: 1.5px solid var(--border);
  color: var(--text); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); z-index: 2;
}
.arrow:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.server-grid {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding: 8px 4px; flex: 1; scrollbar-width: none;
}
.server-grid::-webkit-scrollbar { display: none; }

/* ─── SERVER CARD ────────────────────────────────── */
.server-card {
  flex-shrink: 0; width: 280px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.server-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }

.server-card-img { width: 100%; height: 140px; object-fit: cover; }

.server-card-header {
  padding: 16px 16px 12px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}

.server-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; flex: 1; }

.verified-badge { color: #3b82f6; font-size: 0.9rem; }

.server-type-badge {
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px;
  border-radius: 4px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-discord { background: rgba(88,101,242,0.15); color: var(--discord-color); border: 1px solid var(--discord-color); }
.badge-telegram { background: rgba(42,171,238,0.15); color: var(--telegram-color); border: 1px solid var(--telegram-color); }

.server-card-desc { padding: 0 16px 12px; color: var(--text2); font-size: 0.88rem; line-height: 1.5; }
.server-card-category { padding: 0 16px 12px; font-size: 0.8rem; color: var(--accent); font-weight: 500; }

.server-card-embed {
  margin: 0 16px 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-left: 3px solid var(--discord-color);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 0.82rem; color: var(--text2);
}

.server-card-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.server-card-footer button {
  display: block; width: 100%; background: var(--accent); color: #fff;
  text-align: center; padding: 9px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
}

.empty-state { text-align: center; color: var(--text3); padding: 60px 0; font-size: 1rem; }

/* ─── SERVER MODAL ───────────────────────────────── */
.modal-large { max-width: 560px !important; }
.server-modal-img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.server-modal-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.server-modal-desc { color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.server-modal-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.server-modal-embed {
  background: var(--bg3); border: 1px solid var(--border);
  border-left: 4px solid var(--discord-color);
  border-radius: 8px; padding: 14px; margin-bottom: 20px;
}
.server-join-btn {
  display: block; width: 100%; background: var(--accent); color: #fff;
  text-align: center; padding: 12px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem;
}

/* ─── PAGE CONTAINER ─────────────────────────────── */
.page-container { max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
.page-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 32px; }

/* ─── MEMBERS ────────────────────────────────────── */
.role-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }

.role-tab {
  padding: 8px 20px; border-radius: 50px; font-weight: 600; font-size: 0.88rem;
  border: 2px solid var(--border); color: var(--text2); transition: all var(--transition);
}
.role-tab.active, .role-tab:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.role-tab.aura.active, .role-tab.aura:hover { background: var(--aura-color); border-color: var(--aura-color); }
.role-tab.rich.active, .role-tab.rich:hover { background: var(--rich-color); border-color: var(--rich-color); color: #000; }
.role-tab.vip.active, .role-tab.vip:hover { background: var(--vip-color); border-color: var(--vip-color); }
.role-tab.member.active, .role-tab.member:hover { background: var(--bg4); border-color: var(--text3); color: var(--text); }

.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.member-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: transform var(--transition);
}
.member-card:hover { transform: translateY(-3px); }

/* ─── MEMBER BANNERS ─────────────────────────────── */
.member-banner {
  height: 72px; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  position: relative; overflow: hidden;
}

/* VIP Banner - Crown + Gold */
.banner-vip {
  background: linear-gradient(135deg, #b8860b 0%, #ffd700 50%, #b8860b 100%);
  color: #000;
  background-size: 200% 200%;
  animation: vipShimmer 3s ease infinite;
}
@keyframes vipShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.banner-vip::after {
  content: '👑'; position: absolute; font-size: 2rem;
  opacity: 0.2; right: 8px; top: 50%; transform: translateY(-50%);
}

/* Aura Farmer Banner - Lightning */
.banner-aura {
  background: linear-gradient(135deg, #0c1445 0%, #1a237e 50%, #0d47a1 100%);
  color: #38bdf8;
  background-size: 200% 200%;
  animation: auraShift 4s ease infinite;
}
@keyframes auraShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.banner-aura::before {
  content: '⚡'; position: absolute; font-size: 2rem;
  opacity: 0.25; left: 8px; top: 50%; transform: translateY(-50%);
  animation: lightning 2s ease-in-out infinite;
}
.banner-aura::after {
  content: '⚡'; position: absolute; font-size: 1.4rem;
  opacity: 0.2; right: 8px; top: 50%; transform: translateY(-50%);
  animation: lightning 2s ease-in-out 1s infinite;
}
@keyframes lightning { 0%,100% { opacity: 0.15; } 50% { opacity: 0.5; } }

/* RICH Banner - Money */
.banner-rich {
  background: linear-gradient(135deg, #1a2e05 0%, #2d5a0e 50%, #1a2e05 100%);
  color: #4ade80;
  background-size: 200% 200%;
  animation: richFlow 3s ease infinite;
}
@keyframes richFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.banner-rich::before {
  content: '💵'; position: absolute; font-size: 1.5rem;
  opacity: 0.3; left: 6px; top: 50%; transform: translateY(-50%);
  animation: moneyFloat 2s ease-in-out infinite;
}
.banner-rich::after {
  content: '💵'; position: absolute; font-size: 1.2rem;
  opacity: 0.25; right: 6px; top: 50%; transform: translateY(-50%);
  animation: moneyFloat 2s ease-in-out 0.7s infinite;
}
@keyframes moneyFloat { 0%,100% { transform: translateY(-50%) rotate(-5deg); } 50% { transform: translateY(-60%) rotate(5deg); } }

.banner-owner { background: linear-gradient(135deg, #f5c518, #e0a800); color: #000; }
.banner-admin { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; }
.banner-member { background: var(--bg3); color: var(--text3); }
.banner-custom { background: linear-gradient(135deg, var(--accent), #9333ea); color: #fff; }
.banner-custom-img { color: #fff; }

/* ─── NAME EFFECTS ───────────────────────────────── */
.username-styled { position: relative; display: inline-block; }
.username-rainbow {
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #a855f7);
  background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: rainbowText 3s linear infinite;
}
@keyframes rainbowText { to { background-position: 200% center; } }

.name-effect-dots, .name-effect-money, .name-effect-stars, .name-effect-fire, .name-effect-crowns {
  position: absolute; top: -14px; left: 0; right: 0;
  display: flex; justify-content: space-around; pointer-events: none;
  animation: floatUp 2s ease-in-out infinite;
  font-size: 0.65rem;
}
.name-effect-dots span, .name-effect-stars span { color: var(--accent); animation: floatBounce 1.5s ease-in-out infinite; }
.name-effect-dots span:nth-child(2), .name-effect-stars span:nth-child(2) { animation-delay: 0.3s; }
.name-effect-dots span:nth-child(3), .name-effect-stars span:nth-child(3) { animation-delay: 0.6s; }
.name-effect-money span, .name-effect-fire span, .name-effect-crowns span { animation: floatBounce 1.8s ease-in-out infinite; }
.name-effect-money span:nth-child(2), .name-effect-fire span:nth-child(2), .name-effect-crowns span:nth-child(2) { animation-delay: 0.5s; }
@keyframes floatBounce { 0%,100% { transform: translateY(0); opacity:0.8; } 50% { transform: translateY(-4px); opacity:1; } }

.member-username-wrap { margin-bottom: 2px; }

.member-info { padding: 14px; }
.member-username { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.member-num { color: var(--text3); font-size: 0.8rem; }

/* ─── USERNAME EFFECTS ───────────────────────────── */
.username-vip { color: var(--rich-color); }
.username-vip::before { content: '👑 '; }

.username-aura {
  background: linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: auraText 3s linear infinite;
}
@keyframes auraText { to { background-position: 200% center; } }

.username-rich { color: #4ade80; }
.username-rich::before { content: '💰 '; }
.username-rich::after { content: ' 💰'; }

/* ─── MEMBER BADGES ──────────────────────────────── */
.badge-pill {
  display: inline-block; margin: 4px 3px 0 0;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-vip { background: rgba(245,197,24,0.15); color: var(--rich-color); border: 1px solid var(--rich-color); }
.badge-aura-farmer { background: rgba(56,189,248,0.15); color: var(--aura-color); border: 1px solid var(--aura-color); }
.badge-rich { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid #4ade80; }
.badge-owner { background: rgba(245,197,24,0.15); color: var(--rich-color); border: 1px solid var(--rich-color); }
.badge-custom-banner { background: rgba(108,99,255,0.15); color: var(--accent); border: 1px solid var(--accent); }
.badge-member { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

/* ─── HOA ────────────────────────────────────────── */
.hoa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.hoa-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hoa-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
.hoa-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.hoa-card p { color: var(--text2); font-size: 0.9rem; line-height: 1.5; }
.hoa-card-date { font-size: 0.78rem; color: var(--text3); margin-top: 12px; }

.hoa-post-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.hoa-post-content {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  line-height: 1.8; color: var(--text2); margin-bottom: 32px;
}

.comments-section h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 16px; }

.comment {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px;
}
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-content { color: var(--text2); font-size: 0.9rem; line-height: 1.5; }
.comment-date { font-size: 0.75rem; color: var(--text3); }

.comment-form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.comment-form textarea { min-height: 80px; resize: vertical; }

/* ─── WOGM ───────────────────────────────────────── */
.wogm-section { margin-bottom: 36px; }
.wogm-section-title {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.wogm-section-title.harmful { border-color: #ef4444; color: #ef4444; }
.wogm-section-title.scary { border-color: #f97316; color: #f97316; }
.wogm-section-title.harmless { border-color: #22c55e; color: #22c55e; }
.wogm-section-title.wannabe { border-color: var(--text3); color: var(--text3); }

.wogm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

.wogm-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.wogm-card-name { font-weight: 700; margin-bottom: 6px; }
.wogm-card-rank {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px;
}
.rank-harmful { color: #ef4444; }
.rank-scary { color: #f97316; }
.rank-harmless { color: #22c55e; }
.rank-wannabe { color: var(--text3); }

/* ─── CHATS ──────────────────────────────────────── */
.chat-actions { margin-bottom: 20px; }
.chat-filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.chats-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; height: 600px; }

.chat-list {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow-y: auto;
}

.chat-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
}
.chat-item:hover, .chat-item.active { background: var(--bg3); }
.chat-item-type {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent); margin-bottom: 4px;
}
.chat-item-subject { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.chat-item-meta { font-size: 0.75rem; color: var(--text3); }
.chat-item-status {
  display: inline-block; padding: 2px 8px; border-radius: 50px;
  font-size: 0.7rem; font-weight: 700; margin-top: 4px;
}
.status-open { background: rgba(61,214,140,0.15); color: var(--success); }
.status-closed { background: rgba(255,77,106,0.15); color: var(--danger); }

.chat-window {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column;
}

.chat-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text3); }

.chat-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header-title { font-weight: 700; }
.chat-header-actions { display: flex; gap: 8px; }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.chat-message { max-width: 75%; }
.chat-message.mine { align-self: flex-end; }
.chat-message.theirs { align-self: flex-start; }

.chat-message-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; line-height: 1.5;
}
.mine .chat-message-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.theirs .chat-message-bubble { background: var(--bg3); color: var(--text); border-bottom-left-radius: 4px; }

.chat-message-meta { font-size: 0.72rem; color: var(--text3); margin-top: 4px; }
.mine .chat-message-meta { text-align: right; }

.chat-input-area {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input-area textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; padding: 10px 14px; }
.chat-send-btn {
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 600; flex-shrink: 0; height: 42px;
}

/* ─── SUPPORT ────────────────────────────────────── */
.centered { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.support-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 60px 48px; text-align: center; max-width: 500px; width: 100%;
}
.support-icon { font-size: 3rem; margin-bottom: 20px; }
.support-card h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.support-card p { color: var(--text2); line-height: 1.6; margin-bottom: 28px; }
.small-note { font-size: 0.82rem; color: var(--text3); margin-top: 12px; margin-bottom: 0; }

/* ─── TOS ────────────────────────────────────────── */
.tos-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 48px; max-width: 780px;
}
.tos-card h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.tos-card h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 28px 0 8px; color: var(--accent); }
.tos-card p { color: var(--text2); line-height: 1.7; font-size: 0.95rem; }
.tos-card hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.last-updated { font-size: 0.82rem; color: var(--text3); margin-bottom: 28px; }
.refund-banner {
  background: rgba(255,77,106,0.1); border: 1.5px solid var(--danger);
  color: var(--danger); padding: 14px 20px; border-radius: var(--radius-sm);
  font-weight: 700; margin: 16px 0;
}

/* ─── ADMIN ──────────────────────────────────────── */
.admin-tabs {
  display: flex; gap: 8px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border); padding-bottom: 0; flex-wrap: wrap;
}
.admin-tab {
  padding: 10px 24px; font-weight: 600; font-size: 0.92rem; color: var(--text2);
  border-bottom: 2px solid transparent; transition: all var(--transition); margin-bottom: -1px;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-form-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.admin-form-card h3 { font-family: var(--font-display); font-weight: 700; margin-bottom: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-item {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-name { font-weight: 600; font-size: 0.95rem; }
.admin-item-meta { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }
.admin-item-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

.user-label {
  font-size: 0.88rem; font-weight: 600; color: var(--text2);
  padding: 4px 10px; background: var(--bg3);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}

/* ─── MODALS ─────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 36px; width: 100%; max-width: 420px;
  position: relative; display: flex; flex-direction: column; gap: 14px;
  max-height: 90vh; overflow-y: auto;
}

.modal h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-bottom: 4px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg3); color: var(--text2); font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg4); }

.form-error { color: var(--danger); font-size: 0.85rem; min-height: 18px; }
.modal-switch { text-align: center; font-size: 0.88rem; color: var(--text2); }
.modal-switch a { color: var(--accent); font-weight: 600; }

/* ─── SERVER TAGS ────────────────────────────────── */
.server-tags { padding: 0 16px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.server-tag {
  background: rgba(108,99,255,0.12); color: var(--accent);
  border: 1px solid rgba(108,99,255,0.3);
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
}
.tag-pill {
  font-size: 0.8rem; padding: 5px 14px;
  background: var(--bg3); border: 1.5px solid var(--border); color: var(--text3);
}
.tag-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── DISCORD WIDGET ─────────────────────────────── */
.discord-widget {
  width: 100%; height: 180px; border: none;
  border-radius: 0; display: block;
}
.discord-widget-modal {
  height: 220px; border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* ─── MEMBER AVATAR ──────────────────────────────── */
.member-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg2); position: absolute; bottom: -24px; left: 12px;
}
.member-avatar-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700;
  border: 3px solid var(--bg2); position: absolute; bottom: -24px; left: 12px;
}
.member-banner { position: relative; }
.member-info { padding: 30px 14px 14px; }

/* ─── SETTINGS / PROFILE ─────────────────────────── */
.settings-label {
  font-size: 0.85rem; color: var(--text2); font-weight: 600;
  display: block; margin-bottom: 6px;
}

.upload-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--bg3); display: flex; flex-direction: column; align-items: center;
  font-size: 0.88rem; color: var(--text2);
}
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
  border-color: var(--accent); background: rgba(108,99,255,0.07);
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 60px 16px 40px; }
  .categories-section, .servers-section { padding-left: 16px; padding-right: 16px; }
  .page-container { padding: 32px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .chats-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { height: 200px; }
  .chat-window { height: 400px; }
  .tos-card { padding: 28px 20px; }
  .support-card { padding: 40px 24px; }
}
