@font-face{
  font-family: "sitefont";
  src: url("/fonts/newfont.ttf?v=3") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #232222;
  --stroke: #242429;
  --text: #D3DAD9;
  --text-dim: #99889f;
  --accent: #a90de2;
  --accent-strong: #965dff;
  --error: #ff6b6b;
  --font-main: "sitefont", monospace;
}

*{
  font-family: var(--font-main) !important;
}

*{ box-sizing:border-box }
html,body{ height:100% }

body,
button,
input,
textarea,
select{
  font-family: var(--font-main);
}

body{
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

.container{
  width: min(1100px, 92vw);
  margin: 40px auto;
}

.center-wrap{
  min-height: calc(100vh - 80px);
  display:flex;
  align-items:center;
  justify-content:center;
}

.split{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:24px;
}

.card{
  background: rgba(0,0,0,.08);
  border:1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15) inset, 0 4px 16px rgba(0,0,0,.18);
}

h1{
  margin:0 0 16px 0;
  font-size:28px;
  letter-spacing:.5px;
}

h2{
  margin:0 0 12px 0;
  font-size:18px;
  color:var(--text);
}

h1, h2, h3{
  text-wrap:balance;
}

label{
  font-size:13px;
  color:var(--text-dim);
  display:block;
  margin:10px 4px 6px;
}

.input,
.textarea{
  resize: none;
  overflow-y: hidden;
  width:100%;
  padding:12px 14px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.12);
  color:var(--text);
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s;
}

.textarea{
  min-height:160px;
  resize:vertical;
  border-radius:22px;
}

.input::placeholder,
.textarea::placeholder{
  color: color-mix(in srgb, var(--text-dim) 82%, transparent);
}

.input:focus,
.textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  background: rgba(0,0,0,.16);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 16px;
  min-height:40px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:700;
  text-transform:lowercase;
  cursor:pointer;
  transition: transform .04s ease, background .15s ease, border-color .15s ease, box-shadow .15s;
}

