* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1e88ff;
  --primary-dark: #0d6efd;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a1f36;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #22c55e;
}
body { font-family: 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Header */
.hero {
  height: 340px;
  background: linear-gradient(rgba(10,20,40,0.35), rgba(10,20,40,0.35)),
    url('https://images.unsplash.com/photo-1587573089734-599a5787a3d5?w=1920&q=80') center/cover;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: #fff;
}
.hero-logo {
  width: 140px; height: 140px; border-radius: 50%;
  background: linear-gradient(135deg, #1e88ff, #0d6efd);
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; font-weight: bold; color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.hero-info { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.35); padding: 12px 20px; border-radius: 10px; backdrop-filter: blur(6px); }
.hero-info.left { left: 5%; }
.hero-info.right { right: 5%; }
.hero-info .icon { font-size: 28px; }
.hero-info .label { font-size: 12px; opacity: 0.8; }
.hero-info .value { font-weight: bold; font-size: 15px; letter-spacing: 0.5px; }

/* Nav */
.navbar {
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.nav-links { display: flex; gap: 10px; }
.nav-links a {
  padding: 20px 18px; display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav-auth { display: flex; align-items: center; gap: 12px; }
.btn { padding: 9px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; font-size: 14px; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Container */
.container { max-width: 1280px; margin: 30px auto; padding: 0 20px; }
.breadcrumb { color: var(--muted); font-size: 14px; margin-bottom: 20px; background: #fff; padding: 15px 20px; border-radius: 8px; border: 1px solid var(--border); }
.breadcrumb a { color: var(--primary); }

.layout { display: grid; grid-template-columns: 1fr 340px; gap: 25px; }
h1.page-title { font-size: 24px; margin-bottom: 20px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.blog-card { display: grid; grid-template-columns: 260px 1fr; gap: 20px; overflow: hidden; padding: 0; }
.blog-card img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.blog-body { padding: 20px; display: flex; flex-direction: column; }
.blog-tag { color: var(--primary); font-weight: 600; font-size: 13px; }
.blog-body h3 { margin: 8px 0 10px; }
.blog-body p { color: var(--muted); font-size: 14px; flex: 1; }
.blog-body .btn { align-self: flex-end; margin-top: 15px; }

/* Sidebar */
.sidebar-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.discord-header { background: #5865F2; color: #fff; padding: 20px; display: flex; align-items: center; gap: 12px; }
.discord-header .icon { font-size: 28px; }
.discord-body { padding: 15px; max-height: 380px; overflow-y: auto; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #1e88ff, #6b46ff); flex-shrink: 0; }
.discord-footer { padding: 15px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

.donor-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.donor-row:last-child { border: 0; }
.donor-row .name { display: flex; align-items: center; gap: 10px; }
.donor-row .amount { color: var(--success); font-weight: 600; }

/* Store */
.category-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
.category-tabs button { padding: 10px 20px; background: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 500; }
.category-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: 0.2s; }
.product:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.product-img { height: 160px; background: linear-gradient(135deg, #0d6efd, #6b46ff); display: flex; align-items: center; justify-content: center; font-size: 60px; }
.product-body { padding: 15px; }
.product-body h4 { margin-bottom: 8px; }
.product-body .price { color: var(--primary); font-weight: bold; font-size: 20px; margin: 10px 0; }
.product-body .btn { width: 100%; justify-content: center; }

/* Forum */
.forum-cat { display: flex; align-items: center; padding: 18px; border-bottom: 1px solid var(--border); }
.forum-cat:last-child { border: 0; }
.forum-icon { width: 45px; height: 45px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-right: 15px; font-size: 20px; }
.forum-cat-body { flex: 1; }
.forum-cat-body h4 { margin-bottom: 3px; }
.forum-cat-body p { color: var(--muted); font-size: 13px; }
.forum-stats { text-align: right; font-size: 13px; color: var(--muted); }

/* Auth */
.auth-wrap { max-width: 440px; margin: 60px auto; }
.auth-wrap .card { padding: 35px; }
.auth-wrap h2 { text-align: center; margin-bottom: 25px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }

/* Footer */
footer { background: #0f1729; color: #cbd5e1; padding: 50px 20px 20px; margin-top: 60px; }
.footer-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; margin-bottom: 15px; }
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 5px 0; font-size: 14px; }
.footer-grid a:hover { color: var(--primary); }
.copyright { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid #1f2937; font-size: 13px; color: #64748b; }

/* Help */
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 16px 20px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; }
.faq-a { padding: 0 20px 16px; color: var(--muted); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q span:last-child { transform: rotate(180deg); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .blog-card { grid-template-columns: 1fr; }
  .hero-info { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { overflow-x: auto; }
  .navbar { padding: 0 15px; }
}

/* Auth & role badges */
.user-chip { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; background:#f1f5f9; border-radius:20px; font-size:13px; font-weight:600; }
.role { font-size:10px; padding:2px 6px; border-radius:4px; text-transform:uppercase; letter-spacing:.5px; color:#fff; }
.role-founder { background:linear-gradient(135deg,#dc2626,#f97316); }
.role-admin   { background:linear-gradient(135deg,#7c3aed,#ec4899); }
.role-member  { background:#64748b; }
.alert { background:#fef2f2; color:#dc2626; padding:10px 14px; border-radius:6px; margin-bottom:15px; font-size:14px; border:1px solid #fecaca; }

/* Server sidebar */
.server-card { padding:0; overflow:hidden; }
.server-head { padding:16px; background:linear-gradient(135deg,#059669,#10b981); color:#fff; display:flex; align-items:center; gap:12px; }
.pulse { width:12px; height:12px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 0 rgba(74,222,128,.7); animation:pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.7)} 70%{box-shadow:0 0 0 10px rgba(74,222,128,0)} 100%{box-shadow:0 0 0 0 rgba(74,222,128,0)} }
.server-body { padding:16px; }
.ip-row { display:flex; justify-content:space-between; align-items:center; padding:12px; background:#f8fafc; border-radius:8px; margin-bottom:12px; }
.ip-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; text-align:center; font-size:12px; }
.ip-stats > div { padding:8px; background:#f8fafc; border-radius:6px; }
.ip-stats span { display:block; color:var(--muted); font-size:11px; }
.ip-stats b { font-size:14px; }

/* Tickets */
.ticket-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.badge { display:inline-block; padding:3px 8px; border-radius:4px; font-size:11px; font-weight:600; text-transform:uppercase; }
.badge-open { background:#dbeafe; color:#1e40af; }
.badge-answered { background:#dcfce7; color:#15803d; }
.badge-closed { background:#e2e8f0; color:#475569; }
.reply { padding:12px 14px; margin-top:10px; background:#f8fafc; border-radius:8px; border-left:3px solid #cbd5e1; }
.reply.staff { background:#fef3c7; border-left-color:#f59e0b; }

/* Admin */
.admin-tabs { display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.admin-tabs button { padding:10px 18px; border:1px solid var(--border); background:#fff; border-radius:8px; cursor:pointer; font-weight:600; font-size:14px; }
.admin-tabs button.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.tbl { width:100%; border-collapse:collapse; }
.tbl th, .tbl td { padding:12px 16px; text-align:left; border-bottom:1px solid var(--border); font-size:14px; }
.tbl th { background:#f8fafc; font-size:12px; text-transform:uppercase; color:var(--muted); letter-spacing:.5px; }
.tbl select { padding:4px 8px; border:1px solid var(--border); border-radius:4px; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.stat { text-align:center; }
.stat-n { font-size:36px; font-weight:800; color:var(--primary); margin-bottom:4px; }

/* ==== Support & Admin hero ==== */
.support-hero, .admin-hero {
  background: linear-gradient(135deg, #1e88ff, #6b46ff);
  color: #fff; border-radius: 14px; padding: 30px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap; margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(30,136,255,.25);
}
.support-hero h1, .admin-hero h1 { font-size: 26px; margin-bottom: 6px; }
.support-hero p, .admin-hero p { opacity: .92; font-size: 14px; max-width: 500px; }
.support-hero-stats, .admin-hero-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.support-hero-stats > div, .admin-hero-stats > div {
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  padding: 14px 20px; border-radius: 10px; text-align: center; min-width: 100px;
}
.support-hero-stats .n, .admin-hero-stats .n {
  font-size: 26px; font-weight: 800; line-height: 1;
}
.support-hero-stats > div > div:last-child,
.admin-hero-stats > div > div:last-child { font-size: 12px; opacity: .9; margin-top: 4px; }

/* Contact rows in sidebar */
.contact-row { display:flex; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid var(--border); }
.contact-row:last-child { border:0; }
.contact-row span { font-size:22px; }
.contact-row small { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.contact-row b { font-size:14px; }

/* Ticket refinements */
.ticket { border-left: 4px solid #cbd5e1; }
.ticket-open { border-left-color: #3b82f6; }
.ticket-answered { border-left-color: #22c55e; }
.ticket-closed { border-left-color: #94a3b8; opacity: .85; }
.ticket-msg { margin: 14px 0; padding: 12px 14px; background: #f8fafc; border-radius: 8px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.reply-head { display:flex; align-items:center; gap:8px; font-size:13px; }
.reply-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.reply-form textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 14px; resize: vertical; }
.reply-form button { align-self: flex-start; }

/* Offline pulse variant */
[data-server-status].offline { color:#fee2e2; }
.server-head:has([data-server-status].offline) { background:linear-gradient(135deg,#7f1d1d,#dc2626); }
.server-head:has([data-server-status].offline) .pulse { background:#fca5a5; animation:none; }
