/* Blockboard visual polish layer — v0.7 */
:root {
  --bb-bg: #090709;
  --bb-panel: rgba(18, 13, 16, .88);
  --bb-panel-strong: #151014;
  --bb-line: rgba(255, 236, 229, .095);
  --bb-line-hot: rgba(213, 89, 66, .24);
  --bb-lava: #d96f4f;
  --bb-lava-bright: #f0a06d;
  --bb-portal: #a86cc1;
  --bb-portal-bright: #d79bea;
  --bb-green: #9ab883;
  --bb-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(118, 39, 52, .15), transparent 34rem),
    linear-gradient(rgba(255,255,255,.009) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px),
    var(--bb-bg);
  background-size: auto, 32px 32px, 32px 32px, auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .34;
  background:
    radial-gradient(circle at 18% 22%, rgba(211, 79, 58, .08), transparent 24rem),
    radial-gradient(circle at 83% 18%, rgba(148, 80, 169, .07), transparent 23rem),
    linear-gradient(180deg, transparent 0 64%, rgba(0,0,0,.36));
}

.page-shell { width: min(calc(100% - 40px), 1280px); }

.site-header {
  top: 14px;
  min-height: 70px;
  margin-top: 14px;
  padding: 10px 13px 10px 17px;
  border-color: rgba(255, 239, 232, .105);
  border-radius: 17px;
  background: rgba(11, 8, 10, .82);
  backdrop-filter: blur(24px) saturate(130%);
  box-shadow: 0 14px 42px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.025);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  opacity: .7;
  background: linear-gradient(90deg, transparent, rgba(217,111,79,.45), rgba(168,108,193,.28), transparent);
}

.site-header.is-scrolled {
  border-color: rgba(255,239,232,.13);
  background: rgba(10, 7, 9, .93);
  box-shadow: 0 18px 50px rgba(0,0,0,.44), inset 0 1px rgba(255,255,255,.03);
}

