@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:             #101624;
  --bg-card:        #182234;
  --bg-card-2:      #202d43;
  --bg-input:       #111a2a;
  --border:         #2b3950;
  --border-bright:  #40536f;
  --primary:        #58b7ff;
  --primary-hover:  #349fe8;
  --primary-glow:   rgba(88, 183, 255, 0.2);
  --secondary:      #f2c14e;
  --secondary-glow: rgba(242, 193, 78, 0.17);
  --accent:         #ff8a3d;
  --danger:         #c43a3a;
  --success:        #45c486;
  --text:           #f4efe5;
  --text-muted:     #b7c2d4;
  --text-dim:       #74839a;
  --radius:         8px;
  --radius-lg:      12px;
  --wall:           #26364d;
  --w:              1280px;
}

/* VideoSpace: neutral private video library */
.private-video-ui {
  --vs-bg: #0f1115;
  --vs-panel: #181b21;
  --vs-panel-2: #20242c;
  --vs-border: #303640;
  --vs-text: #f6f7f9;
  --vs-muted: #a6adba;
  --vs-accent: #5b8cff;
  background: var(--vs-bg);
  color: var(--vs-text);
}
.private-video-ui .video-nav {
  background: rgba(15,17,21,.94);
  border-bottom: 1px solid var(--vs-border);
  backdrop-filter: blur(16px);
}
.private-video-ui .nav-logo { color: #fff; font-size: 1.25rem; letter-spacing: -.03em; text-transform: none; }
.private-video-ui .nav-logo::before { content: "▶"; color: var(--vs-accent); font-size: .8em; margin-right: .55rem; }
.private-video-ui .nav-links a { color: var(--vs-muted); }
.private-video-ui .nav-links a.active, .private-video-ui .nav-links a:hover { color: #fff; }
.private-video-ui .btn-primary { background: var(--vs-accent); border-color: var(--vs-accent); color: #fff; }
.private-video-ui .btn-secondary { background: var(--vs-panel-2); border-color: var(--vs-border); color: var(--vs-text); }
.private-video-ui input, .private-video-ui textarea {
  background: #11141a; border: 1px solid var(--vs-border); color: var(--vs-text); border-radius: 10px;
}
.private-video-ui input:focus, .private-video-ui textarea:focus { border-color: var(--vs-accent); box-shadow: 0 0 0 3px rgba(91,140,255,.15); outline: none; }
.library-hero, .admin-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin: 2.5rem 0 2rem; }
.library-hero h1, .admin-heading h1 { font-size: clamp(2rem,4vw,3.6rem); letter-spacing: -.05em; margin: .35rem 0; }
.library-hero p, .admin-heading p, .section-heading p, .auth-brand p, .settings-card p { color: var(--vs-muted); margin: 0; }
.eyebrow { color: #8eacff; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; }
.library-stat { min-width: 150px; padding: 1.15rem 1.35rem; background: var(--vs-panel); border: 1px solid var(--vs-border); border-radius: 16px; }
.library-stat strong, .library-stat span { display: block; }.library-stat strong { font-size: 1.8rem; }.library-stat span { color: var(--vs-muted); font-size: .8rem; }
.upload-panel, .admin-card, .settings-card {
  background: var(--vs-panel); border: 1px solid var(--vs-border); border-radius: 18px; padding: 1.35rem; margin-bottom: 1.5rem;
}
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0 0 .25rem; }
.private-video-ui .video-drop-zone { min-height: 170px; border: 1.5px dashed #4a5260; background: #13161c; border-radius: 14px; }
.private-video-ui .video-drop-zone:hover, .private-video-ui .video-drop-zone.dragover { border-color: var(--vs-accent); background: rgba(91,140,255,.06); }
.upload-icon { display: block; font-size: 2.2rem; line-height: 1; color: var(--vs-accent); margin-bottom: .5rem; }
.upload-queue { display: grid; gap: .5rem; margin: 1rem 0; color: var(--vs-muted); }
.upload-file { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--vs-panel-2); padding: .7rem .9rem; border-radius: 10px; }
.upload-file span, .upload-file small { display: block; }.upload-file small { color: var(--vs-muted); margin-top: .15rem; }
.upload-file button { border: 0; background: transparent; color: var(--vs-muted); font-size: 1.4rem; cursor: pointer; }
.upload-options { display: grid; grid-template-columns: minmax(240px,1fr) auto auto; gap: 1rem; align-items: end; }
.upload-options label > span, .field > span { display: block; color: var(--vs-muted); font-size: .8rem; font-weight: 700; margin-bottom: .4rem; }
.upload-options textarea { min-height: 58px; width: 100%; resize: vertical; }
.library-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 2rem 0 1.25rem; }
.library-toolbar .video-search { display: flex; gap: .5rem; width: min(680px,100%); }
.library-toolbar .video-search input { flex: 1; }
.private-video-ui .yt-card { background: transparent; border: 0; }
.private-video-ui .yt-card:hover { transform: translateY(-3px); }
.private-video-ui .yt-thumb { border-radius: 14px; background: #222731; aspect-ratio: 16/9; }
.private-video-ui .yt-card-body h3 { color: var(--vs-text); font-size: 1rem; }
.private-video-ui .yt-meta, .private-video-ui .yt-card-body p { color: var(--vs-muted); }
.thumb-placeholder { font-size: 2rem; color: #717a8a; }
.auth-shell { min-height: 100vh; width: min(100% - 2rem, 1000px); margin: auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.auth-brand h1 { font-size: clamp(3rem,8vw,6rem); letter-spacing: -.07em; margin: .4rem 0 1rem; }
.private-video-ui .login-video-panel { width: auto; background: var(--vs-panel); border: 1px solid var(--vs-border); border-radius: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.login-video-panel h2 { font-size: 1.8rem; margin: 0 0 .4rem; }
.field { display: block; margin: 1rem 0; }.field input { width: 100%; min-height: 44px; padding: .75rem .85rem; }
.auth-submit { width: 100%; margin: .5rem 0 1rem; }
.settings-shell, .admin-shell { width: min(100% - 2rem, 1180px); margin: 0 auto; padding: 1.5rem 0 4rem; }
.settings-card { max-width: 620px; margin: 3rem auto; }
.table-wrap { overflow-x: auto; }.private-video-ui .admin-table th { color: var(--vs-muted); }.private-video-ui .admin-table td { border-color: var(--vs-border); }
.row-actions { display: flex; gap: .45rem; justify-content: flex-end; flex-wrap: wrap; }
.invite-list { display: grid; gap: .6rem; }.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--vs-panel-2); border-radius: 12px; padding: .85rem 1rem; }
.invite-row strong, .invite-row span { display: block; }.invite-row span { color: var(--vs-muted); font-size: .8rem; margin-top: .2rem; }
.status-pill { border-radius: 999px; padding: .25rem .55rem; font-size: .72rem; font-weight: 700; }.status-pill.ok { background: rgba(54,211,153,.14); color: #77e2b8; }.status-pill.warn { background: rgba(255,184,77,.14); color: #ffc76d; }
.private-video-ui .clean-modal { background: var(--vs-panel); border: 1px solid var(--vs-border); color: var(--vs-text); }
.modal-actions, .copy-row { display: flex; gap: .7rem; justify-content: flex-end; }.copy-row input { flex: 1; }

@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; padding: 3rem 0; gap: 1.5rem; }.auth-brand h1 { font-size: 3.5rem; }
  .library-hero, .admin-heading, .library-toolbar, .section-heading, .invite-row { align-items: stretch; flex-direction: column; }
  .upload-options { grid-template-columns: 1fr; }.library-stat { min-width: 0; }
  .private-video-ui .video-nav { gap: .7rem; }.private-video-ui .nav-links { display: none; }
  .private-video-ui .nav-user { margin-left: auto; }.private-video-ui .nav-username span, .private-video-ui .tag-admin { display: none !important; }
  .row-actions { justify-content: flex-start; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

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

/* ── NAV ──────────────────────────────────────────────────────────────────── */

nav {
  background: rgba(8, 9, 10, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  border-bottom-color: rgba(110,201,122,0.2);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 58px;
  box-shadow: 0 1px 24px rgba(0,0,0,0.4);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 28px rgba(110,201,122,0.35);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 0.15rem; flex: 1; }

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius);
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(110, 201, 122, 0.1);
}

.nav-user { display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; }
.nav-username { color: var(--text-muted); }
.nav-username strong { color: var(--primary); }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary { background: var(--primary); color: #060e07; }
.btn-primary:hover {
  background: var(--accent);
  color: #060e07;
  box-shadow: 0 0 18px rgba(110,201,122,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}
.btn-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(110,201,122,0.08);
}

.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(196,58,58,0.3); }
.btn-danger:hover { background: rgba(196,58,58,0.1); border-color: rgba(196,58,58,0.5); }

.btn-sm { padding: 0.28rem 0.65rem; font-size: 0.78rem; }
.btn-lg { padding: 0.7rem 1.6rem; font-size: 0.95rem; }

/* ── LAYOUT ───────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--w);
  margin: 0 auto;
  padding: 2rem 2rem;
  flex: 1;
  width: 100%;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.9fr) minmax(250px, 0.58fr);
  gap: 1.1rem;
  align-items: start;
}

.forum-layout-community { grid-template-columns: minmax(0, 3fr) minmax(250px, 0.56fr); }
.forum-layout-news { grid-template-columns: minmax(0, 2.4fr) minmax(250px, 0.55fr); }

.forum-sidebar { display: grid; gap: 1rem; }
.forum-center { display: flex; flex-direction: column; gap: 1rem; }

.forum-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: calc(100% - 4rem);
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}

/* ── CARDS ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-bright); }

.forum-sidebar-card,
.forum-thread-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.forum-thread-widget.card { padding: 1rem 1.05rem; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero-wall {
  position: relative;
  background:
    radial-gradient(ellipse 80% 100% at 50% -10%, rgba(110,201,122,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 50%, rgba(110,201,122,0.05) 0%, transparent 50%),
    linear-gradient(180deg, #0c150d 0%, #08090a 100%);
  border-bottom: 2px solid rgba(110,201,122,0.3);
  padding: 4.5rem 2rem 0;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.hero-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(110,201,122,0.04) 79px, rgba(110,201,122,0.04) 80px),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(110,201,122,0.03) 39px, rgba(110,201,122,0.03) 40px);
  pointer-events: none;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 60px rgba(110,201,122,0.4), 0 2px 4px rgba(0,0,0,0.8);
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.hero-title span { color: var(--accent); }

.hero-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  opacity: 0.8;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(110,201,122,0.08);
  border: 1px solid rgba(110,201,122,0.35);
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-family: monospace;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}
.hero-ip:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(110,201,122,0.2);
  background: rgba(110,201,122,0.12);
}

.hero-battlements {
  display: flex;
  justify-content: center;
  gap: 3px;
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
}

.hero-battlement {
  width: 28px;
  height: 20px;
  background: rgba(110,201,122,0.25);
  border-radius: 3px 3px 0 0;
  border: 1px solid rgba(110,201,122,0.3);
  border-bottom: none;
  transition: background 0.3s;
}

/* ── HOME STATS ───────────────────────────────────────────────────────────── */

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.home-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.15s, transform 0.15s;
}
.home-stat:hover { border-color: rgba(110,201,122,0.5); transform: translateY(-1px); }

.home-stat-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.home-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.home-stat-sub {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* Stats */

.stats-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(88, 183, 255, 0.12), rgba(242, 193, 78, 0.08)),
    var(--bg-card);
}

.stats-kicker {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.stats-header h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.stats-header p {
  color: var(--text-muted);
  max-width: 66ch;
}

.stats-server-card {
  min-width: 210px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: var(--radius-lg);
  background: rgba(13, 21, 35, 0.48);
  text-align: right;
}

.stats-server-card span,
.stats-metric span,
.leaderboard-head small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stats-server-card strong {
  color: var(--secondary);
  font-family: monospace;
  font-size: 1.15rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stats-metric {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.stats-metric strong {
  display: block;
  color: var(--secondary);
  font-size: 1.65rem;
  line-height: 1.1;
  margin: 0.4rem 0 0.2rem;
}

.stats-metric small,
.placeholder-list span {
  color: var(--text-dim);
  font-family: monospace;
  font-size: 0.75rem;
}

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 1rem;
  align-items: start;
}

.stats-main,
.stats-sidebar {
  min-width: 0;
}

.stats-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.leaderboard-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
}

.leaderboard-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}

.leaderboard-head h3 {
  font-size: 1rem;
  color: var(--text);
}

.leaderboard-head > span {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 1rem;
  border-top: 1px solid var(--border);
}

.leaderboard-list li:first-child {
  border-top: none;
}

.leaderboard-rank {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(88, 183, 255, 0.12);
  border: 1px solid rgba(88, 183, 255, 0.28);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.leaderboard-player {
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-time {
  color: var(--secondary);
  font-family: monospace;
  font-size: 0.8rem;
}

.leaderboard-time small {
  color: var(--text-dim);
  margin-left: 0.25rem;
}

.placeholder-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stats-section-spacer {
  margin-top: 1.5rem;
}

/* ── FORUM HERO ───────────────────────────────────────────────────────────── */

body.forum-page nav {
  border-bottom-color: rgba(110,201,122,0.25);
}

body.forum-page .container {
  max-width: 1600px;
}

body.forum-page .forum-shell { gap: 1rem; }

/* ── NEWS ─────────────────────────────────────────────────────────────────── */

.news-list { display: flex; flex-direction: column; gap: 0.85rem; }

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  color: inherit;
}
.news-card:hover {
  border-color: rgba(110,201,122,0.5);
  border-left-color: var(--accent);
  background: var(--bg-card-2);
  color: inherit;
  transform: translateX(2px);
}

.news-card-title { font-size: 1rem; font-weight: 600; grid-column: 1; color: var(--text); }
.news-card-date { font-size: 0.77rem; color: var(--text-muted); text-align: right; white-space: nowrap; }
.news-card-preview {
  font-size: 0.875rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta { font-size: 0.77rem; color: var(--text-dim); }
.news-card-meta span { color: var(--text-muted); }

.news-full-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.news-full-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.news-full-content { line-height: 1.8; }
.news-full-content p { margin-bottom: 1rem; }

/* ── FORUM INDEX ──────────────────────────────────────────────────────────── */

.forum-index {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.forum-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}

.forum-index-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.forum-section-group + .forum-section-group { border-top: 1px solid var(--border); }

.forum-section-banner {
  padding: 0.85rem 1.1rem;
  background: var(--section-accent, rgba(110,201,122,0.15));
  border-bottom: 1px solid var(--border);
}

.forum-section-banner h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
  color: var(--primary);
}

.forum-section-banner p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.forum-section-list { display: flex; flex-direction: column; }

.forum-section-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(200px, 0.65fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.forum-section-row:hover { background: rgba(110,201,122,0.05); color: inherit; }

.forum-section-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: rgba(110,201,122,0.12);
  border: 1px solid rgba(110,201,122,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
}

.forum-section-body { min-width: 0; }
.forum-section-body h4 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.1rem; color: var(--text); }
.forum-section-body p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.forum-section-meta {
  display: flex; align-items: center; gap: 1rem;
  color: var(--text-muted); font-size: 0.75rem; white-space: nowrap;
}

.forum-section-count { text-align: center; min-width: 48px; }
.forum-section-count strong { display: block; color: var(--primary); font-size: 1rem; font-weight: 700; }

.forum-section-last {
  min-width: 150px; max-width: 220px;
  color: var(--text-muted); text-align: right; line-height: 1.4;
}
.forum-section-last strong { display: block; color: var(--text); font-size: 0.83rem; }

/* ── CATEGORY LIST ────────────────────────────────────────────────────────── */

.category-list { display: flex; flex-direction: column; gap: 0.6rem; }

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.category-card:hover {
  border-color: rgba(110,201,122,0.4);
  background: var(--bg-card-2);
  color: inherit;
  transform: translateX(2px);
}

.category-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.category-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.15rem; }
.category-info p { font-size: 0.78rem; color: var(--text-muted); }

.category-stats {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0.15rem;
  font-size: 0.77rem; color: var(--text-muted);
  min-width: 72px;
}
.category-stats strong { color: var(--primary); font-size: 1rem; font-weight: 700; }

/* ── THREADS ──────────────────────────────────────────────────────────────── */

.thread-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.thread-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
  border-left: 3px solid transparent;
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: var(--bg-card-2); color: inherit; border-left-color: var(--primary); }

