:root {
    --bg: #090b13;
    --surface: #111522;
    --surface-2: #171c2c;
    --surface-3: #20263a;
    --text: #f4f6ff;
    --muted: #98a1bb;
    --line: rgba(255,255,255,.09);
    --primary: #7c5cff;
    --primary-2: #9a7dff;
    --cyan: #50d5ff;
    --green: #55e6a5;
    --yellow: #ffd36a;
    --danger: #ff6c82;
    --shadow: 0 24px 70px rgba(0,0,0,.32);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.narrow { width: min(860px, calc(100% - 36px)); }
.grow { flex: 1; }
.muted { color: var(--muted); }
.top-gap { margin-top: 56px; }

.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); background: rgba(9,11,19,.82); backdrop-filter: blur(20px); }
.nav-wrap { min-height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg,var(--primary),var(--cyan)); box-shadow: 0 8px 30px rgba(124,92,255,.35); }
.main-nav { display: flex; gap: 25px; color: #c5cbe0; font-size: 14px; }
.main-nav a:hover { color: #fff; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.profile-chip { display: flex; align-items: center; gap: 9px; color: #dfe3f4; font-size: 14px; }
.profile-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 750; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg,var(--primary),#6b57ed); color: #fff; box-shadow: 0 12px 34px rgba(124,92,255,.25); }
.button-secondary { background: rgba(255,255,255,.045); border-color: var(--line); color: #e9ecf8; }
.button-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.button-small { min-height: 38px; padding-inline: 14px; font-size: 13px; border-radius: 10px; }

.flash-stack { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; pointer-events: none; }
.flash { padding: 12px 16px; min-width: 300px; border: 1px solid var(--line); border-radius: 12px; background: #171c2c; box-shadow: var(--shadow); }
.flash-success { border-color: rgba(85,230,165,.4); }
.flash-danger { border-color: rgba(255,108,130,.45); }
.flash-warning { border-color: rgba(255,211,106,.45); }

.hero { position: relative; overflow: hidden; padding: 110px 0 100px; background: radial-gradient(circle at 76% 35%,rgba(124,92,255,.25),transparent 27%), radial-gradient(circle at 18% 5%,rgba(80,213,255,.10),transparent 24%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.04) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom,#000,transparent); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; }
.eyebrow { display: inline-block; margin-bottom: 13px; color: var(--cyan); font-weight: 800; font-size: 12px; letter-spacing: 2px; }
.hero h1, .page-hero h1 { margin: 0; font-size: clamp(42px,5vw,68px); line-height: 1.13; letter-spacing: -2.7px; }
.hero h1 span { color: transparent; background: linear-gradient(90deg,#a993ff,#62ddff); background-clip: text; }
.hero p { max-width: 650px; margin: 24px 0 0; color: #aab2ca; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: #8f99b4; font-size: 13px; }
.hero-panel { position: relative; height: 410px; display: grid; place-items: center; }
.mini-chart { width: 88%; min-height: 265px; padding: 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 24px; background: linear-gradient(145deg,rgba(31,36,57,.92),rgba(14,17,29,.88)); box-shadow: var(--shadow); transform: perspective(900px) rotateY(-7deg) rotateX(3deg); }
.mini-chart-head { display: flex; justify-content: space-between; color: var(--muted); }
.mini-chart-head strong { color: var(--green); }
.bars { height: 170px; display: flex; align-items: end; gap: 13px; padding-top: 26px; }
.bars i { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top,var(--primary),var(--cyan)); box-shadow: 0 0 22px rgba(124,92,255,.22); }
.floating-card { position: absolute; width: 145px; padding: 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(18,22,36,.92); box-shadow: var(--shadow); }
.floating-card strong { display: block; font-size: 23px; }
.floating-card span { color: var(--muted); font-size: 12px; }
.card-one { top: 22px; right: -8px; }
.card-two { left: -6px; bottom: 28px; }

.page-hero { padding: 80px 0; background: radial-gradient(circle at 15% 15%,rgba(124,92,255,.2),transparent 30%), var(--surface); border-bottom: 1px solid var(--line); }
.page-hero.compact { padding: 65px 0 55px; }
.page-hero h1 { font-size: clamp(36px,4vw,54px); }
.page-hero p { margin: 10px 0 0; color: var(--muted); }
.section { padding-block: 72px; }
.section-soft { background: var(--surface); border-block: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-heading h2, .panel h2 { margin: 0; font-size: 27px; letter-spacing: -.8px; }
.section-heading > a:not(.button) { color: var(--primary-2); font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 15px 45px rgba(0,0,0,.12); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-heading span { color: var(--muted); font-size: 13px; }
.empty-state { grid-column: 1 / -1; padding: 58px 20px; text-align: center; color: var(--muted); border: 1px dashed rgba(255,255,255,.14); border-radius: var(--radius); }
.empty-state.small { padding: 25px; }

.server-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.server-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .2s ease; }
.server-card:hover { transform: translateY(-4px); border-color: rgba(124,92,255,.4); box-shadow: 0 20px 55px rgba(0,0,0,.25); }
.server-card-cover { display: block; height: 118px; position: relative; background: linear-gradient(135deg,#252d47,#151a2b); background-size: cover; background-position: center; }
.server-icon { width: 66px; height: 66px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg,var(--primary),#4e65d8); font-size: 25px; font-weight: 850; border: 4px solid var(--surface); }
.server-card-cover .server-icon { position: absolute; left: 18px; bottom: -28px; }
.server-icon img, .server-detail-icon img, .bot-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-icon.small { width: 54px; height: 54px; min-width: 54px; border: 0; border-radius: 15px; }
.server-card-body { padding: 40px 18px 18px; }
.server-card-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.server-card-title > a { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating { color: var(--yellow); font-size: 13px; white-space: nowrap; }
.server-card p { min-height: 48px; margin: 9px 0 14px; color: var(--muted); font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-row a { padding: 3px 8px; border-radius: 999px; background: rgba(124,92,255,.1); color: #b7a8ff; font-size: 11px; }
.server-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: #858fa9; font-size: 11px; }
.server-stats span:first-child { color: var(--green); }

.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.feature-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg,var(--surface),rgba(23,28,44,.55)); }
.feature-card > span { color: var(--primary-2); font-size: 12px; font-weight: 850; }
.feature-card h3 { margin: 16px 0 7px; font-size: 21px; }
.feature-card p { margin: 0; color: var(--muted); }

.filter-bar { display: grid; grid-template-columns: 2fr 1fr 160px auto auto; gap: 10px; margin-bottom: 28px; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 11px; outline: 0; background: #0d101b; padding: 12px 14px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; padding: 28px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label > span, .review-form label > span { color: #c7cde0; font-weight: 700; font-size: 13px; }
.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; }

.server-detail-hero { min-height: 350px; display: flex; align-items: end; padding: 80px 0 45px; background: linear-gradient(180deg,rgba(9,11,20,.35),rgba(9,11,20,.97)),linear-gradient(135deg,#293250,#111522); background-size: cover; background-position: center; }
.server-profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.server-detail-icon { width: 105px; height: 105px; display: grid; place-items: center; overflow: hidden; border-radius: 27px; background: var(--primary); border: 5px solid rgba(255,255,255,.12); font-size: 40px; font-weight: 900; }
.server-profile h1 { margin: 5px 0 4px; font-size: 42px; letter-spacing: -1.5px; }
.server-profile p { margin: 0 0 12px; color: #bbc2d7; }
.status-line { display: flex; align-items: center; gap: 10px; }
.status { padding: 3px 8px; border-radius: 999px; background: rgba(255,211,106,.12); color: var(--yellow); font-size: 10px; text-transform: uppercase; font-weight: 850; }
.status-approved { color: var(--green); background: rgba(85,230,165,.1); }
.status-rejected { color: var(--danger); background: rgba(255,108,130,.1); }
.verified { color: var(--green); font-size: 12px; font-weight: 750; }
.server-profile-actions { display: flex; gap: 9px; }
.detail-layout { display: grid; grid-template-columns: 1fr 310px; gap: 22px; align-items: start; }
.content-column, .sidebar-column { display: grid; gap: 20px; }
.prose { padding: 28px; }
.prose p { white-space: pre-wrap; color: #c6ccdd; }
.content-column > .panel:not(.prose) { padding: 28px; }
.review-form { display: flex; align-items: end; gap: 10px; margin: 22px 0; }
.review-form label { display: grid; gap: 6px; }
.review-form select { width: 95px; }
.review-list { display: grid; }
.review-item { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 20px 0; border-top: 1px solid var(--line); }
.review-item img, .comment img, .post-detail-head img, .chat-message img, .owner-card img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.review-head { display: flex; justify-content: space-between; }
.review-item p { margin: 7px 0; color: #c1c7d8; }
.review-item time, .comment time { color: var(--muted); font-size: 11px; }
.stat-list { padding: 8px 20px; }
.stat-list div { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stat-list div:last-child { border-bottom: 0; }
.stat-list span { color: var(--muted); }
.owner-card { padding: 20px; }
.owner-card > span { color: var(--muted); font-size: 12px; }
.owner-card > div { display: flex; gap: 11px; align-items: center; margin-top: 12px; }

.dashboard-server-list { display: grid; gap: 12px; }
.dashboard-server { display: flex; align-items: center; gap: 18px; padding: 20px; }
.dashboard-server p { margin: 5px 0 0; color: var(--muted); }
.dashboard-title { display: flex; gap: 9px; align-items: center; }
.stack-actions { display: flex; gap: 8px; }
.badge-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.badge-card { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.badge-card > span { font-size: 30px; color: var(--yellow); }
.badge-card p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.badge-card small { color: var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.metric { padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 5px; font-size: 31px; }
.metric small { color: var(--green); }
.chart-panel, .bot-guide { padding: 28px; margin-top: 20px; }
.chart-panel canvas { margin-top: 24px; }
.warning-text { color: var(--yellow); }
code { color: #c4b8ff; background: rgba(124,92,255,.12); padding: 3px 7px; border-radius: 6px; }

.forum-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.category-list { padding: 18px; }
.category-list h3 { margin: 0 0 12px; }
.category-list a { display: block; padding: 12px; border-radius: 10px; }
.category-list a:hover { background: rgba(255,255,255,.04); }
.category-list small { display: block; color: var(--muted); font-size: 10px; }
.post-list { overflow: hidden; }
.post-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 21px; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: rgba(255,255,255,.025); }
.post-row p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.post-meta { min-width: 170px; display: grid; grid-template-columns: repeat(2,1fr); gap: 4px 10px; align-content: center; color: var(--muted); font-size: 10px; }
.pin { margin-right: 6px; color: var(--yellow); font-size: 11px; }
.post-detail { padding-top: 55px; display: grid; gap: 18px; }
.post-detail > .panel { padding: 28px; }
.post-detail-head > span { color: var(--primary-2); font-size: 12px; }
.post-detail-head h1 { margin: 8px 0 17px; font-size: 34px; }
.post-detail-head > div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.post-detail-head img { width: 34px; height: 34px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.comment p { margin: 5px 0; color: #c5cadb; }
.comment-form { display: grid; gap: 10px; margin-top: 20px; }
.comment-form .button { justify-self: end; }

.chat-panel { overflow: hidden; }
.chat-messages { height: 560px; overflow-y: auto; padding: 22px; }
.chat-message { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 10px 0; }
.chat-message img { width: 40px; height: 40px; }
.chat-message strong { font-size: 13px; }
.chat-message time { margin-left: 8px; color: var(--muted); font-size: 10px; }
.chat-message p { margin: 2px 0; color: #cbd0df; }
.chat-form { display: flex; gap: 10px; padding: 15px; border-top: 1px solid var(--line); background: #0d101b; }

.bot-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.bot-card { display: grid; grid-template-columns: 95px 1fr; gap: 22px; padding: 28px; }
.bot-icon { width: 95px; height: 95px; display: grid; place-items: center; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg,var(--primary),var(--cyan)); font-size: 35px; font-weight: 900; }
.bot-card h2 { margin: 0; }
.bot-summary { color: #d3d8e8; font-weight: 650; }
.bot-card p:not(.bot-summary) { color: var(--muted); }

.site-footer { padding: 45px 0; border-top: 1px solid var(--line); background: #070910; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; }
.footer-grid strong { color: #fff; }
.footer-grid p { margin: 4px 0 0; }
.footer-links { display: flex; gap: 22px; }
.error-page { min-height: 65vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.error-page > span { font-size: 90px; font-weight: 900; color: var(--primary); }

@media (max-width: 1020px) {
    .server-grid { grid-template-columns: repeat(2,1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-panel { display: none; }
    .detail-layout { grid-template-columns: 1fr; }
    .sidebar-column { grid-template-columns: repeat(2,1fr); }
    .metric-grid { grid-template-columns: repeat(2,1fr); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .main-nav { display: none; }
}
@media (max-width: 680px) {
    .container, .narrow { width: min(100% - 24px,1180px); }
    .nav-wrap { min-height: 62px; gap: 10px; }
    .brand > span:last-child, .profile-chip span, .nav-actions form { display: none; }
    .hero { padding: 75px 0 70px; }
    .hero h1 { font-size: 40px; letter-spacing: -1.7px; }
    .hero p { font-size: 16px; }
    .server-grid, .feature-grid, .badge-grid, .bot-grid, .form-grid, .forum-layout { grid-template-columns: 1fr; }
    .section { padding-block: 48px; }
    .section-heading { align-items: flex-start; }
    .filter-bar { grid-template-columns: 1fr; }
    .server-profile { grid-template-columns: auto 1fr; }
    .server-detail-icon { width: 76px; height: 76px; border-radius: 20px; }
    .server-profile h1 { font-size: 29px; }
    .server-profile-actions { grid-column: 1 / -1; }
    .detail-layout, .sidebar-column { grid-template-columns: 1fr; }
    .review-form, .dashboard-server { align-items: stretch; flex-direction: column; }
    .review-form { display: grid; }
    .review-form select { width: 100%; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .post-row { grid-template-columns: 1fr; }
    .bot-card { grid-template-columns: 70px 1fr; padding: 20px; }
    .bot-icon { width: 70px; height: 70px; border-radius: 18px; }
    .footer-grid { display: grid; gap: 20px; }
}


.setup-guide { margin-bottom: 18px; padding: 24px; }
.setup-guide > strong { font-size: 17px; }
.setup-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.setup-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.setup-steps li > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(88,101,242,.18); color: #fff; font-weight: 800; }
.setup-steps b { display: block; margin-top: 2px; }
.setup-steps p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.form-grid label small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.permission-note { margin-top: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.permission-note p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .setup-steps { grid-template-columns: 1fr; } }
/* Admin & moderation */
.admin-nav { color: var(--yellow) !important; }
.button-danger { background: #d94b5b; color: #fff; border-color: #d94b5b; }
.button-danger:hover { filter: brightness(1.08); }
.status-open, .status-reviewing { color: var(--yellow); background: rgba(255,204,92,.11); }
.status-resolved, .status-approved { color: var(--green); background: rgba(49,196,141,.11); }
.status-rejected, .status-suspended { color: #ff7c8b; background: rgba(255,89,108,.11); }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.admin-tabs a, .filter-chips a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.02); }
.admin-tabs a.active, .admin-tabs a:hover, .filter-chips a.active, .filter-chips a:hover { color: #fff; border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.13); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-panel { padding: 22px; }
.admin-list { display: grid; }
.admin-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.admin-row:first-child { border-top: 0; }
.admin-row strong, .admin-row small { display: block; }
.admin-row small, .admin-row time { color: var(--muted); font-size: 11px; }
.admin-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.admin-table td small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.admin-search { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-search input { flex: 1; }
.admin-user-list, .admin-review-list { display: grid; gap: 12px; }
.admin-user-card, .admin-review { padding: 18px; }
.admin-user-head { display: flex; align-items: center; gap: 12px; }
.admin-user-head img { width: 48px; height: 48px; border-radius: 14px; }
.admin-user-head small { display: block; color: var(--muted); margin-top: 3px; }
.admin-actions-row { margin-top: 14px; }
.inline-admin-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-admin-form input { min-width: 190px; }
.inline-admin-form select { min-width: 100px; }
.badge-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.badge-inline span { padding: 4px 7px; border-radius: 8px; background: rgba(255,255,255,.04); color: #d7dbea; font-size: 10px; }
.badge-manager { margin-top: 12px; color: var(--muted); }
.badge-manager > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.admin-review { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-review p { margin: 6px 0; color: #c8cddd; }
.admin-review small { color: var(--muted); }
.admin-report-detail { padding-top: 50px; display: grid; gap: 16px; }
.admin-report-detail > .panel { padding: 24px; }
.back-link { color: var(--muted); }
.detail-list { display: grid; gap: 8px; margin: 20px 0; }
.detail-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.report-body { padding: 16px; border-radius: 12px; background: rgba(255,255,255,.035); white-space: pre-wrap; margin-bottom: 16px; }
.report-target { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.report-target span, .report-target strong { display: block; }
.report-target span { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.admin-action-form { padding: 20px; display: grid; gap: 10px; }
.resolution-box { padding: 20px; }
.report-link { color: var(--muted); font-size: 11px; }
.report-link:hover { color: #fff; }
@media (max-width: 820px) { .admin-grid { grid-template-columns: 1fr; } .admin-review { align-items: stretch; flex-direction: column; } }

/* Profile, levels and notifications */
.notification-nav { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); color: #dfe3f1; font-size: 18px; }
.notification-nav:hover { border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.1); color: #fff; }
.notification-nav b { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #0a0d16; border-radius: 999px; background: #ff596c; color: #fff; font-size: 9px; line-height: 1; }
.profile-hero { padding: 62px 0 46px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 20% 10%, rgba(124,92,255,.16), transparent 38%), #090c15; }
.profile-head { display: flex; align-items: center; gap: 24px; }
.profile-avatar-large { width: 112px; height: 112px; border-radius: 30px; object-fit: cover; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 50px rgba(0,0,0,.3); }
.profile-name-line { display: flex; align-items: center; gap: 10px; }
.profile-name-line h1 { margin: 0; font-size: 38px; letter-spacing: -1.4px; }
.profile-handle { margin: 5px 0 12px; color: var(--muted); }
.profile-bio { max-width: 720px; margin: 0 0 14px; color: #ccd1df; line-height: 1.7; white-space: pre-wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-meta span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; background: rgba(255,255,255,.02); }
.profile-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.profile-main, .profile-side { min-width: 0; }
.profile-side { display: grid; gap: 16px; }
.profile-side-card { padding: 20px; }
.profile-side-card h3 { margin: 0 0 14px; }
.level-card { padding: 24px; }
.level-card h2 { margin: 5px 0; font-size: 30px; }
.level-card p { margin: 0; color: var(--muted); }
.level-track { height: 10px; margin-top: 18px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }
.level-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--cyan)); }
.compact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.profile-badges { display: grid; gap: 9px; }
.profile-badges > div { display: grid; grid-template-columns: 32px 1fr; gap: 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); }
.profile-badges > div > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(124,92,255,.13); }
.profile-badges strong { font-size: 12px; }
.profile-badges small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.profile-post-list { overflow: hidden; }
.profile-post-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.profile-post-row:last-child { border-bottom: 0; }
.profile-post-row:hover { background: rgba(255,255,255,.025); }
.profile-post-row small, .profile-post-row > span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.mini-review { display: block; padding: 11px 0; border-top: 1px solid var(--line); }
.mini-review:first-of-type { border-top: 0; }
.mini-review strong { font-size: 12px; }
.mini-review span { float: right; color: var(--yellow); font-size: 11px; }
.mini-review p { clear: both; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.author-link:hover { color: var(--primary-2); }
.activity-list { overflow: hidden; }
.activity-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.point-amount { font-weight: 800; }
.point-amount.positive { color: var(--green); }
.point-amount.negative { color: #ff7c8b; }
.notification-list { display: grid; gap: 10px; }
.notification-item { display: flex; gap: 10px; align-items: center; padding: 4px 9px 4px 4px; }
.notification-item.unread { border-color: rgba(124,92,255,.44); background: rgba(124,92,255,.055); }
.notification-open { width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 14px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.notification-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.05); color: var(--primary-2); font-weight: 900; }
.notification-icon.kind-badge { color: var(--yellow); background: rgba(255,204,92,.08); }
.notification-icon.kind-level_up { color: var(--green); background: rgba(49,196,141,.09); }
.notification-title { display: flex; gap: 8px; align-items: center; }
.notification-title span { padding: 2px 5px; border-radius: 5px; background: var(--primary); color: white; font-size: 8px; font-weight: 800; }
.notification-open p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.notification-open time { color: #72798f; font-size: 10px; }
.notification-delete { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.notification-delete:hover { background: rgba(255,89,108,.1); color: #ff7c8b; }
.dashboard-account { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 28px; padding: 22px; }
.dashboard-account h2 { margin: 5px 0; }
.dashboard-account-actions { display: flex; gap: 8px; }
.admin-point-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-point-form input[type="number"] { max-width: 125px; min-width: 100px; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } .profile-side { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px) { .profile-head { align-items: flex-start; flex-wrap: wrap; } .profile-avatar-large { width: 82px; height: 82px; border-radius: 22px; } .profile-name-line h1 { font-size: 29px; } .profile-head .stack-actions { width: 100%; flex-direction: row; } .profile-side, .compact-grid { grid-template-columns: 1fr; } .dashboard-account { align-items: stretch; flex-direction: column; } .dashboard-account-actions { flex-wrap: wrap; } .notification-open { grid-template-columns: 38px 1fr; padding: 11px; } .notification-icon { width: 38px; height: 38px; } }

/* Forum v6 */
.category-list a.active { background: rgba(124,92,255,.12); color: #fff; border: 1px solid rgba(124,92,255,.26); }
.forum-filter { display: grid; grid-template-columns: 1fr 150px auto; gap: 9px; padding: 12px; margin-bottom: 14px; }
.forum-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 28px 24px; }
.forum-actions form { margin: 0; }
.comment-body { min-width: 0; }
.comment-tools { margin-top: 8px; color: var(--muted); font-size: 11px; }
.comment-tools summary { cursor: pointer; width: max-content; }
.comment-tools form { display: flex; gap: 7px; align-items: end; margin-top: 8px; }
.comment-tools textarea { min-width: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; color: var(--muted); }
.pagination a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: #e3e7f4; }
.stack-form { display: grid; gap: 16px; padding-top: 20px; }
.stack-form label { display: grid; gap: 7px; }
.form-panel { padding: 28px; }

/* Multi-room chat v6 */
.chat-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 18px; align-items: start; }
.chat-sidebar { display: grid; gap: 12px; }
.chat-room-list { overflow: hidden; }
.chat-room-list .panel-heading { padding: 17px; }
.chat-room-list .panel-heading h2 { font-size: 18px; }
.chat-room-link { display: block; padding: 13px 16px; border-top: 1px solid var(--line); }
.chat-room-link:hover, .chat-room-link.active { background: rgba(124,92,255,.08); }
.chat-room-link.active { box-shadow: inset 3px 0 0 var(--primary); }
.chat-room-link strong, .chat-room-link small { display: block; }
.chat-room-link small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.chat-room-create { padding: 16px; }
.chat-room-create summary { cursor: pointer; font-weight: 800; }
.chat-room-create form { display: grid; gap: 9px; margin-top: 14px; }
.chat-room-create label { color: var(--muted); font-size: 11px; }
.chat-room-create.locked p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.chat-header { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-header strong, .chat-header span { display: block; }
.chat-header span { color: var(--muted); font-size: 10px; }
.chat-delete-form { display: inline; margin-left: 8px; }
.chat-delete-form button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.chat-delete-form button:hover { color: var(--danger); }

/* Analytics v6 */
.analytics-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.period-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.period-tabs a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 11px; }
.period-tabs a.active { background: rgba(124,92,255,.12); border-color: rgba(124,92,255,.4); color: #fff; }
.metric small.down { color: var(--danger); }
.metric small.neutral { color: var(--muted); }
.analytics-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0; }
.analytics-summary > div { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.analytics-summary span, .analytics-summary small { display: block; color: var(--muted); font-size: 11px; }
.analytics-summary strong { display: block; margin: 4px 0; font-size: 22px; }

@media (max-width: 860px) {
    .chat-layout { grid-template-columns: 1fr; }
    .chat-room-list { display: flex; overflow-x: auto; align-items: stretch; }
    .chat-room-list .panel-heading { min-width: 120px; border-bottom: 0; }
    .chat-room-link { min-width: 170px; border-top: 0; border-left: 1px solid var(--line); }
    .forum-filter { grid-template-columns: 1fr; }
    .analytics-summary { grid-template-columns: 1fr; }
}
.ranking-note { margin: -12px 0 24px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.verified-review { margin-left: 7px; padding: 2px 6px; border-radius: 999px; background: rgba(85,230,165,.09); color: var(--green); font-size: 9px; font-weight: 800; white-space: nowrap; }
.global-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; margin-bottom: 38px; }
.search-results-grid { display: grid; gap: 48px; }
.search-server-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.search-list, .search-user-list { overflow: hidden; }
.search-list > a { display: block; padding: 16px 18px; border-top: 1px solid var(--line); }
.search-list > a:first-child { border-top: 0; }
.search-list > a:hover, .search-user-list > a:hover { background: rgba(255,255,255,.025); }
.search-list strong, .search-list span { display: block; }
.search-list span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.search-user-list > a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); }
.search-user-list > a:first-child { border-top: 0; }
.search-user-list img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.search-user-list strong, .search-user-list span { display: block; }
.search-user-list span { color: var(--muted); font-size: 10px; }
@media (max-width: 900px) { .search-server-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .global-search { grid-template-columns: 1fr; } .search-server-grid { grid-template-columns: 1fr; } }
.bot-admin-grid { grid-template-columns: 360px minmax(0,1fr); }
.admin-bot-list { display: grid; gap: 14px; }
.admin-bot-card { padding: 18px; }
.admin-bot-card > form:last-child { margin-top: 10px; }
.admin-bot-head { display: flex; gap: 10px; align-items: center; }
.admin-bot-head img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.admin-bot-head strong, .admin-bot-head small { display: block; }
.admin-bot-head small { color: var(--muted); }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.check-label input { width: auto; }
@media (max-width: 900px) { .bot-admin-grid { grid-template-columns: 1fr; } }

.content-attachment{display:block;max-width:100%;max-height:680px;margin:14px 0;border-radius:14px;object-fit:contain;background:rgba(255,255,255,.03)}
.legal-page h1{margin-bottom:6px}.legal-page h2{margin-top:28px}.legal-page li{margin:8px 0;line-height:1.7}
.risk-high{color:#ff7b7b}.risk-medium{color:#ffcd70}

/* UX polish: persistent footer, modals, policy pages, chat composer */
html, body { min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.site-footer { margin-top: auto; }
.narrow { margin-inline: auto; }
.footer-links { flex-wrap: wrap; justify-content: flex-end; }

.modal-open { overflow: hidden; }
.modal-layer { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 22px; opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility .16s ease; }
.modal-layer.is-open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(2,4,10,.74); backdrop-filter: blur(8px); }
.modal-dialog { position: relative; z-index: 1; width: min(620px, 100%); max-height: min(760px, calc(100vh - 44px)); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: #111522; box-shadow: 0 30px 100px rgba(0,0,0,.52); transform: translateY(10px) scale(.985); transition: transform .18s ease; }
.modal-layer.is-open .modal-dialog { transform: translateY(0) scale(1); }
.modal-head { display: flex; justify-content: space-between; gap: 18px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 5% 0, rgba(124,92,255,.14), transparent 46%); }
.modal-head .eyebrow { margin-bottom: 5px; }
.modal-head h2 { margin: 0; font-size: 24px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 24px; line-height: 1; }
.modal-close:hover { color: #fff; background: rgba(255,255,255,.07); }
.modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.notification-modal-list { max-height: 540px; overflow-y: auto; padding: 10px; }
.notification-modal-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 14px; }
.notification-modal-item + .notification-modal-item { margin-top: 5px; }
.notification-modal-item.unread { border-color: rgba(124,92,255,.25); background: rgba(124,92,255,.06); }
.notification-modal-open button { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; padding: 13px; border: 0; background: transparent; color: inherit; text-align: left; }
.notification-copy { min-width: 0; }
.notification-copy > span:not(.notification-title), .notification-copy time { display: block; }
.notification-copy > span:not(.notification-title) { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy time { margin-top: 4px; color: #70788e; font-size: 9px; }
.notification-title { min-width: 0; }
.notification-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-title em { flex: 0 0 auto; padding: 2px 5px; border-radius: 5px; background: var(--primary); color: #fff; font-size: 8px; font-style: normal; font-weight: 800; }
.notification-modal-item .notification-delete { margin-right: 8px; }
.compact-modal { width: min(560px, 100%); }
.modal-form { display: grid; gap: 20px; padding: 22px 24px 24px; }
.modal-form label { display: grid; gap: 8px; }
.modal-form label > span { color: #c7cde0; font-size: 12px; font-weight: 750; }
.modal-form label > small { color: var(--muted); font-size: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }

.activity-page { padding-inline: 0; }
.activity-page .activity-list { box-shadow: 0 20px 55px rgba(0,0,0,.15); }

.policy-hero { position: relative; overflow: hidden; }
.policy-hero::after { content: ""; position: absolute; right: 8%; top: -80px; width: 260px; height: 260px; border: 1px solid rgba(124,92,255,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(124,92,255,.03), 0 0 0 90px rgba(80,213,255,.018); pointer-events: none; }
.policy-updated { display: inline-flex; margin-top: 16px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: #8f99b4; font-size: 10px; background: rgba(255,255,255,.025); }
.policy-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 22px; align-items: start; }
.policy-summary { position: sticky; top: 96px; padding: 25px; background: linear-gradient(155deg, rgba(124,92,255,.10), var(--surface) 54%); }
.policy-symbol { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 14px; background: rgba(124,92,255,.13); color: var(--primary-2); font-size: 20px; }
.policy-summary h2 { margin: 0 0 9px; font-size: 20px; }
.policy-summary p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.policy-content { display: grid; gap: 13px; }
.policy-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 17px; padding: 23px 25px; }
.policy-card > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(80,213,255,.07); color: var(--cyan); font-size: 10px; font-weight: 850; }
.policy-card h2 { margin: 0 0 7px; font-size: 18px; }
.policy-card p { margin: 0; color: #b4bdd2; font-size: 13px; line-height: 1.8; }
.policy-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.policy-list li { position: relative; padding: 9px 11px 9px 28px; border: 1px solid var(--line); border-radius: 10px; color: #c5ccdc; font-size: 12px; background: rgba(255,255,255,.02); }
.policy-list li::before { content: "×"; position: absolute; left: 10px; color: var(--danger); font-weight: 900; }

.chat-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: block; padding: 14px 15px 10px; background: #0d101b; }
.chat-composer { display: flex; align-items: flex-end; gap: 9px; min-height: 52px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 15px; background: #151925; transition: border-color .16s ease, box-shadow .16s ease; }
.chat-composer:focus-within { border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 3px rgba(124,92,255,.08); }
.chat-upload-button { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 1px; border-radius: 50%; background: #292f3e; color: #c6ccdc; font-size: 25px; font-weight: 300; line-height: 1; cursor: pointer; transition: .15s ease; }
.chat-upload-button:hover { background: #343b4d; color: #fff; transform: rotate(90deg); }
.chat-file-input { display: none; }
.chat-form textarea { flex: 1; min-height: 36px; max-height: 140px; padding: 7px 4px; border: 0; border-radius: 0; background: transparent; resize: none; line-height: 1.5; }
.chat-form textarea:focus { border: 0; box-shadow: none; }
.chat-file-chip { align-self: center; max-width: 180px; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: rgba(124,92,255,.08); color: #cbd1e2; font-size: 9px; }
.chat-file-chip[hidden] { display: none; }
.chat-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-chip button { padding: 0; border: 0; background: transparent; color: var(--muted); }
.chat-enter-hint { display: block; margin: 5px 5px 0; color: #676f84; font-size: 9px; text-align: right; }

@media (max-width: 760px) {
    .policy-layout { grid-template-columns: 1fr; }
    .policy-summary { position: static; }
    .policy-list { grid-template-columns: 1fr; }
    .modal-layer { padding: 12px; }
    .modal-dialog { max-height: calc(100vh - 24px); border-radius: 18px; }
    .modal-head { padding: 20px 18px 15px; }
    .modal-toolbar { padding-inline: 16px; }
    .modal-form { padding: 18px; }
    .footer-grid { gap: 24px; flex-direction: column; }
    .footer-links { justify-content: flex-start; gap: 12px 18px; }
    .chat-file-chip { display: none; }
}
