:root{
  font-family:Inter,system-ui,sans-serif;
  color:#f4f7fb;
  background:#07090d;
  --blue:#1683ff;
  --line:#202733;
  --muted:#8e9aaa;
  --card:#0e131a;
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 20% 0,#10213a 0,transparent 32%),
    #07090d;
}

.bg-glow{
  position:fixed;
  width:380px;
  height:380px;
  border-radius:50%;
  filter:blur(110px);
  opacity:.12;
  pointer-events:none;
}

.glow-a{
  background:#1683ff;
  left:-180px;
  top:180px;
}

.glow-b{
  background:#7b3cff;
  right:-180px;
  top:55%;
}

button,input,textarea,select{
  font:inherit;
}

/* TOP BAR */

.topbar{
  height:72px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 32px;
  background:rgba(7,9,13,.88);
  backdrop-filter:blur(14px);
  position:sticky;
  top:0;
  z-index:20;
}

.brand{
  display:flex;
  gap:11px;
  align-items:center;
  color:white;
  text-decoration:none;
}

.brand-mark{
  width:40px;
  height:40px;
  border:1px solid #278cff;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:#58a9ff;
  font-size:12px;
  font-weight:800;
  box-shadow:0 0 20px rgba(22,131,255,.18);
}

.brand strong{
  display:block;
  font-size:16px;
}

.brand span{
  font-size:9px;
  letter-spacing:2px;
  color:#6f7d90;
}

.top-actions{
  display:flex;
  gap:9px;
  align-items:center;
}

/* BUTTONS */

.ghost-btn,
.primary-btn,
.cat,
.feed{
  border:1px solid var(--line);
  background:#10151c;
  color:#cbd4df;
  border-radius:9px;
  padding:10px 13px;
  cursor:pointer;
  transition:.15s;
}

.ghost-btn:hover,
.feed:hover,
.small-btn:hover{
  border-color:#31516f;
  color:#fff;
}

.primary-btn{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
  font-weight:700;
}

.primary-btn:hover{
  filter:brightness(1.08);
  box-shadow:0 0 18px rgba(22,131,255,.22);
}

/* NOTIFICATION BUTTON */

.notify-btn{
  position:relative;
  min-width:42px;
  height:40px;
  display:grid;
  place-items:center;
  padding:0 10px;
}

.notify-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:20px;
  background:#ff3d5a;
  color:#fff;
  font-size:10px;
  font-weight:800;
  display:grid;
  place-items:center;
  border:2px solid #07090d;
}

/* PAGE */

.container{
  max-width:1250px;
  margin:auto;
  padding:34px 22px 70px;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin-bottom:22px;
}

.eyebrow{
  font-size:10px;
  color:#4199ff;
  letter-spacing:2px;
  font-weight:800;
}

.hero h1{
  margin:7px 0 5px;
  font-size:34px;
}

.hero p{
  margin:0;
  color:var(--muted);
}

.hero-stat{
  min-width:120px;
  text-align:right;
}

.hero-stat b{
  font-size:28px;
  display:block;
}

.hero-stat span{
  color:var(--muted);
  font-size:12px;
}

.ad-slot{
  border:1px dashed #283240;
  min-height:82px;
  display:grid;
  place-items:center;
  color:#586576;
  font-size:11px;
  margin-bottom:18px;
  background:#0a0e13;
}

/* FORUM */

.forum-shell{
  display:grid;
  grid-template-columns:210px 1fr;
  gap:18px;
}

.sidebar,
.content{
  border:1px solid var(--line);
  background:rgba(10,14,19,.82);
  border-radius:15px;
}

.sidebar{
  padding:15px;
  height:max-content;
}

.sidebar h3{
  margin:4px 8px 13px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#738094;
}

.cat{
  width:100%;
  text-align:left;
  background:transparent;
  border-color:transparent;
  margin:2px 0;
}

.cat:hover,
.cat.active{
  background:#111b27;
  color:#fff;
  border-color:#183552;
}

.sidebar-note{
  margin:20px 6px 5px;
  padding:11px;
  border-radius:10px;
  background:#0b1016;
  color:#667487;
  font-size:10px;
  line-height:1.55;
}

.content{
  padding:14px;
}