.thread-title-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.thread-title { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.badge { font-size: 0.6rem; font-weight: 700; padding: 0.12rem 0.42rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-pin { background: rgba(110,201,122,0.12); color: var(--primary); border: 1px solid rgba(110,201,122,0.3); }
.badge-lock { background: rgba(196,58,58,0.1); color: var(--danger); border: 1px solid rgba(196,58,58,0.25); }
.thread-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.2rem; }

.thread-stats { text-align: right; font-size: 0.77rem; color: var(--text-muted); }
.thread-stats strong { display: block; font-size: 0.95rem; font-weight: 700; color: var(--primary); }

/* ── FORUM TOPBAR ─────────────────────────────────────────────────────────── */

.forum-topbar {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.forum-topbar-sub { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.2rem; }
.forum-topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.forum-quick-links { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.75rem; }
.forum-quick-links a {
  display: block; color: var(--text);
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: var(--radius); padding: 0.6rem 0.85rem; font-size: 0.84rem;
  transition: all 0.15s;
}
.forum-quick-links a:hover {
  color: var(--primary);
  border-color: var(--border-bright);
  background: rgba(110,201,122,0.07);
}

.forum-overview-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem; margin-bottom: 1rem;
}

.forum-overview-block {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.9rem; min-width: 0;
}
.forum-overview-block h3 { font-size: 0.82rem; margin-bottom: 0.7rem; color: var(--primary); font-weight: 700; }

.overview-row {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.6rem 0; border-top: 1px solid var(--border); color: var(--text);
}
.overview-row:first-of-type { border-top: none; }
.overview-row small { color: var(--text-dim); font-size: 0.75rem; }

/* ── POSTS ────────────────────────────────────────────────────────────────── */

.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 148px 1fr;
  overflow: hidden;
}

