:root {
  --bg: #090909;
  --bg-soft: #0d0d0d;
  --panel: #111111;
  --panel-2: #161616;
  --panel-3: #1c1c1c;
  --text: #f2f2f2;
  --muted: #737373;
  --accent: #e8e8e8;
  --accent-2: #9a9a9a;
  --line: #202020;
  --ok: #7dd3a8;
  --warn: #f0c674;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
  --transition: 180ms ease;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(255,255,255,.02), transparent 55%),
    radial-gradient(700px 500px at 90% 10%, rgba(255,255,255,.015), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  opacity: 0;
  animation: fadeIn .6s ease forwards;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); text-decoration: none; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

.site-nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(9,9,9,.78);
  border-bottom: 1px solid var(--line);
}
.site-nav .row { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: .6px; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.brand .dot { color: var(--muted); transition: color var(--transition); }
.brand:hover .dot { color: var(--accent); }
.nav-links { display: flex; gap: 18px; margin-left: 10px; flex: 1; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); font-weight: 600; font-size: 14px; position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--accent); transition: width var(--transition);
}
.nav-links a.active, .nav-links a:hover { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-weight: 700; font-size: 14px; flex: 0 0 auto; line-height: 1;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-avatar:hover { border-color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(232,232,232,.12); }
.nav-avatar.guest { font-size: 16px; }

/* Personal homepage cover + edit controls */
.profile-cover {
  height: 220px; background-size: cover; background-position: center; background-color: var(--panel-2);
  border-bottom: 1px solid var(--line); position: relative; margin-top: -1px;
}
.cover-edit {
  position: absolute; right: 18px; bottom: 18px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0,0,0,.55); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(6px); transition: background var(--transition), transform var(--transition);
}
.cover-edit:hover { background: rgba(0,0,0,.78); transform: translateY(-1px); }
.avatar-wrap { position: relative; }
.avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: border-color var(--transition), background var(--transition);
}
.avatar-edit:hover { border-color: var(--accent-2); background: var(--panel-3); }

main { padding: 42px 0 72px; }
main > .container > * { animation: slideUp .55s ease both; }
main > .container > *:nth-child(2) { animation-delay: .06s; }
main > .container > *:nth-child(3) { animation-delay: .12s; }
main > .container > *:nth-child(4) { animation-delay: .18s; }

footer { border-top: 1px solid var(--line); color: var(--muted); padding: 30px 0; font-size: 13px; }
footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: slideUp .55s ease both;
}
.card:hover { border-color: #2a2a2a; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
a.card:hover { transform: translateY(-3px); }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 32px; } h2 { font-size: 22px; } h3 { font-size: 17px; }

.hero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); background: var(--panel-2); transition: border-color var(--transition);
}
.avatar:hover { border-color: var(--accent-2); }
.tagline { color: var(--accent-2); font-weight: 600; letter-spacing: .3px; }
.bio { color: var(--muted); max-width: 640px; }
.social a {
  display: inline-block; margin-right: 14px; color: var(--muted);
  transition: color var(--transition), transform var(--transition);
}
.social a:hover { color: var(--accent); transform: translateY(-1px); }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 17px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; border-color: var(--accent-2); background: var(--panel-3); transform: translateY(-1px); }
.btn.primary {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); box-shadow: 0 4px 18px rgba(232,232,232,.12); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; }

.input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(232,232,232,.06); }
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.alert {
  padding: 11px 15px; border-radius: 11px; margin: 14px 0; font-size: 14px; font-weight: 500;
  animation: slideUp .35s ease both;
}
.alert.ok { background: rgba(125,211,168,.1); border: 1px solid rgba(125,211,168,.25); color: var(--ok); }
.alert.err { background: rgba(240,198,116,.1); border: 1px solid rgba(240,198,116,.25); color: var(--warn); }

.post-card { display: block; color: var(--text); }
.post-card:hover { text-decoration: none; }
.post-card h3 { margin: 0 0 6px; font-size: 18px; }
.post-card .meta { color: var(--muted); font-size: 13px; }
.post-card .muted { margin: 8px 0 0; }
.post-body { font-size: 16px; color: #e0e0e0; }
.post-body img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.post-body a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color var(--transition); }
.post-body a:hover { border-color: var(--accent); }