.toolbar{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.feed-tabs{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.feed{
  padding:8px 10px;
  font-size:12px;
  background:transparent;
}

.feed.active{
  color:#fff;
  border-color:#23517c;
  background:#122237;
}

.search{
  width:230px;
  background:#0a0f15;
  border:1px solid var(--line);
  border-radius:9px;
  color:white;
  padding:9px 11px;
  outline:none;
}

.search:focus,
.form input:focus,
.form textarea:focus,
.form select:focus{
  border-color:#287bc0;
  box-shadow:0 0 0 2px rgba(22,131,255,.08);
}

.topic-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.topic{
  padding:15px;
  border:1px solid #1b222c;
  border-radius:12px;
  background:#0c1117;
  cursor:pointer;
  transition:.15s;
}

.topic:hover{
  border-color:#2b4968;
  transform:translateY(-1px);
}

.topic-row{
  display:flex;
  justify-content:space-between;
  gap:15px;
}

.topic-title{
  font-weight:700;
  color:#eef4fb;
  margin-bottom:7px;
}

.topic-desc{
  color:#8491a2;
  font-size:12px;
  line-height:1.45;
}

.meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  color:#687688;
  font-size:10px;
  margin-top:11px;
}

.pill{
  padding:3px 7px;
  border-radius:20px;
  background:#121b26;
  color:#77b8ff;
}

.stats{
  text-align:right;
  white-space:nowrap;
  color:#7b8798;
  font-size:11px;
}

.stats b{
  display:block;
  color:#c8d2df;
  font-size:15px;
}

/* LOADING */

.loading,
.empty{
  text-align:center;
  padding:55px;
  color:#6e7b8d;
}

/* MODAL */

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.72);
  z-index:50;
  display:grid;
  place-items:center;
  padding:18px;
}

.modal{
  width:min(760px,100%);
  max-height:90vh;
  overflow:auto;
  background:#0c1117;
  border:1px solid #293340;
  border-radius:16px;
  padding:20px;
  box-shadow:0 20px 70px #000;
}

.modal h2{
  margin:0 0 15px;
}

.close{
  float:right;
  border:0;
  background:transparent;
  color:#8995a5;
  font-size:22px;
  cursor:pointer;
}

.close:hover{
  color:#fff;
}

/* FORMS */

.form{
  display:grid;
  gap:11px;
}

.form input,
.form textarea,
.form select{
  width:100%;
  background:#080c11;
  border:1px solid #26303d;
  color:#f4f7fb;
  border-radius:9px;
  padding:11px;
  outline:none;
}

.form textarea{
  min-height:130px;
  resize:vertical;
}

.actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}

.login-line{
  text-align:center;
  color:#778496;
  font-size:12px;
  padding:12px;
}

.notice{
  padding:10px;
  border-radius:9px;
  background:#111b27;
  color:#9fb1c5;
  font-size:11px;
}

/* TOPIC DETAIL */

.topic-detail .topic-head{
  padding-bottom:15px;
  border-bottom:1px solid var(--line);
}

.topic-detail .topic-body{
  white-space:pre-wrap;
  line-height:1.7;
  color:#c5cfdb;
  padding:18px 0;
}

/* AUTHOR / PROFILE BUTTON */

.author-btn{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:#78baff;
  cursor:pointer;
  font:inherit;
}

.author-btn:hover{
  color:#fff;
  text-decoration:underline;
}

/* REPLIES */

.reply{
  padding:14px 0;
  border-top:1px solid #1c232c;
}

.reply-head{
  display:flex;
  align-items:center;
  gap:9px;
}

.avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  background:#162335;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#7ebaff;
  font-weight:800;
  flex-shrink:0;
}

.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.reply-name{
  font-weight:700;
  font-size:12px;
}

.reply-time{
  font-size:10px;
  color:#687688;
}

.reply-text{
  white-space:pre-wrap;
  line-height:1.6;
  color:#c3ccd8;
  margin:9px 0 6px;
}

.reply-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.small-btn{
  border:1px solid transparent;
  background:none;
  color:#6f8298;
  cursor:pointer;
  padding:4px 7px;
  border-radius:7px;
  font-size:11px;
}

.small-btn:hover{
  background:#101923;
  color:#fff;
}

.owner-actions{
  display:flex;
  gap:5px;
  margin-left:auto;
}

.owner-actions .small-btn{
  font-size:10px;
}

.edit-btn:hover{
  color:#66b4ff;
}

.delete-btn:hover{
  color:#ff6678;
}

.reply-form{
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:12px;
}

/* PROFILE */

.profile-header{
  display:flex;
  align-items:center;
  gap:16px;
  padding:4px 0 18px;
  border-bottom:1px solid var(--line);
}

.profile-avatar{
  width:82px;
  height:82px;
  border-radius:50%;
  background:#162335;
  border:2px solid #24486c;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#7ebaff;
  font-size:25px;
  font-weight:800;
  flex-shrink:0;
  box-shadow:0 0 25px rgba(22,131,255,.12);
}

.profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-info{
  min-width:0;
  flex:1;
}

.profile-info h2{
  margin:0 0 3px;
  font-size:22px;
}

.profile-nickname{
  color:#68afff;
  font-size:12px;
}

.profile-bio{
  color:#9aa8b9;
  font-size:12px;
  line-height:1.5;
  margin-top:8px;
  white-space:pre-wrap;
}