.btn:hover{
  background: rgba(255,255,255,.10);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.btn:active{
  transform: translateY(1px);
}

.btn.primary{
  background: linear-gradient(180deg, rgba(137, 0, 161, 0.18), rgba(110, 71, 105, 0.06));
  border-color: var(--accent);
}

.btn.primary:hover{
  background: linear-gradient(180deg, rgba(108, 67, 243, 0.26), rgba(79, 49, 78, 0.12));
  border-color: var(--accent-strong);
}

.btn.danger{
  border-color:#7a3a3a;
  background: rgba(255,0,0,.08);
}

.btn.danger:hover{
  border-color:#a44;
  background: rgba(255,0,0,.14);
}

.btn.small{
  padding: 6px 14px;
  font-size: 14px;
}

.post{
  border:1px solid var(--stroke);
  border-radius:20px;
  padding:14px;
  margin-bottom:12px;
  background: rgba(0,0,0,.08);
}

.post-title{
  font-weight:800;
  margin-bottom:6px;
}

.post-meta{
  color:var(--text-dim);
  font-size:12px;
  margin-bottom:8px;
}

.post-body{
  font-size:14px;
  line-height:1.45;
}

.like{
  border-radius:999px;
  padding:6px 12px;
  border:1px solid var(--stroke);
  background: transparent;
  color:var(--text-dim);
  cursor:pointer;
  transition: all .15s ease;
}

.like:hover{
  border-color:var(--accent);
  color:var(--accent);
}

.like.liked{
  background: rgba(155,228,207,.14);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.sidebar h3{
  margin:0 0 10px 0;
  font-size:22px;
}

.reader-row{
  color:var(--text-dim);
  padding:6px 4px;
  border-bottom:1px dashed var(--stroke);
  font-size:14px;
}

.row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.muted{
  color:var(--text-dim);
}

.hr{
  height:1px;
  background:var(--stroke);
  margin:14px 0;
}

.note{
  font-size:12px;
  color:var(--text-dim);
}

.login-card{
  width:min(1000px,90vw);
  padding:40px 38px 32px 38px;
  text-align:center;
}

.title{
  text-align:center;
  margin-bottom:32px;
  font-size:30px;
  font-weight:400;
  color:#D3DAD9;
  white-space: nowrap;
  position: relative;
}

.login-big{
  width:50%;
  margin-top:26px;
  padding:18px 0;
  font-size:20px;
  font-weight:600;
  border-radius:22px;
  border:2px solid var(--stroke);
  background:#3f013c;
  color:rgb(246, 217, 255);
  transition:0.15s ease;
}

.login-big:hover{
  background:#4b442d;
  color:white;
  border-color:#c46dd6;
}

.register-link{
  display:block;
  margin-top:40px;
  font-size:15px;
  opacity:0.40;
  color:#d8d8d8;
  text-decoration:none;
}

.register-link:hover{
  opacity:0.95;
  text-decoration:underline;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

.title::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: 6px;
  background: #D3DAD9;
  animation: blink-caret 0.7s step-end infinite;
}

@keyframes blink-caret{
  50% { opacity: 0; }
}

.profile-section{
  margin-top: 28px;
  flex: 1;
}

.section-title{
  font-size: 20px;
  margin-bottom: 10px;
}

.profile-stats{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.profile-value{
  font-size: 18px;
  font-weight: 700;
}

.profile-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.profile-table th,
.profile-table td{
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.profile-table th{
  text-align: left;
  font-weight: 600;
}

.profile-card{
  width: min(720px, 92vw);
  padding: 28px 28px 24px;
}

.profile-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.profile-grid{
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.stat-line{
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.stat-label{
  color: rgba(211, 218, 217, 0.7);
}

.stat-value{
  font-weight: 600;
}

.readers-list{
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.reader-item{
  padding: 4px 0;
  border-bottom: 1px dashed rgba(211, 218, 217, 0.12);
}

.posts-mini{
  margin-top: 4px;
  font-size: 14px;
}

.post-mini{
  padding: 4px 0;
}

.profile-fab{
  position: fixed;
  top: 18px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 26px;
  color: var(--text);
  text-decoration:none;
  box-shadow: 0 0 18px rgba(0,0,0,0.6);
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.profile-fab:hover{
  background: rgba(169,13,226,0.18);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.profile-fab:active{
  transform: translateY(1px);
}

.page-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.page-nav{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.page-nav a{
  text-decoration:none;
  opacity:.9;
  transition:opacity .15s ease, transform .15s ease;
}

.page-nav a:hover{
  opacity:1;
  transform:translateY(-1px);
}

.page-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.stats-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.stat-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  font-size:12px;
  color:var(--text);
}

.stat-chip strong{
  font-size:13px;
  color:var(--text);
}

.status-box{
  display:none;
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  line-height:1.5;
}

.status-box.show{
  display:block;
}

.status-box.info{
  border-color:rgba(151, 120, 255, .18);
  background:rgba(151, 120, 255, .06);
}

.status-box.success{
  border-color:rgba(60, 210, 140, .20);
  background:rgba(60, 210, 140, .07);
}

.status-box.error{
  border-color:rgba(255, 90, 90, .22);
  background:rgba(255, 90, 90, .07);
}

.auth-shell{
  width:min(760px, 92vw);
  margin:0 auto;
}

.auth-card{
  padding:30px;
}

.auth-sub{
  margin:-12px 0 22px 0;
  color:var(--text-dim);
  text-align:center;
  line-height:1.55;
}

.auth-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:18px;
}

.auth-actions .btn{
  min-width:160px;
}

.ghost-link-btn{
  text-decoration:none;
}

.result-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}

.result-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,.02);
}

.feed-compose{
  padding:26px;
}

.feed-posts-wrap{
  padding:26px;
}

.feed-form-grid{
  display:grid;
  gap:12px;
}

.subtle-divider{
  height:1px;
  background:rgba(255,255,255,.06);
  margin:16px 0;
}

.empty-box{
  border:1px dashed rgba(255,255,255,.12);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.015);
  color:rgba(255,255,255,.78);
}

.confirm-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.58);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:9999;
  backdrop-filter:blur(4px);
}

.confirm-overlay.open{
  display:flex;
}

.confirm-modal{
  width:min(520px, 100%);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(34,34,42,.96), rgba(22,22,28,.98));
  box-shadow:0 24px 80px rgba(0,0,0,.45);
  padding:24px;
  transform:translateY(8px) scale(.985);
  opacity:0;
  transition:transform .16s ease, opacity .16s ease;
}

.confirm-overlay.open .confirm-modal{
  transform:translateY(0) scale(1);
  opacity:1;
}

.confirm-title{
  font-size:22px;
  font-weight:800;
  margin:0 0 10px 0;
}

.confirm-text{
  color:rgba(255,255,255,.82);
  line-height:1.6;
  margin-bottom:20px;
}

.confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.ghost-btn{
  background:rgba(255,255,255,.04);
}

.danger-solid-btn{
  background:rgba(255, 80, 80, .16);
  border-color:rgba(255, 80, 80, .30);
  color:#ffd4d4;
}

.danger-solid-btn:hover{
  background:rgba(255, 80, 80, .22);
  border-color:rgba(255, 80, 80, .42);
}

.input, .btn, .card{
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

@media (max-width: 720px){
  .profile-grid{
    flex-direction: column;
  }

  .result-grid{
    grid-template-columns:1fr;
  }

  .auth-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .auth-actions .btn,
  .auth-actions .ghost-link-btn{
    width:100%;
  }
}

.input,
.textarea{
  resize: none;
  overflow-y: hidden;
  width:100%;
  padding:12px 14px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.12);
  color:var(--text);
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s;
}

.sort-select{
  color: var(--text);
  background: rgba(0,0,0,.12);
}

.sort-select option{
  color: #111;
  background: #d6d6d6;
}

.sort-wrap {
  display: grid;
  gap: 8px;
}

.sort-dropdown {
  position: relative;
  width: 220px;
}

.sort-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.sort-caret {
  font-size: 18px;
  line-height: 1;
  opacity: .9;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  z-index: 30;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: #232222;
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.sort-menu.hidden {
  display: none;
}

.sort-option {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.sort-option:hover {
  background: rgba(255,255,255,.08);
}

.sort-option.active {
  background: rgba(255,255,255,.12);
}





a.topic-chip,
a.topic-chip:link,
a.topic-chip:visited,
a.topic-chip:hover,
a.topic-chip:active,
a.topic-chip:focus {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  color: #efe7ff !important;
  border: 1px solid rgba(169, 13, 226, 0.28) !important;
  background: linear-gradient(
    180deg,
    rgba(169, 13, 226, 0.14),
    rgba(169, 13, 226, 0.05)
  ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 0 1px rgba(169,13,226,0.04) !important;
  transition:
    transform 0.12s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease !important;
}

a.topic-chip:hover,
a.topic-chip:focus {
  transform: translateY(-1px);
  border-color: rgba(169, 13, 226, 0.48) !important;
  background: linear-gradient(
    180deg,
    rgba(169, 13, 226, 0.20),
    rgba(169, 13, 226, 0.08)
  ) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

a.topic-chip::before {
  content: "#" !important;
  opacity: 0.75 !important;
  font-size: 12px !important;
}

a.topic-chip.topic-muted,
a.topic-chip.topic-muted:link,
a.topic-chip.topic-muted:visited,
a.topic-chip.topic-muted:hover,
a.topic-chip.topic-muted:active,
a.topic-chip.topic-muted:focus {
  color: rgba(255,255,255,0.72) !important;
  border-color: rgba(255,255,255,0.10) !important;
  background: rgba(255,255,255,0.03) !important;
}

a.topic-chip.topic-muted:hover,
a.topic-chip.topic-muted:focus {
  border-color: rgba(255,255,255,0.18) !important;
  background: rgba(255,255,255,0.05) !important;
}




.mini-notif-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(169, 13, 226, 0.16);
  border:1px solid rgba(169, 13, 226, 0.34);
  color:#ead9ff;
  font-size:11px;
  line-height:1;
}

.mini-notif-badge.hidden{
  display:none;
}

.notif-link-inline{
  display:inline-flex;
  align-items:center;
  gap:8px;
}