/* HudForge Cloud website. Same look as the editor: near-black surfaces, one red accent. */
:root {
  --bg: #08080a; --surface: #111114; --surface-2: #17171b; --field: #1b1b20; --line: #222227; --line-2: #2c2c33;
  --text: #ececf1; --text-2: #b9b9c3; --muted: #7d7d88; --accent: #ff3b4e; --accent-2: #e01f36; --accent-soft: rgba(255, 59, 78, .13);
  --ok: #4fd18b; --warn: #ffcc5c; --radius: 16px;
  font-family: Poppins, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
img { display: block; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code, kbd { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .92em; background: var(--field); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
button, .btn { font: inherit; cursor: pointer; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); padding: 9px 15px;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13.5px; font-weight: 500; transition: border-color .15s, background .15s, transform .15s; }
button:hover, .btn:hover { border-color: #3c3c45; background: #1d1d22; }
button:disabled { opacity: .5; cursor: default; }
.btn-primary { background: linear-gradient(180deg, #ff5162, var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(255, 59, 78, .28); }
.btn-primary:hover { background: linear-gradient(180deg, #ff6372, #ff4456); border-color: transparent; transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-danger { color: #ff8a96; }
.btn-danger:hover { border-color: var(--accent); }
.btn svg, button svg { width: 17px; height: 17px; flex: none; }
input, textarea, select { font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 28px;
  background: rgba(8, 8, 10, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { width: 32px; height: 32px; }
.brand b { color: var(--accent); font-weight: 600; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--text-2); padding: 8px 14px; border-radius: 10px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.on { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-links svg { width: 16px; height: 16px; }
.nav .grow { flex: 1; }
.user { position: relative; }
.user-btn { padding: 5px 12px 5px 5px; border-radius: 999px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, #3a3a44, #22222a); flex: none; object-fit: cover; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.user-menu a, .user-menu button { width: 100%; justify-content: flex-start; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); }
.user-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* layout */
main { flex: 1; width: 100%; max-width: 1220px; margin: 0 auto; padding: 34px 28px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { text-align: center; padding: 56px 24px; }
.empty h3 { font-size: 20px; margin-bottom: 8px; }
.empty .steps { text-align: left; max-width: 520px; margin: 22px auto 0; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.step b.n { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; padding: 22px 28px; display: flex; gap: 18px; justify-content: center; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; background: #17171b; border: 1px solid var(--line-2); padding: 11px 18px; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.toast.ok { border-color: rgba(79, 209, 139, .45); }
.toast.err { border-color: rgba(255, 92, 108, .6); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; }
.pill.on, .pill:hover { border-color: var(--accent); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #55555f; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 209, 139, .2); }

/* landing */
.hero { position: relative; padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero::before { content: ""; position: absolute; inset: -40px -200px auto; height: 520px; background: radial-gradient(600px 300px at 20% 10%, rgba(255, 59, 78, .18), transparent 70%); z-index: -1; }
.hero h1 { font-size: 50px; line-height: 1.08; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 16.5px; color: var(--text-2); max-width: 520px; }
.hero .cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-art { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); aspect-ratio: 16 / 9; background: var(--surface); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 46px; }
.feature { padding: 22px; }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0 16px; }
.section-title h2 { font-size: 22px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 46px; }

/* gallery */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 240px; }
.search input { width: 100%; padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.seg { display: inline-flex; background: var(--field); border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.hud-card { text-decoration: none; overflow: hidden; transition: transform .18s, border-color .18s; display: flex; flex-direction: column; }
.hud-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.hud-card .thumb { aspect-ratio: 16 / 9; background: #0d0d10; border-bottom: 1px solid var(--line); }
.hud-card .thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.hud-card .body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; }
.hud-card h3 { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 14px; height: 14px; }
.meta .by { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.more { display: flex; justify-content: center; margin-top: 24px; }

/* HUD page */
.hud-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.shot { overflow: hidden; }
.shot img { width: 100%; image-rendering: pixelated; }
.side { padding: 20px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.side h1 { font-size: 22px; line-height: 1.25; }
.author { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.stat b { display: block; font-size: 18px; }
.stat span { color: var(--muted); font-size: 12px; }
.actions { display: grid; gap: 8px; }
.actions .row { display: flex; gap: 8px; }
.actions .row > * { flex: 1; justify-content: center; }
.copy { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px dashed var(--line-2); border-radius: 11px; padding: 9px 12px; cursor: pointer; }
.copy code { background: none; border: 0; padding: 0; flex: 1; }
.desc { white-space: pre-wrap; color: var(--text-2); line-height: 1.6; margin: 18px 4px 0; }
.like.on { color: #ff8a96; border-color: var(--accent); }

/* servers */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.server { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.server-top { display: flex; align-items: center; gap: 12px; }
.server-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(150deg, #24242b, #141418); display: grid; place-items: center; border: 1px solid var(--line-2); }
.server-icon img { width: 30px; height: 30px; }
.server h3 { font-size: 16px; }
.server .status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.server .facts { display: flex; gap: 8px; flex-wrap: wrap; }
.members { display: flex; align-items: center; gap: 6px; }
.members .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.members .avatar:first-child { margin-left: 0; }
.server .btns { display: flex; gap: 8px; margin-top: auto; }
.server .btns .btn-primary { flex: 1; justify-content: center; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row .grow { flex: 1; }

/* my HUDs */
.mine { display: grid; gap: 12px; }
.mine-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; padding: 14px; align-items: center; }
.mine-row img { width: 200px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; image-rendering: pixelated; background: #0d0d10; }
.mine-row h3 { font-size: 16px; margin-bottom: 4px; }
.mine-row .btns { display: flex; gap: 8px; }

/* dialogs */
.dialog-ov { position: fixed; inset: 0; z-index: 40; background: rgba(5,5,7,.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.dialog { width: min(480px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog h3 { font-size: 18px; }
.dialog label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.dialog .btns { display: flex; justify-content: flex-end; gap: 8px; }
.login { max-width: 440px; margin: 60px auto; padding: 34px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.login img { width: 72px; height: 72px; }
.discord { background: #5865f2; border-color: transparent; color: #fff; width: 100%; justify-content: center; padding: 12px; }
.discord:hover { background: #4752c4; border-color: transparent; }

@media (max-width: 900px) {
  .hero, .hud-page { grid-template-columns: 1fr; }
  .features, .how { grid-template-columns: 1fr; }
  .side { position: static; }
  .nav { gap: 12px; padding: 0 14px; }
  .nav-links a span { display: none; }
  .mine-row { grid-template-columns: 1fr; }
  .mine-row img { width: 100%; }
  main { padding: 22px 16px 40px; }
}
[hidden] { display: none !important; }
.dev-login { display: flex; gap: 8px; width: 100%; }
.dev-login input { flex: 1; }