.profile-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:16px 0;
}

.profile-stat{
  border:1px solid #1d2732;
  background:#0a0f15;
  border-radius:10px;
  padding:12px 8px;
  text-align:center;
}

.profile-stat b{
  display:block;
  font-size:17px;
  color:#e8f0f8;
}

.profile-stat span{
  display:block;
  margin-top:3px;
  color:#718095;
  font-size:10px;
}

.profile-topic-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:12px;
}

.profile-topic{
  border:1px solid #1b242e;
  border-radius:10px;
  padding:11px;
  background:#0a0f15;
  cursor:pointer;
}

.profile-topic:hover{
  border-color:#2b4968;
  background:#0d141c;
}

.profile-topic-title{
  font-weight:700;
  font-size:12px;
  color:#eaf1f8;
}

.profile-topic-meta{
  color:#667487;
  font-size:10px;
  margin-top:5px;
}

/* FOLLOW */

.follow-btn{
  min-width:105px;
}

.follow-btn.following{
  background:#111923;
  border-color:#2a3b4d;
  color:#9eafc1;
}

/* NOTIFICATIONS */

.notification-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  max-height:60vh;
  overflow:auto;
}

.notification-item{
  display:flex;
  gap:11px;
  align-items:flex-start;
  padding:12px;
  border:1px solid #1b242e;
  border-radius:10px;
  background:#0a0f15;
  cursor:pointer;
  transition:.15s;
}

.notification-item:hover{
  border-color:#2a4865;
  background:#0d141c;
}

.notification-item.unread{
  border-color:#23496e;
  background:#0d1722;
}

.notification-icon{
  width:34px;
  height:34px;
  border-radius:50%;
  background:#122237;
  display:grid;
  place-items:center;
  color:#67b1ff;
  font-size:14px;
  flex-shrink:0;
}

.notification-content{
  flex:1;
  min-width:0;
}

.notification-text{
  color:#d5dee8;
  font-size:12px;
  line-height:1.45;
}

.notification-time{
  color:#657386;
  font-size:10px;
  margin-top:4px;
}

.notification-unread-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#1683ff;
  margin-top:6px;
  flex-shrink:0;
}

/* NOTIFICATION HEADER */

.notification-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.notification-header h2{
  margin:0;
}

/* EMPTY NOTIFICATIONS */

.notification-empty{
  text-align:center;
  padding:40px 15px;
  color:#69778a;
  font-size:12px;
}

/* EDIT / DELETE */

.action-danger{
  color:#ff6375!important;
}

.action-danger:hover{
  background:#291217!important;
}

.action-blue{
  color:#69b4ff!important;
}

.edited-label{
  color:#58687a;
  font-size:9px;
  margin-left:5px;
}

/* TOPIC ACTION BAR */

.topic-owner-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:12px;
}

/* IMAGE IN TOPIC */

.topic-image{
  max-width:100%;
  max-height:450px;
  object-fit:contain;
  border-radius:10px;
  margin-top:10px;
  border:1px solid #202a35;
}

/* STATUS */

.hidden{
  display:none!important;
}

/* MOBILE */

@media(max-width:850px){

  .topbar{
    padding:0 14px;
  }

  .top-actions .primary-btn{
    display:none;
  }

  .container{
    padding:22px 10px;
  }

  .forum-shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:flex;
    gap:5px;
    overflow:auto;
    align-items:center;
  }

  .sidebar h3,
  .sidebar-note{
    display:none;
  }

  .cat{
    width:auto;
    white-space:nowrap;
  }

  .toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .search{
    width:100%;
  }

  .hero h1{
    font-size:27px;
  }

  .hero-stat{
    min-width:70px;
  }

  .topic-row{
    display:block;
  }

  .stats{
    text-align:left;
    margin-top:10px;
  }

  .topbar .brand-mark{
    width:34px;
    height:34px;
  }

  .profile-header{
    align-items:flex-start;
  }

  .profile-avatar{
    width:64px;
    height:64px;
    font-size:20px;
  }

  .profile-info h2{
    font-size:18px;
  }

  .profile-stats{
    grid-template-columns:repeat(2,1fr);
  }

  .owner-actions{
    flex-wrap:wrap;
  }

  .topic-owner-actions{
    justify-content:flex-start;
  }
}

@media(max-width:520px){

  .brand span{
    display:none;
  }

  .brand strong{
    font-size:14px;
  }

  .top-actions{
    gap:4px;
  }

  .ghost-btn,
  .primary-btn{
    padding:8px 10px;
  }

  .profile-header{
    flex-wrap:wrap;
  }

  .follow-btn{
    width:100%;
  }

  .profile-stats{
    gap:6px;
  }

  .modal{
    padding:15px;
  }
}