.brand-mark {
  width: 34px;
  height: 34px;
  gap: 3px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.28));
}
.brand-mark span { background: #231b20; border-color: rgba(255,255,255,.065); }
.brand-mark span:nth-child(1) { background: linear-gradient(135deg, #e07c55, #8f2d3e); }
.brand-mark span:nth-child(4) { background: linear-gradient(135deg, #8b476e, #492a45); }
.brand strong { font-size: .84rem; letter-spacing: .155em; }
.brand small { color: #796d71; letter-spacing: .18em; }

.nav-links {
  padding: 4px;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: #9f9297;
  font-size: .77rem;
  font-weight: 780;
}
.nav-links a:hover { color: #f0e7e3; background: rgba(255,255,255,.035); }
.nav-links a.active {
  color: #f8efeb;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 1px;
  background: linear-gradient(90deg, var(--bb-lava), var(--bb-portal));
}

.header-badge {
  min-height: 38px;
  padding: 8px 11px;
  border-color: rgba(255,255,255,.065);
  background: rgba(255,255,255,.025);
}
.status-dot--online { animation: bb-status-pulse 2.4s ease-in-out infinite; }

/* Homepage */
.home-main { padding-top: 22px; }
.dashboard-hero {
  position: relative;
  min-height: 600px;
  padding: 58px 0 48px;
  gap: clamp(34px, 5vw, 72px);
}
.dashboard-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  right: -13rem;
  top: -10rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .17;
  background: conic-gradient(from 70deg, #55233a, #8d3150, #4e315b, #55233a);
  animation: bb-hero-breathe 9s ease-in-out infinite alternate;
}

.compact-copy { max-width: 680px; }
.compact-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(217,111,79,.16);
  border-radius: 999px;
  background: rgba(217,111,79,.035);
}
.compact-copy .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bb-lava);
  box-shadow: 0 0 14px rgba(217,111,79,.6);
}
.compact-copy h1 {
  margin: 17px 0 18px;
  max-width: 700px;
  font-size: clamp(3.5rem, 7.1vw, 6.7rem);
  line-height: .88;
  letter-spacing: -.067em;
  text-wrap: balance;
}
.compact-copy h1 em {
  color: #d7c9c5;
  font-style: normal;
  font-weight: inherit;
}
.compact-copy > p { max-width: 610px; color: #b3a7a5; font-size: 1.01rem; line-height: 1.78; }
.hero-actions { margin-top: 30px; gap: 10px; }
.button { border-radius: 11px; }
.button--primary {
  color: #1c0c0c;
  background: linear-gradient(135deg, #e28761, #b4474e 72%);
  box-shadow: 0 13px 35px rgba(177,64,72,.2), inset 0 1px rgba(255,255,255,.18);
}
.button--secondary { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.025); }
.button--secondary:hover { border-color: rgba(217,111,79,.22); background: rgba(217,111,79,.035); }

.hero-live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  color: #807479;
  font-size: .67rem;
  font-weight: 760;
}
.hero-live-strip span { display: inline-flex; align-items: center; gap: 7px; }
.hero-live-strip i { width: 5px; height: 5px; border-radius: 50%; background: #5b4b51; }

.server-card {
  border-color: rgba(255, 232, 224, .11);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(27,17,22,.96), rgba(12,9,11,.98));
  box-shadow: 0 34px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.03);
}
.server-card--nether::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(109,39,64,.09);
}
.server-card__top { padding: 19px 20px 16px; }
.server-card h2 { font-size: 1.55rem; }
.card-kicker { color: #d98b6d; }

.nether-scene {
  height: 220px;
  background:
    radial-gradient(circle at 54% 48%, rgba(159,85,185,.18), transparent 34%),
    linear-gradient(180deg,#281217 0%,#160c10 68%,#0b0809 100%);
}
.nether-scene::before {
  opacity: .11;
  background-size: 18px 18px;
}
.nether-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.02), transparent 55%, rgba(0,0,0,.42));
}
.portal {
  left: 54%;
  bottom: 22px;
  width: 91px;
  height: 143px;
  border: 12px solid #21181f;
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 45% 38%, rgba(233,177,246,.72), transparent 10%),
    repeating-radial-gradient(ellipse at 52% 50%, rgba(203,130,226,.55) 0 8%, rgba(108,58,129,.55) 9% 17%, rgba(177,98,200,.6) 18% 25%);
  box-shadow: inset 0 0 0 3px #3d2a42, 0 0 28px rgba(162,86,184,.25), 0 0 70px rgba(117,55,140,.12);
  animation: bb-portal-live 4.8s ease-in-out infinite;
}
.portal::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 45% 52% 48% 55%;
  background: conic-gradient(from 0deg, rgba(236,177,249,.28), rgba(104,48,127,.14), rgba(208,117,226,.35), rgba(91,43,111,.1), rgba(236,177,249,.28));
  filter: blur(3px);
  animation: bb-portal-swirl 7s linear infinite;
}
.portal::after {
  inset: 5px;
  opacity: .55;
  background: repeating-linear-gradient(132deg, rgba(236,183,244,.2) 0 5px, rgba(121,66,146,.06) 5px 11px);
  mix-blend-mode: screen;
  animation: bb-portal-shift 2.8s ease-in-out infinite alternate;
}
.portal i { z-index: 2; width: 4px; height: 4px; background: #e8b7f5; }
.basalt { background: linear-gradient(180deg,#24191d,#151013); }
.lava-line {
  height: 16px;
  background: linear-gradient(180deg, #df7449, #8c2e25);
  box-shadow: 0 -8px 30px rgba(220,92,52,.24), 0 -2px 9px rgba(244,132,74,.16);
  animation: bb-lava-flicker 3.8s ease-in-out infinite alternate;
}

.server-stats { background: rgba(0,0,0,.12); }
.server-stats > div { padding: 15px 17px; border-color: rgba(255,255,255,.055); }
.server-stats strong { font-size: 1.02rem; }
.bridge-note { margin: 0 14px 14px; border-style: solid; border-color: rgba(217,111,79,.15); background: rgba(217,111,79,.025); }

/* Shared surfaces */
.panel,
.spotlight-card,
.rail-card,
.feed-card {
  border-color: var(--bb-line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.014), transparent 28%),
    var(--bb-panel);
  box-shadow: 0 18px 55px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.016);
}
.panel { border-radius: 19px; }
.rail-card, .feed-card, .spotlight-card { border-radius: 19px; }
.rail-card:hover, .feed-card:hover, .spotlight-card:hover {
  border-color: rgba(217,111,79,.19);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), #161014;
  transform: translateY(-4px);
}
.rail-card::after, .feed-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.025), transparent 25%);
}

.home-strip { gap: 14px; padding-top: 22px; }
.spotlight-card { background: linear-gradient(135deg, rgba(177,64,72,.08), rgba(145,78,166,.025) 60%), var(--bb-panel); }

