/* Spaces home: live rail, featured card, topic-coloured cards, empty state. js/pages/home.js */
.sh { position: relative; min-height: 100vh;
  background: radial-gradient(620px 420px at 95% -60px, rgba(139, 92, 246, .26), transparent 65%),
    radial-gradient(560px 380px at -5% 12%, rgba(20, 198, 230, .16), transparent 62%),
    radial-gradient(520px 360px at 60% 105%, rgba(236, 72, 153, .10), transparent 65%); }
.sh .header { background: rgba(27, 30, 38, .72); }
.sh .header-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; min-height: 64px; }
.sh-count { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sh-count .live-dot { background: #ff4d63; }

.sh .tabs { display: inline-flex; margin: 0 16px 12px; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.sh .tab { flex: none; padding: 0 22px; height: 38px; border-radius: 999px; flex-direction: row; justify-content: center; align-items: center; gap: 0; font-size: 14.5px; font-weight: 700; }
.sh .tab::after { display: none; }
.sh .tab:hover { background: transparent; color: var(--text); }
.sh .tab.active { background: #324bff; color: #fff; }

.sh .chips { border-bottom: 0; padding: 4px 16px 6px; }
.sh .chip { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 38px; font-size: 14px; font-weight: 600; background: var(--surface); border-color: var(--border); }
.sh .chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #1890ff); flex: none; }
.sh .chip.active { background: linear-gradient(90deg, #1890ff, #324bff); border-color: transparent; }
.sh .chip.active i { background: #fff; }

.sh-feed { padding-bottom: 28px; }

.sh-rail { display: flex; gap: 16px; padding: 16px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.sh-rail-item, .sh-rail-add { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; background: none; border: 0; color: var(--text); font: inherit; padding: 0; }
.sh-rail-item b, .sh-rail-add b { font-size: 12.5px; font-weight: 600; color: #dfe3ee; }
.sh-rail-item .ring { position: relative; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; }
.sh-rail-item .ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#22d3ee, #8b5cf6, #ec4899, #f59e0b, #22d3ee); animation: sh-spin 5s linear infinite; }
.sh-rail-item .ring .avatar { position: relative; width: 62px; height: 62px; font-size: 19px; border: 3px solid var(--bg); box-sizing: border-box; }
.sh-rail-item .ring em { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); font-style: normal; padding: 2px 8px; border-radius: 999px; background: #e5334b; color: #fff;
  font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; border: 2px solid var(--bg); }
.sh-rail-add span { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed #4a5270; color: #7fa0ff; }
.sh-rail-add svg { width: 26px; height: 26px; }
.sh-rail-add b { color: #9fb0ff; }
@keyframes sh-spin { to { transform: rotate(360deg); } }

.sh-hero { position: relative; overflow: hidden; margin: 16px; border-radius: 28px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .09);
  background: radial-gradient(520px 300px at 88% -10%, rgba(139, 92, 246, .7), transparent 62%), radial-gradient(480px 300px at 0% 110%, rgba(20, 198, 230, .42), transparent 60%),
    radial-gradient(300px 200px at 60% 40%, rgba(236, 72, 153, .2), transparent 70%), #12172a; box-shadow: 0 30px 70px rgba(10, 15, 40, .5); transition: transform .2s; }
.sh-hero:hover { transform: translateY(-2px); }
.sh-hero-eq { position: absolute; right: 28px; bottom: 0; height: 130px; display: flex; align-items: flex-end; gap: 7px; opacity: .9; }
.sh-hero-eq i { width: 6px; border-radius: 3px; background: linear-gradient(180deg, #22d3ee, #324bff); transform-origin: 50% 100%; animation: sh-eq 1.2s ease-in-out infinite; }
.sh-hero-eq i:nth-child(3n) { height: 96px; } .sh-hero-eq i:nth-child(3n+1) { height: 44px; animation-delay: -.5s; } .sh-hero-eq i:nth-child(3n+2) { height: 70px; animation-delay: -.9s; }
.sh-hero-body { position: relative; padding: 26px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 70%; min-height: 230px; }
.sh-hero-tag { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #c9d2f2; }
.sh-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(229, 51, 75, .18); border: 1px solid rgba(255, 77, 99, .45);
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #ff8a99; }
.sh-pill .live-dot { background: #ff4d63; }
.sh-hero h2 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: -.5px; }
.sh-hero-meta { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #d8def5; font-weight: 500; }
.sh-hero-meta i { font-style: normal; color: #7f89ad; }
.sh-hero .topic { background: rgba(255, 255, 255, .14); }
.sh-hero-foot { margin-top: auto; display: flex; align-items: center; gap: 16px; }
.sh-btn-light { background: #fff; color: #0b0f1a; padding: 0 24px; height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.sh-btn-light svg { width: 18px; height: 18px; }

.sh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; }
.sh .space-card { margin: 0; padding: 20px; border-radius: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 190px;
  background: radial-gradient(280px 180px at 100% 0%, color-mix(in srgb, var(--acc, #60a5fa) 18%, transparent), transparent 72%), #1f2330;
  border: 1px solid color-mix(in srgb, var(--acc, #60a5fa) 25%, transparent); transition: transform .2s, border-color .2s, box-shadow .2s; }
.sh .space-card:hover { transform: translateY(-3px); border-color: var(--acc, #324bff); box-shadow: 0 18px 40px color-mix(in srgb, var(--acc, #324bff) 20%, transparent); }
.sh .space-card.scheduled { --acc: #60a5fa; }
.sh .space-card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.2px; }
.sh .space-card .meta { color: #c4c8d4; font-weight: 500; font-size: 14px; }
.sh .space-card .topic { background: color-mix(in srgb, var(--acc, #60a5fa) 18%, transparent); color: var(--acc, #9fb0ff); font-weight: 600; }
.sh .space-card .footer { margin-top: auto; }
.sc-top { display: flex; align-items: center; gap: 8px; }
.sc-cat { padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc); font-size: 12.5px; font-weight: 700; }
.sc-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #ff8a99; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq i { width: 3px; border-radius: 2px; background: #ff8a99; transform-origin: 50% 100%; animation: sh-eq 1.2s ease-in-out infinite; }
.eq i:nth-child(1) { height: 8px; } .eq i:nth-child(2) { height: 14px; animation-delay: -.5s; } .eq i:nth-child(3) { height: 10px; animation-delay: -.9s; } .eq i:nth-child(4) { height: 16px; animation-delay: -.3s; }
@keyframes sh-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.sh .sh-join { background: transparent; color: var(--text); border: 1px solid #4a5270; padding: 0 20px; height: 38px; transition: background .15s, color .15s; }
.sh .space-card:hover .sh-join { background: #fff; color: #0b0f1a; }

.sh-empty { margin: 28px 16px 0; padding: 52px 32px 44px; border-radius: 30px; border: 1px solid var(--border); text-align: center; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(520px 300px at 50% 0%, rgba(50, 75, 255, .28), transparent 70%), #1d2130; }
.sh-empty-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.sh-empty-ring span { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(34, 211, 238, .5); animation: sh-ring 3s ease-out infinite; }
.sh-empty-ring span + span { border-color: rgba(50, 75, 255, .6); animation-delay: 1.5s; }
.sh-empty-ring b { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #14c6e6, #324bff); box-shadow: 0 18px 44px rgba(50, 75, 255, .45); }
.sh-empty-ring b svg { width: 38px; height: 38px; }
@keyframes sh-ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.sh-empty h3 { margin: 26px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.sh-empty p { margin: 10px 0 0; max-width: 420px; font-size: 16px; line-height: 1.5; color: #aab0c0; }
.sh-empty .btn { margin-top: 26px; height: 52px; padding: 0 32px; font-size: 16px; display: inline-flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #14c6e6, #324bff); box-shadow: 0 14px 34px rgba(50, 75, 255, .4); }
.sh-empty .btn svg { width: 18px; height: 18px; }

.sh-w { border-radius: 22px; background: #1f2330; border-color: #2d3240; }
.sh-topics { counter-reset: t; }
.sh-topics .widget-row { counter-increment: t; gap: 14px; }
.sh-topics .widget-row::before { content: counter(t, decimal-leading-zero); width: 26px; font-weight: 700; font-size: 15px; color: #5b6378; }

@media (max-width: 760px) { .sh-grid { grid-template-columns: minmax(0, 1fr); } .sh-hero-body { max-width: 100%; } .sh-hero-eq { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sh * { animation: none !important; } }