.post-author {
  background: var(--bg-card-2);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem; text-align: center;
}

.post-author-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #060e07;
  flex-shrink: 0;
  border: 2px solid rgba(110,201,122,0.25);
}

.post-author-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.post-author-mc { font-size: 0.72rem; color: var(--text-muted); }
.post-author-since { font-size: 0.68rem; color: var(--text-dim); margin-top: auto; }

.post-body { padding: 1.25rem; display: flex; flex-direction: column; }
.post-body-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem; padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border); font-size: 0.77rem; color: var(--text-muted);
}
.post-content { flex: 1; line-height: 1.75; white-space: pre-wrap; word-break: break-word; font-size: 0.9rem; }

/* ── BREADCRUMB ───────────────────────────────────────────────────────────── */

.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.25rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-dim); }
.breadcrumb .current { color: var(--text); }

/* ── FORMS ────────────────────────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.6rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110,201,122,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-error {
  background: rgba(196,58,58,0.08); border: 1px solid rgba(196,58,58,0.25);
  color: var(--danger); padding: 0.7rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; margin-bottom: 1rem;
}
.form-success {
  background: rgba(58,138,74,0.08); border: 1px solid rgba(58,138,74,0.25);
  color: var(--success); padding: 0.7rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; margin-bottom: 1rem;
}

/* ── MODAL ────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  backdrop-filter: blur(6px);
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 50px rgba(110,201,122,0.06);
}

.modal-title {
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--primary);
}

.modal-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.1rem; padding: 0.25rem; line-height: 1;
  transition: color 0.15s; border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ── PAGINATION ───────────────────────────────────────────────────────────── */