.page-intro { position: relative; padding-top: 28px; }
.page-intro::before,
.community-hero::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 2px;
  top: 0;
  left: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--bb-lava), rgba(168,108,193,.75), transparent);
}
.page-intro h1,
.community-hero h1 { text-wrap: balance; }
.page-chip, .verified-badge {
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  backdrop-filter: blur(12px);
}

.activity-list-panel { overflow: hidden; }
.activity-row {
  border-color: rgba(255,255,255,.055) !important;
  background: rgba(255,255,255,.012) !important;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.activity-row:hover {
  border-color: rgba(217,111,79,.14) !important;
  background: rgba(217,111,79,.018) !important;
  transform: translateX(2px);
}
.activity-icon { box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }

.compat-grid > div,
.stack-item,
.server-stat-grid > div {
  background: rgba(255,255,255,.014);
  border-color: rgba(255,255,255,.055) !important;
}

.site-footer {
  margin-top: 38px;
  border-top-color: rgba(255,255,255,.055);
  opacity: .88;
}

/* Crew page polish */
.community-main { padding-top: 58px; }
.community-hero { position: relative; padding-top: 26px; }
.player-grid { gap: 14px; }
.player-card {
  border-color: var(--bb-line) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.016), transparent 24%), var(--bb-panel) !important;
  box-shadow: 0 20px 52px rgba(0,0,0,.18);
  transition: transform .18s ease, border-color .18s ease;
}
.player-card:hover { transform: translateY(-4px); border-color: rgba(217,111,79,.18) !important; }

/* Reveal motion */
.polish-ready .reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}
.polish-ready .reveal-on-scroll.is-visible { opacity: 1; transform: none; }

@keyframes bb-status-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(154,184,131,.1), 0 0 0 rgba(154,184,131,0); }
  50% { box-shadow: 0 0 0 4px rgba(154,184,131,.08), 0 0 18px rgba(154,184,131,.22); }
}
@keyframes bb-hero-breathe { from { transform: scale(.92); opacity: .12; } to { transform: scale(1.08); opacity: .2; } }
@keyframes bb-portal-live { 0%,100% { filter: brightness(.95) saturate(.95); transform: translateY(0); } 50% { filter: brightness(1.12) saturate(1.08); transform: translateY(-1px); } }
@keyframes bb-portal-swirl { to { transform: rotate(360deg) scale(1.05); } }
@keyframes bb-portal-shift { from { transform: translate(-1px,-1px) scale(1.01); } to { transform: translate(2px,1px) scale(1.04); } }
@keyframes bb-lava-flicker { from { filter: brightness(.86); } to { filter: brightness(1.14); } }

@media (max-width: 980px) {
  .dashboard-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 54px; }
  .compact-copy { max-width: 820px; }
  .server-card { max-width: 720px; width: 100%; }
  .nether-scene { height: 250px; }
  .home-strip { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-shell { width: min(calc(100% - 24px), 1280px); }
  .site-header { top: 8px; margin-top: 8px; min-height: 60px; padding: 8px 9px 8px 12px; gap: 10px; }
  .brand small { display: none; }
  .brand-mark { width: 29px; height: 29px; }
  .nav-links {
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 3px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; padding: 7px 9px; font-size: .69rem; }
  .header-badge { min-height: 34px; padding: 7px 9px; }
  .header-status__label { display: none; }
  .dashboard-hero { padding: 42px 0 30px; gap: 28px; }
  .compact-copy h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .compact-copy > p { font-size: .93rem; line-height: 1.7; }
  .hero-live-strip { gap: 10px; }
  .nether-scene { height: 210px; }
  .server-card { border-radius: 18px; }
  .page-intro__row { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-intro h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  .card-rail--wide { grid-auto-columns: minmax(285px, 84vw); }
}

@media (max-width: 520px) {
  .site-header { grid-template-columns: auto minmax(0,1fr) auto; }
  .brand strong { font-size: .72rem; }
  .nav-links { gap: 1px; }
  .nav-links a { padding-inline: 7px; }
  .compact-copy .eyebrow { font-size: .57rem; }
  .hero-actions .button { width: 100%; }
  .server-stats > div { padding-inline: 12px; }
  .server-stats span { font-size: .52rem; }
  .server-stats strong { font-size: .9rem; }
  .portal { left: 56%; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient,
  .status-dot--online,
  .dashboard-hero::before,
  .portal,
  .portal::before,
  .portal::after,
  .lava-line { animation: none !important; }
  .polish-ready .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .activity-row:hover { transform: none; }
}