.coll-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.coll {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 10px; text-align: center; transition: transform var(--transition), border-color var(--transition);
}
.coll:hover { transform: translateY(-3px); border-color: #2a2a2a; }
.coll.locked { opacity: .35; filter: grayscale(.7); }
.coll .icon { font-size: 30px; }
.coll .name { font-weight: 700; font-size: 14px; margin-top: 6px; }
.coll .rare { color: var(--accent-2); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.coll .desc { color: var(--muted); font-size: 12px; margin-top: 5px; }

/* ---------- Game inventory (backpack) ---------- */
.inv {
  background: linear-gradient(180deg, #0c0c0c, #090909);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  animation: slideUp .55s ease both;
}
.inv-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.inv-slot {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.inv-slot.empty { background: #0b0b0b; border-style: dashed; opacity: .55; }
.inv-slot.empty::after { content: '+'; color: #2c2c2c; font-size: 22px; line-height: 1; }
.inv-slot.filled { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-color: #2a2a2a; }
.inv-slot.filled:hover { transform: translateY(-3px); border-color: var(--accent-2); box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 2; }
.inv-icon { font-size: 30px; line-height: 1; }
.inv-slot img { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; }
.inv-name { font-size: 11px; color: var(--muted); text-align: center; padding: 0 4px; line-height: 1.3; }
.inv-slot[data-rarity="rare"] { border-color: #5b8def; box-shadow: 0 0 0 1px rgba(91,141,239,.22), 0 6px 20px rgba(91,141,239,.08); }
.inv-slot[data-rarity="rare"] .inv-name { color: #9bbcff; }
.inv-slot[data-rarity="epic"] { border-color: #b06ef0; box-shadow: 0 0 0 1px rgba(176,110,240,.22), 0 6px 20px rgba(176,110,240,.1); }
.inv-slot[data-rarity="epic"] .inv-name { color: #d3a8ff; }
.inv-slot[data-rarity="legendary"] { border-color: #f0a93a; box-shadow: 0 0 0 1px rgba(240,169,58,.25), 0 6px 22px rgba(240,169,58,.12); }
.inv-slot[data-rarity="legendary"] .inv-name { color: #ffce86; }
@media (max-width: 640px) { .inv-grid { grid-template-columns: repeat(4, 1fr); } }

.egg {
  position: fixed; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  cursor: pointer; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  animation: float 3.2s ease-in-out infinite; z-index: 30;
  box-shadow: 0 0 24px rgba(255,255,255,.08);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.egg:hover { transform: scale(1.14); background: rgba(255,255,255,.12); box-shadow: 0 0 32px rgba(255,255,255,.15); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line); padding: 12px 20px;
  border-radius: 12px; box-shadow: var(--shadow); z-index: 50; opacity: 0;
  transition: opacity .3s ease, transform .3s ease; pointer-events: none;
  font-weight: 500; color: var(--text);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.muted { color: var(--muted); }
.center { text-align: center; }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.quill-editor { background: #0a0a0a; color: #f0f0f0; border-radius: 11px; border: 1px solid var(--line); }
.quill-editor .ql-toolbar { border-radius: 11px 11px 0 0; border-color: var(--line); background: var(--panel-2); }
.quill-editor .ql-container { border-radius: 0 0 11px 11px; border-color: var(--line); min-height: 240px; font-size: 15px; background: var(--panel); }
.ql-editor.ql-blank::before { color: var(--muted); }
.ql-snow .ql-stroke { stroke: var(--accent-2); }
.ql-snow .ql-fill { fill: var(--accent-2); }

progress, .progress { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--text); border-radius: 999px; transition: width .6s ease; }

.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th, .list td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.list th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-bottom: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px; text-align: center; transition: border-color var(--transition); }
.stat:hover { border-color: #2a2a2a; }
.stat .n { font-size: 26px; font-weight: 700; margin-top: 4px; }

.side .brand:hover .dot { color: var(--accent); }

/* ---------- Home hub ---------- */
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 14px; letter-spacing: .3px; }
.hero { margin-bottom: 10px; }
.hero-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; animation: slideUp .55s ease both; }
.hero-inner .avatar { width: 84px; height: 84px; }
.site-title { font-size: 34px; letter-spacing: 1px; margin: 0; background: linear-gradient(90deg, var(--text), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.hero-banner {
  width: 100%; height: 340px; border-radius: var(--radius); border: 1px solid var(--line);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: var(--shadow); margin-bottom: 26px; position: relative; overflow: hidden;
  animation: slideUp .55s ease both;
}
.hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,9,9,0) 55%, rgba(9,9,9,.55));
}
@media (max-width: 640px) { .hero-banner { height: 200px; } }

.hub { margin: 26px 0 30px; }
.nav-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nav-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; color: var(--text); overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
  animation: slideUp .55s ease both;
}
.nav-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(380px 200px at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.05), transparent 60%);
  opacity: 0; transition: opacity var(--transition); pointer-events: none;
}
.nav-card:hover { transform: translateY(-4px); border-color: #2e2e2e; box-shadow: 0 14px 40px rgba(0,0,0,.5); text-decoration: none; }
.nav-card:hover::before { opacity: 1; }
.nav-icon { font-size: 30px; line-height: 1; }
.nav-name { font-size: 18px; font-weight: 700; }
.nav-desc { font-size: 13px; color: var(--muted); }
.nav-arrow { position: absolute; right: 18px; top: 20px; color: var(--muted); font-size: 18px; transition: transform var(--transition), color var(--transition); }
.nav-card:hover .nav-arrow { transform: translateX(4px); color: var(--accent); }
.nav-card.placeholder {
  min-height: 120px; cursor: default; border-style: dashed; opacity: .45;
  align-items: center; justify-content: center;
}
.nav-card.placeholder::before { display: none; }
.nav-card.placeholder:hover { transform: none; border-color: var(--line); box-shadow: none; background: var(--panel); }
.nav-card.placeholder::after { content: '+'; color: #2c2c2c; font-size: 24px; line-height: 1; }
@media (max-width: 760px) { .nav-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .nav-cards { grid-template-columns: 1fr; } }

/* ---------- Community feed ---------- */
.feed-section { margin-top: 8px; }
.composer { margin: 14px 0 20px; }
.composer .input { resize: vertical; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.feed-list { display: flex; flex-direction: column; gap: 12px; }
.feed-item {
  display: flex; gap: 13px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; animation: slideUp .45s ease both;
  transition: border-color var(--transition);
}
.feed-item:hover { border-color: #2a2a2a; }
.feed-avatar {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent-2);
}
.feed-body { flex: 1; min-width: 0; }
.feed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-author { font-weight: 700; color: var(--text); text-decoration: none; }
.feed-author:hover { color: var(--accent-2); text-decoration: underline; }
.feed-time { font-size: 12px; }
.feed-text { margin: 5px 0 0; color: #e6e6e6; white-space: pre-wrap; word-break: break-word; }
.feed-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.feed-images a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.feed-images img { width: 100%; height: 120px; object-fit: cover; display: block; transition: transform var(--transition); }
.feed-images a:hover img { transform: scale(1.04); }
.feed-previews { display: flex; gap: 8px; margin: 10px 0 0; flex-wrap: wrap; }
.feed-prev { width: 64px; height: 64px; border-radius: 9px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.feed-file, .feed-vis { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.feed-file:hover { color: var(--accent); }
.feed-vis select { width: auto; padding: 5px 8px; font-size: 12px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.composer-foot .muted { margin-right: auto; }

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .site-nav .row { gap: 10px; }
  .nav-links { gap: 12px; }
  .brand { font-size: 16px; }
}

/* ---------- Adam's room (chat) ---------- */
.room-grid { display: grid; grid-template-columns: 1fr 240px; gap: 16px; }
@media (max-width: 760px) { .room-grid { grid-template-columns: 1fr; } }
.room-main { display: flex; flex-direction: column; min-height: 460px; padding: 0; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; max-height: 460px; }
.chat-msg { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; animation: slideUp .3s ease both; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-user { font-weight: 700; font-size: 13px; color: var(--accent-2); }
.chat-text { color: #e8e8e8; background: var(--panel-2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 12px; max-width: 70%; word-break: break-word; }
.chat-msg.mine .chat-text { background: var(--text); color: var(--bg); border-color: var(--text); }
.chat-time { font-size: 11px; color: var(--muted); }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-input .input { flex: 1; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.online-list li { font-size: 14px; padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); }

/* ---------- Theater ---------- */
.screen-wrap { margin-bottom: 22px; }
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 420px;
  background: #000; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.screen-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.screen-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px; }
.danmaku-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.danmaku {
  position: absolute; left: 100%; white-space: nowrap;
  color: #fff; font-size: 16px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.9);
  animation: danmaku-move linear forwards;
}
.danmaku .dm-user { color: #ffd479; }
@keyframes danmaku-move { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 100vw)); } }
.danmaku-input { display: flex; gap: 10px; margin-top: 12px; }
.danmaku-input .input { flex: 1; }

.seats-wrap { padding: 18px; }
.seat-map { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.seat-row { display: flex; gap: 8px; }
.seat {
  width: 26px; height: 26px; border-radius: 6px 6px 9px 9px; border: 1px solid #333;
  background: var(--panel-2); cursor: pointer; transition: all var(--transition);
}
.seat:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.seat.taken { background: #3a2a2a; border-color: #6b3b3b; cursor: not-allowed; opacity: .6; }
.seat.mine { background: var(--text); border-color: var(--text); opacity: 1; }
@media (max-width: 640px) {
  .seat { width: 20px; height: 20px; }
  .seat-row { gap: 5px; }
  .danmaku { font-size: 13px; }
}

/* ---------- Article cards on homepage ---------- */
.articles-section { margin: 26px 0 30px; }
.article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.article-card {
  display: flex; flex-direction: column; color: var(--text); overflow: hidden; padding: 0;
  animation: slideUp .55s ease both;
}
.article-card:hover { text-decoration: none; }
.article-cover {
  width: 100%; height: 150px; background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line); background-color: var(--panel-2);
}
.article-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.article-title { margin: 0; font-size: 17px; line-height: 1.3; }
.article-summary {
  margin: 0; font-size: 13px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Feed post detail + comments ---------- */
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--text); }
.post-detail { margin-bottom: 22px; }
.post-text { white-space: pre-wrap; word-break: break-word; color: #e8e8e8; line-height: 1.75; margin: 0; }
.feed-images.detail { grid-template-columns: repeat(2, 1fr); }
.feed-images.detail img { height: 220px; }
.comments { margin-top: 6px; }
.comment-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.comment { display: flex; gap: 12px; animation: slideUp .35s ease both; }
.comment-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent-2); font-size: 13px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-text { margin: 0; color: #dedede; white-space: pre-wrap; word-break: break-word; }

/* ---------- Mobile nav ---------- */
.nav-row { flex-wrap: nowrap; position: relative; }
.nav-menu { display: flex; flex: 1; align-items: center; justify-content: space-between; margin-left: 10px; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 0; border: none; background: transparent; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .site-nav .row { height: 58px; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-menu {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    background: rgba(9,9,9,.96); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px); flex-direction: column; align-items: stretch;
    margin: 0; padding: 14px 16px 18px; gap: 14px; z-index: 25;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: 4px; margin: 0; }
  .nav-links a { padding: 10px 6px; font-size: 15px; border-radius: 8px; }
  .nav-links a:hover, .nav-links a.active { background: var(--panel); }
  .nav-links a::after { display: none; }
  .nav-right { justify-content: flex-start; flex-wrap: wrap; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav-username { display: none; }
  .hero-inner { gap: 16px; }
  .hero-inner .avatar { width: 64px; height: 64px; }
  .site-title { font-size: 26px; }
  .article-list { grid-template-columns: 1fr; }
  .feed-images { grid-template-columns: repeat(2, 1fr); }
  .feed-images.detail { grid-template-columns: 1fr; }
  .feed-images.detail img { height: auto; }
  .post-detail { padding: 16px; }
}

@media (max-width: 480px) {
  main { padding: 24px 0 52px; }
  h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
  .section-title { font-size: 17px; }
  .hero-banner { height: 180px; border-radius: 0; border-left: none; border-right: none; }
  .feed-item { padding: 14px; gap: 10px; }
  .feed-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .composer { padding: 14px; }
  .article-cover { height: 120px; }
  .article-body { padding: 14px; }
  .btn { padding: 8px 14px; font-size: 13px; }
}