.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination button {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); padding: 0.38rem 0.85rem;
  border-radius: var(--radius); cursor: pointer;
  font-size: 0.875rem; font-family: inherit; transition: all 0.15s;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #060e07; font-weight: 700; }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* ── SECTION HEADER ───────────────────────────────────────────────────────── */

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); }

/* ── LINK PAGE ────────────────────────────────────────────────────────────── */

.link-page { max-width: 480px; margin: 3rem auto; text-align: center; }

.link-page .pixel-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  text-shadow: 0 0 24px rgba(110,201,122,0.3);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.link-steps { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; text-align: left; }

.link-step {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1rem;
}

.link-step-num {
  width: 28px; height: 28px;
  background: rgba(110,201,122,0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}

.link-step p { font-size: 0.875rem; color: var(--text-muted); }
.link-step p code { color: var(--accent); font-size: 0.85rem; font-family: monospace; }

/* ── CHAT ─────────────────────────────────────────────────────────────────── */

.chat-panel {
  display: flex; flex-direction: column;
  min-height: 580px; scroll-margin-top: 90px;
}

.chat-panel-header {
  display: flex; align-items: center; gap: 0.75rem;
  justify-content: space-between;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}

.chat-panel-header h1 { margin: 0; font-size: 1.1rem; color: var(--primary); }
.chat-panel-subtitle { color: var(--text-muted); font-size: 0.9rem; }

.chat-page-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 58px);
  max-width: 760px; margin: 0 auto; width: 100%;
}

.chat-page-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; gap: 0.75rem;
}
.chat-page-header h1 { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.chat-online-dot {
  width: 8px; height: 8px;
  background: var(--success); border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages-list {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) transparent;
}

.chat-entry {
  display: flex; gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.1s;
}
.chat-entry:hover { background: rgba(255,255,255,0.03); }

.chat-entry-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: #060e07;
  flex-shrink: 0; margin-top: 0.1rem;
}

.chat-entry-body { flex: 1; min-width: 0; }

.chat-entry-meta {
  display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.15rem;
}

.chat-entry-author {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  text-decoration: none; transition: color 0.15s;
}
.chat-entry-author:hover { color: var(--primary); }

.chat-entry-time { font-size: 0.7rem; color: var(--text-dim); }

.chat-entry-text {
  font-size: 0.875rem; color: var(--text-muted);
  line-height: 1.5; word-break: break-word; white-space: pre-wrap;
}

.chat-delete-btn {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 0.7rem; padding: 0.1rem 0.3rem;
  border-radius: 3px; opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  align-self: flex-start; margin-top: 0.15rem;
}
.chat-entry:hover .chat-delete-btn { opacity: 1; }
.chat-delete-btn:hover { color: var(--danger); }

.chat-date-divider {
  text-align: center; font-size: 0.7rem; color: var(--text-dim);
  margin: 0.6rem 0 0.4rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.chat-date-divider::before,
.chat-date-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.chat-input-area {
  border-top: 1px solid var(--border); padding: 0.9rem 1.25rem;
  flex-shrink: 0; background: var(--bg-card-2);
}

.chat-input-row { display: flex; gap: 0.6rem; align-items: flex-end; }

.chat-input-box {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem; font-family: inherit;
  resize: none; min-height: 44px; max-height: 120px;
  overflow-y: auto; transition: border-color 0.15s; line-height: 1.4;
}
.chat-input-box:focus { outline: none; border-color: var(--primary); }

.chat-send-btn {
  background: var(--primary); border: none;
  border-radius: var(--radius); color: #060e07;
  font-size: 0.88rem; font-weight: 700;
  padding: 0 1rem; min-width: 76px; height: 44px;
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--accent); box-shadow: 0 0 14px rgba(110,201,122,0.25); }

.chat-guest-notice {
  text-align: center; padding: 0.75rem;
  font-size: 0.875rem; color: var(--text-muted);
}

/* Forum chat panel overrides */
.forum-chat-panel { padding: 1rem 1.05rem 0.9rem; }
.forum-chat-panel .chat-panel-header { margin-bottom: 0.75rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.forum-chat-panel .chat-panel-header h1 { font-size: 1rem; color: var(--text); }
.forum-chat-panel .chat-panel-subtitle { font-size: 0.82rem; }
.forum-chat-panel .chat-messages-list { height: clamp(380px, 50vh, 600px); max-height: 600px; padding: 0.25rem 0.1rem 0.5rem; }
.forum-chat-panel .chat-input-area { padding: 0.8rem 0 0.1rem; background: transparent; }
.forum-chat-panel .chat-entry { padding-left: 0; padding-right: 0; }

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */

.sidebar-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.7rem; }

.sidebar-link {
  display: block; color: var(--text);
  padding: 0.65rem 0.9rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent; transition: all 0.15s;
  font-size: 0.875rem;
}
.sidebar-link:hover { border-color: var(--border-bright); background: rgba(110,201,122,0.07); color: var(--primary); }

.forum-sidebar-card h3,
.forum-sidebar-card h2 {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); font-weight: 700;
  margin-bottom: 0.75rem;
}

.sidebar-note { color: var(--text-muted); margin-top: 0.7rem; font-size: 0.9rem; line-height: 1.5; }

/* ── TEAM ─────────────────────────────────────────────────────────────────── */

.team-list { display: flex; flex-direction: column; gap: 0.4rem; }

.team-member {
  display: grid; grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem; align-items: center;
  padding: 0.7rem 0.8rem; border-radius: var(--radius);
  border: 1px solid transparent; background: rgba(255,255,255,0.02);
  color: var(--text); transition: all 0.15s;
}
.team-member:hover { border-color: var(--border-bright); background: rgba(110,201,122,0.06); color: var(--text); }
.team-member small { grid-column: 2; color: var(--text-dim); font-size: 0.73rem; }

.team-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim); box-shadow: none;
  transition: background 0.3s;
}
.team-status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(58,138,74,0.15), 0 0 10px rgba(58,138,74,0.3);
}
.team-member.online .team-member-name { color: var(--primary); }
.team-member-name { font-weight: 600; font-size: 0.875rem; }

/* ── PROFILE ──────────────────────────────────────────────────────────────── */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1.95fr) minmax(280px, 340px);
  gap: 1.2rem; align-items: start; margin-top: 1rem;
}

.profile-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.profile-side-card,
.profile-wall {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); border-left: 3px solid var(--primary);
}
.profile-side-card { padding: 1rem 1.1rem; }
.profile-wall { padding: 1.25rem 1.3rem; }

.profile-hero {
  height: 200px; position: relative;
  border-bottom: 2px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden;
}

.profile-avatar-wrap { position: absolute; bottom: -40px; left: 1.5rem; }

.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: #060e07;
  border: 4px solid var(--bg); box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.profile-name-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}

.profile-name { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.profile-title-tag { font-size: 0.8rem; color: var(--primary); font-style: italic; margin-top: 0.25rem; }
.profile-mc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.profile-bio { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; max-width: 100%; margin-top: 0.75rem; }

.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.profile-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem; margin-top: 1rem;
}

.profile-stat {
  text-align: center; padding: 0.75rem 0.5rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.profile-stat strong { display: block; font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.profile-stat span { font-size: 0.73rem; color: var(--text-muted); }

.profile-meta-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.profile-chip {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted); font-size: 0.73rem;
}
.profile-chip-status { border-color: rgba(110,201,122,0.35); color: var(--primary); }

.profile-posts-list { display: flex; flex-direction: column; gap: 0.7rem; }

.profile-post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg); padding: 0.9rem 1.1rem; transition: border-color 0.15s;
}
.profile-post-card:hover { border-color: rgba(110,201,122,0.5); }

.profile-post-thread { font-size: 0.77rem; color: var(--text-dim); margin-bottom: 0.35rem; }
.profile-post-thread a { color: var(--text-muted); }
.profile-post-thread a:hover { color: var(--primary); }

.profile-post-content {
  font-size: 0.875rem; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5;
}
.profile-post-date { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.35rem; }

/* ── WALL ─────────────────────────────────────────────────────────────────── */

.wall-list, .wall-replies { display: flex; flex-direction: column; gap: 0.75rem; }
.wall-list { margin-top: 1rem; }
.wall-node { display: flex; flex-direction: column; gap: 0.85rem; }
.wall-node-reply { padding-left: 1.5rem; border-left: 2px solid rgba(110,201,122,0.15); }

.wall-card {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.9rem 1rem;
}

.wall-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.wall-author { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); }
.wall-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #060e07; font-size: 0.7rem; font-weight: 700;
}

.wall-content { color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; word-break: break-word; font-size: 0.875rem; }
.wall-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.wall-reply-form { margin-top: 0.8rem; }

.wall-reply-form textarea,
.wall-composer textarea {
  width: 100%; min-height: 100px;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border-bright); border-radius: var(--radius);
  padding: 0.75rem 0.875rem; resize: vertical; font-family: inherit; font-size: 0.875rem;
  transition: border-color 0.15s;
}
.wall-reply-form textarea:focus,
.wall-composer textarea:focus { outline: none; border-color: var(--primary); }

.wall-reply-row,
.wall-composer-row {
  display: flex; justify-content: space-between; gap: 0.5rem;
  align-items: center; margin-top: 0.6rem; flex-wrap: wrap;
}

/* ── FRIEND ───────────────────────────────────────────────────────────────── */

.friend-link {
  display: grid; grid-template-columns: auto 1fr;
  gap: 0.55rem; align-items: center; padding: 0.6rem 0.7rem;
}
.friend-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #060e07; font-weight: 700; font-size: 0.77rem;
}
.friend-link strong { display: block; color: var(--text); font-size: 0.875rem; }
.friend-link small { display: block; color: var(--text-dim); font-size: 0.7rem; }

/* ── ADMIN ────────────────────────────────────────────────────────────────── */

.tab-bar { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.tab-btn {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted); font-family: inherit;
  font-size: 0.875rem; font-weight: 600;
  padding: 0.6rem 1.1rem; cursor: pointer;
  transition: all 0.15s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
  text-align: left; padding: 0.6rem 0.75rem;
  color: var(--text-muted); font-weight: 600; font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card-2); }

.cat-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 0.5rem;
  background: var(--bg-card); transition: border-color 0.15s;
}
.cat-row:hover { border-color: var(--border-bright); }
.cat-color-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── COLOR INPUT ──────────────────────────────────────────────────────────── */

.color-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.color-preview-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: #060e07;
}
input[type="color"] {
  width: 44px; height: 36px; border: 1px solid var(--border-bright);
  border-radius: var(--radius); background: var(--bg-input);
  cursor: pointer; padding: 2px;
}

/* ── MISC ─────────────────────────────────────────────────────────────────── */

.tag-admin {
  font-size: 0.62rem; font-weight: 700; padding: 0.12rem 0.42rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(110,201,122,0.12); color: var(--primary);
  border: 1px solid rgba(110,201,122,0.3);
}

.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted); font-size: 0.9rem;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-shell { width: 100%; }
  .forum-sidebar:first-child { order: 2; }
  .forum-center { order: 1; }
  .forum-sidebar:last-child { order: 3; }
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout { grid-template-columns: 1fr; }
  .stats-layout { grid-template-columns: 1fr; }
  .leaderboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav { padding: 0 1rem; gap: 1rem; }
  .container { padding: 1.5rem 1rem; }
  footer { padding: 1.25rem 1rem; }
  .chat-panel { min-height: 480px; }
  .home-stats { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-header { align-items: stretch; flex-direction: column; padding: 1.15rem; }
  .stats-server-card { text-align: left; min-width: 0; }
  .leaderboard-list li { grid-template-columns: 30px minmax(0, 1fr); }
  .leaderboard-time { grid-column: 2; }
  .post-card { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
  .post-author-since { margin-top: 0; margin-left: auto; }
  .category-card { grid-template-columns: auto 1fr; }
  .category-stats { display: none; }
  .hero-wall { padding: 3rem 1rem 0; }
}

/* Modern Minecraft server theme */

body {
  background:
    linear-gradient(180deg, rgba(22, 34, 53, 0.95) 0%, rgba(16, 22, 36, 0.98) 38%, #101624 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 64px);
}

nav {
  background: rgba(18, 25, 39, 0.92);
  border-bottom-color: rgba(88, 183, 255, 0.22);
  box-shadow: 0 12px 36px rgba(4, 10, 20, 0.34);
}

body.forum-page nav {
  border-bottom-color: rgba(88, 183, 255, 0.22);
}

.nav-logo {
  color: var(--secondary);
  text-shadow: 0 0 24px rgba(242, 193, 78, 0.24);
}

.nav-logo:hover,
.nav-logo span,
a:hover {
  color: var(--accent);
}

.nav-links a:hover,
.nav-links a.active {
  color: #f9d76b;
  background: rgba(242, 193, 78, 0.11);
}

.nav-username strong,
a {
  color: var(--primary);
}

.btn-primary,
.chat-send-btn,
.pagination button.active {
  background: linear-gradient(135deg, var(--primary), #7bd2ff);
  color: #071421;
  box-shadow: 0 10px 24px rgba(88, 183, 255, 0.18);
}

.btn-primary:hover,
.chat-send-btn:hover {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: #1c1208;
  box-shadow: 0 12px 28px rgba(255, 138, 61, 0.2);
}

.btn-secondary:hover,
.pagination button:hover {
  color: var(--secondary);
  border-color: rgba(242, 193, 78, 0.55);
  background: rgba(242, 193, 78, 0.09);
}

.hero-wall {
  min-height: 430px;
  background:
    linear-gradient(180deg, rgba(72, 150, 210, 0.38) 0%, rgba(31, 47, 72, 0.84) 45%, rgba(16, 22, 36, 1) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 72px),
    linear-gradient(135deg, #203b5d 0%, #182234 56%, #231a2d 100%);
  border-bottom: 1px solid rgba(242, 193, 78, 0.32);
  box-shadow: inset 0 -90px 120px rgba(8, 13, 22, 0.56), 0 16px 44px rgba(5, 10, 18, 0.34);
}

.hero-wall::before {
  background:
    linear-gradient(135deg, transparent 0 63%, rgba(255,255,255,0.06) 63% 64%, transparent 64%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 40px);
  opacity: 0.75;
}

.hero-title {
  color: #fff6d6;
  text-shadow: 0 5px 0 rgba(18, 25, 39, 0.8), 0 20px 48px rgba(4, 10, 20, 0.45);
}

.hero-title span {
  color: #7bd2ff;
}

.hero-quote,
.hero-sub {
  color: #d9e3f3;
}

.hero-ip {
  background: rgba(255, 246, 214, 0.1);
  border-color: rgba(242, 193, 78, 0.55);
  color: #fff6d6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 12px 28px rgba(4, 10, 20, 0.25);
}

.hero-ip:hover {
  background: rgba(88, 183, 255, 0.14);
  border-color: rgba(88, 183, 255, 0.72);
  color: #9ee0ff;
  box-shadow: 0 0 0 4px rgba(88, 183, 255, 0.09), 0 16px 32px rgba(4, 10, 20, 0.28);
}

.hero-battlement {
  background: linear-gradient(180deg, #3b4c66 0%, #24344c 100%);
  border-color: rgba(242, 193, 78, 0.22);
}

.card,
.home-stat,
.news-card,
.forum-sidebar-card,
.forum-thread-widget,
.forum-index,
.category-card,
.thread-list,
.post-card,
.profile-side-card,
.profile-wall,
.profile-post-card,
.wall-card,
.link-step,
.modal,
.cat-row,
.stats-header,
.stats-metric,
.leaderboard-card {
  background: linear-gradient(180deg, rgba(32, 45, 67, 0.94), rgba(24, 34, 52, 0.98));
  border-color: rgba(84, 103, 132, 0.72);
  box-shadow: 0 14px 34px rgba(4, 10, 20, 0.22);
}

.home-stat,
.news-card,
.forum-sidebar-card,
.forum-thread-widget,
.profile-side-card,
.profile-wall,
.profile-post-card,
.stats-metric {
  border-left-color: var(--secondary);
}

.card:hover,
.home-stat:hover,
.news-card:hover,
.category-card:hover,
.profile-post-card:hover,
.cat-row:hover {
  border-color: rgba(88, 183, 255, 0.5);
  background: linear-gradient(180deg, rgba(39, 55, 80, 0.98), rgba(28, 39, 59, 0.98));
}

.news-card:hover {
  border-left-color: var(--primary);
}

.home-stat-value,
.forum-section-count strong,
.category-stats strong,
.thread-stats strong,
.profile-stat strong,
.forum-overview-block h3,
.chat-panel-header h1,
.chat-page-header h1,
.link-page .pixel-title,
.modal-title,
.section-header h2 {
  color: var(--secondary);
}

.link-page .pixel-title {
  text-shadow: 0 0 24px rgba(88, 183, 255, 0.22);
}

.forum-index-header,
.post-author,
.chat-input-area,
.admin-table tr:hover td,
.forum-overview-block,
.leaderboard-head {
  background: rgba(28, 39, 59, 0.92);
}

.forum-section-banner {
  background: linear-gradient(90deg, rgba(88, 183, 255, 0.13), rgba(242, 193, 78, 0.09));
}

.forum-section-banner h3,
.forum-section-icon,
.thread-row:hover,
.sidebar-link:hover,
.team-member.online .team-member-name,
.profile-title-tag,
.profile-chip-status,
.tag-admin {
  color: var(--primary);
}

.forum-section-row:hover,
.forum-quick-links a:hover,
.sidebar-link:hover,
.team-member:hover {
  background: rgba(88, 183, 255, 0.08);
}

.forum-section-icon,
.link-step-num,
.badge-pin,
.tag-admin {
  background: rgba(88, 183, 255, 0.12);
  border-color: rgba(88, 183, 255, 0.32);
}

.thread-row:hover {
  border-left-color: var(--secondary);
}

.post-author-avatar,
.chat-entry-avatar,
.profile-avatar,
.wall-avatar,
.friend-avatar,
.color-preview-ring {
  background: linear-gradient(135deg, #58b7ff, #f2c14e);
  color: #071421;
}

.post-author-avatar {
  border-color: rgba(242, 193, 78, 0.35);
}

.form-group input,
.form-group textarea,
.form-group select,
.chat-input-box,
.wall-reply-form textarea,
.wall-composer textarea,
input[type="color"] {
  background: rgba(13, 21, 35, 0.95);
  border-color: rgba(84, 103, 132, 0.86);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.chat-input-box:focus,
.wall-reply-form textarea:focus,
.wall-composer textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(88, 183, 255, 0.16);
}

.form-success {
  background: rgba(69, 196, 134, 0.1);
  border-color: rgba(69, 196, 134, 0.28);
}

.modal {
  border-top-color: var(--secondary);
  box-shadow: 0 28px 70px rgba(4, 10, 20, 0.72), 0 0 60px rgba(88, 183, 255, 0.08);
}

.profile-chip-status {
  border-color: rgba(88, 183, 255, 0.38);
}

.wall-node-reply {
  border-left-color: rgba(242, 193, 78, 0.24);
}

.team-status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(69, 196, 134, 0.14), 0 0 10px rgba(69, 196, 134, 0.32);
}

footer {
  background: rgba(12, 18, 30, 0.68);
  border-top-color: rgba(84, 103, 132, 0.68);
}

.hidden { display: none !important; }

/* Video playground */

.video-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-header,
.video-upload,
.video-toolbar,
.video-feature {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(32, 45, 67, 0.94), rgba(24, 34, 52, 0.98));
  box-shadow: 0 14px 34px rgba(4, 10, 20, 0.22);
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
}

.video-header h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.video-header p {
  color: var(--text-muted);
  max-width: 68ch;
}

.video-drop-note {
  min-width: 240px;
  max-width: 420px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: var(--radius);
  color: var(--secondary);
  background: rgba(13, 21, 35, 0.58);
  font-family: monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.video-drop-note span,
.video-drop-note small {
  display: block;
}

.video-drop-note span {
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.video-drop-note small {
  color: var(--text-dim);
}

.video-upload {
  padding: 1rem;
}

.video-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: stretch;
}

.video-drop-zone {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(88, 183, 255, 0.48);
  border-radius: var(--radius);
  background: rgba(13, 21, 35, 0.58);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.video-drop-zone:hover,
.video-drop-zone.dragover {
  border-color: rgba(242, 193, 78, 0.72);
  background: rgba(242, 193, 78, 0.08);
}

.video-drop-zone input {
  display: none;
}

.video-drop-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.video-drop-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.video-upload-side {
  min-width: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.video-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(84, 103, 132, 0.72);
  border-radius: var(--radius);
  background: rgba(13, 21, 35, 0.42);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.video-check input {
  accent-color: var(--primary);
}

.video-upload-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 21, 35, 0.78);
  border: 1px solid rgba(84, 103, 132, 0.72);
  margin-top: 0.85rem;
}

.video-upload-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.12s;
}

.video-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.video-filter {
  display: flex;
  align-items: center;
  gap: 0;
}

.video-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 1rem;
  padding: 1rem;
}

.video-player-wrap {
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #050912;
  border: 1px solid rgba(84, 103, 132, 0.72);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050912;
}

.video-player-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.video-player-placeholder strong {
  color: var(--text);
  font-size: 1.05rem;
}

.video-feature-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.video-feature-meta h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--text);
}

.video-feature-meta p,
.video-card-body p {
  color: var(--text-muted);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-actions,
.video-meta-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.video-meta-row {
  color: var(--text-dim);
  font-family: monospace;
  font-size: 0.76rem;
}

.video-job-msg {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(88, 183, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(88, 183, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.video-upload > .video-job-msg {
  margin-top: 0.85rem;
}

.video-job-error {
  border-color: rgba(196, 58, 58, 0.38);
  background: rgba(196, 58, 58, 0.1);
  color: #ffb7b7;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.video-card {
  overflow: hidden;
  border: 1px solid rgba(84, 103, 132, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(32, 45, 67, 0.94), rgba(24, 34, 52, 0.98));
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.video-card:hover {
  border-color: rgba(88, 183, 255, 0.54);
  transform: translateY(-1px);
}

.video-card.active {
  border-color: rgba(242, 193, 78, 0.72);
  box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.12), 0 14px 34px rgba(4, 10, 20, 0.22);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #101624, #24344c);
  color: var(--text-muted);
  font-weight: 700;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-status {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(13, 21, 35, 0.86);
  border: 1px solid rgba(242, 193, 78, 0.36);
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 800;
}

.video-status.ready {
  border-color: rgba(69, 196, 134, 0.36);
  color: var(--success);
}

.video-card-body {
  padding: 0.85rem 0.95rem 1rem;
}

.video-card-body h3 {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .video-header,
  .video-upload-form,
  .video-toolbar,
  .video-feature {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .video-drop-note {
    min-width: 0;
    max-width: none;
  }

  .video-upload-side {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .video-filter {
    overflow-x: auto;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* Video-only app */

.video-app-page {
  background: #0f141d;
}

.video-nav {
  position: sticky;
}

.video-home {
  width: min(1520px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-studio-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem 0.2rem 0.2rem;
}

.video-studio-bar h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.video-studio-bar p {
  color: var(--text-muted);
}

.video-storage {
  min-width: 170px;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(84, 103, 132, 0.72);
  border-radius: var(--radius);
  background: rgba(18, 25, 39, 0.82);
  text-align: right;
}

.video-storage strong,
.video-storage span {
  display: block;
}

.video-storage strong {
  color: var(--secondary);
  font-size: 1.35rem;
  line-height: 1.1;
}

.video-storage span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.video-upload-compact .video-upload-form {
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr) auto;
}

.video-upload-fields {
  display: grid;
  gap: 0.6rem;
}

.video-upload-fields input,
.video-upload-fields textarea,
.video-search input,
.editor-grid input,
.watch-editor textarea,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(84, 103, 132, 0.86);
  border-radius: var(--radius);
  background: rgba(13, 21, 35, 0.95);
  color: var(--text);
  font: inherit;
}

.video-upload-fields input,
.video-search input,
.editor-grid input {
  min-height: 42px;
  padding: 0.55rem 0.7rem;
}

.video-upload-fields textarea,
.watch-editor textarea,
.comment-form textarea {
  min-height: 68px;
  resize: vertical;
  padding: 0.65rem 0.75rem;
}

.video-browse-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.video-search {
  display: flex;
  gap: 0.6rem;
  min-width: min(560px, 100%);
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.05rem;
}

.yt-card {
  display: block;
  min-width: 0;
  color: inherit;
}

.yt-card:hover {
  color: inherit;
}

.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #121927, #273750);
  border: 1px solid rgba(84, 103, 132, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 800;
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.yt-thumb small {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  background: rgba(5, 9, 18, 0.86);
  color: var(--text);
  font-size: 0.68rem;
}

.yt-card-body {
  padding: 0.6rem 0.1rem 0.2rem;
}

.yt-card-body h3 {
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.28rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-meta,
.yt-card-body p,
.watch-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.yt-card-body p {
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  padding: 0.4rem 0 1rem;
}

.watch-layout {
  width: min(1600px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 1.2rem;
  align-items: start;
}

.login-video-shell {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-video-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(84, 103, 132, 0.72);
  border-radius: var(--radius);
  background: rgba(18, 25, 39, 0.92);
  padding: 1.4rem;
  box-shadow: 0 18px 46px rgba(4, 10, 20, 0.32);
}

.login-video-panel h1 {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.login-video-panel p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.login-video-panel .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.4rem;
}

.watch-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.watch-player-wrap {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #050912;
  border: 1px solid rgba(84, 103, 132, 0.72);
}

.watch-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050912;
}

.watch-info,
.watch-editor,
.comments-panel,
.watch-sidebar {
  border: 1px solid rgba(84, 103, 132, 0.72);
  border-radius: var(--radius);
  background: rgba(18, 25, 39, 0.86);
  padding: 1rem;
}

.watch-info h1 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.watch-info p {
  margin-top: 0.75rem;
  color: var(--text);
  white-space: pre-wrap;
}

.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
}

.watch-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.watch-panel-head h2 {
  font-size: 1rem;
}

.watch-panel-head span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.editor-grid label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.editor-grid input {
  display: block;
  margin-top: 0.25rem;
}

.comment-form {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.comment-form button {
  justify-self: end;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.comment-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #071421;
  font-weight: 800;
}

.comment-item strong,
.comment-item span {
  display: inline-block;
}

.comment-item strong {
  color: var(--text);
  margin-right: 0.45rem;
}

.comment-item span {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.comment-item p {
  color: var(--text-muted);
}

.side-video-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.side-video {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 0.65rem;
  color: inherit;
}

.side-video:hover {
  color: inherit;
}

.side-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #121927;
  border: 1px solid rgba(84, 103, 132, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

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

.side-video strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-video span {
  color: var(--text-muted);
  font-size: 0.74rem;
}

@media (max-width: 1100px) {
  .video-upload-compact .video-upload-form,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    order: 2;
  }
}

@media (max-width: 700px) {
  .video-home,
  .watch-layout {
    width: min(100% - 1rem, 1600px);
  }

  .video-studio-bar,
  .video-browse-bar,
  .video-search,
  .editor-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .video-storage {
    text-align: left;
  }

  .yt-grid {
    grid-template-columns: 1fr;
  }

  .side-video {
    grid-template-columns: 118px minmax(0, 1fr);
  }
}
