:root {
  color-scheme: dark;
  --bg: #0b0911;
  --surface: #15121d;
  --surface-2: #1d1928;
  --surface-3: #272135;
  --text: #f7f4fb;
  --muted: #aaa3b7;
  --purple: #9b5cff;
  --purple-light: #c49aff;
  --coral: #ff6f61;
  --green: #72e1ae;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .13;
  pointer-events: none;
}
.ambient-one { background: var(--purple); top: -260px; right: -160px; }
.ambient-two { background: var(--coral); bottom: -340px; left: -260px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(11, 9, 17, .82);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px 12px 12px 4px;
  background: linear-gradient(135deg, var(--purple), var(--coral));
  box-shadow: 0 8px 24px rgba(155, 92, 255, .3);
}
.desktop-nav { display: flex; align-items: center; gap: 36px; color: var(--muted); font-size: 14px; font-weight: 600; }
.desktop-nav a { position: relative; padding: 28px 0; transition: color .2s; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.desktop-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
}
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.icon-button, .avatar, .modal-close {
  border: 0;
  cursor: pointer;
}
.icon-button { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 25px; }
.avatar { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #ff9a73, #8f55ff); font-weight: 800; }
.avatar-small { width: 40px; height: 40px; font-size: 11px; }
.avatar-medium { width: 48px; height: 48px; font-size: 12px; flex: 0 0 auto; }
.avatar-large { width: 104px; height: 104px; font-size: 24px; border: 4px solid var(--surface); }
.avatar.v2 { background: linear-gradient(145deg, #62d4ff, #6047e8); }
.avatar.v3 { background: linear-gradient(145deg, #ffcf68, #f0587d); }
.avatar.v4 { background: linear-gradient(145deg, #72e1ae, #227b95); }

#app { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 100px; }
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.page-heading h1, .hero-copy h1 { margin: 8px 0 10px; letter-spacing: -1.8px; line-height: 1.02; }
.page-heading h1 { font-size: clamp(32px, 5vw, 52px); }
.page-heading p, .hero-copy p { margin: 0; color: var(--muted); line-height: 1.65; }
.eyebrow { color: var(--purple-light); text-transform: uppercase; letter-spacing: 1.7px; font-size: 11px; font-weight: 800; }
.muted { color: var(--muted); }

.home-grid { display: grid; grid-template-columns: minmax(0, 720px) 330px; gap: 30px; align-items: start; }
.stories { display: flex; gap: 17px; padding: 4px 2px 25px; overflow-x: auto; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { min-width: 70px; text-align: center; color: var(--muted); font-size: 11px; }
.story-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--coral), var(--purple));
}
.story-inner { width: 100%; height: 100%; display: grid; place-items: center; border: 3px solid var(--bg); border-radius: 50%; background: var(--surface-3); font-size: 19px; font-weight: 800; color: white; }
.story-add .story-ring { background: var(--surface-3); }
.story-add .story-inner { color: var(--purple-light); }

.card { background: rgba(21, 18, 29, .95); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.post-card { overflow: hidden; margin-bottom: 24px; }
.post-header { display: flex; align-items: center; gap: 13px; padding: 18px 20px; }
.post-user { flex: 1; }
.post-user strong, .post-user small { display: block; }
.post-user small { color: var(--muted); margin-top: 3px; }
.more-button { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.abstract-photo { position: relative; min-height: 390px; overflow: hidden; isolation: isolate; }
.abstract-photo::before, .abstract-photo::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }
.visual-creator { background: radial-gradient(circle at 18% 75%, #f36b5b 0 8%, transparent 9%), linear-gradient(145deg, #321e5d 0%, #9e4e9a 48%, #ee795c 100%); }
.visual-creator::before { width: 260px; height: 260px; border: 58px solid rgba(255,255,255,.15); top: 55px; left: 15%; }
.visual-creator::after { width: 220px; height: 220px; background: rgba(21,8,38,.58); right: 9%; bottom: -50px; }
.visual-stage { background: linear-gradient(155deg, #090812 0 35%, #492080 68%, #ff7061 130%); }
.visual-stage::before { width: 380px; height: 380px; background: conic-gradient(from 180deg, transparent, rgba(162,88,255,.6), transparent 45%); left: 10%; bottom: -230px; }
.visual-stage::after { width: 80px; height: 230px; background: rgba(255,112,97,.75); right: 20%; top: 70px; transform: rotate(35deg); border-radius: 60px; }
.visual-studio { background: linear-gradient(120deg, #172b3d, #296878 45%, #86d8b2); }
.visual-studio::before { width: 240px; height: 240px; border: 35px solid rgba(255,255,255,.2); right: 10%; top: 45px; }
.visual-studio::after { width: 170px; height: 170px; background: #f0c76a; left: 18%; bottom: -60px; }
.visual-label { position: absolute; z-index: 2; left: 24px; bottom: 24px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 30px; background: rgba(10,8,15,.42); backdrop-filter: blur(12px); font-size: 12px; font-weight: 700; }
.post-copy { padding: 18px 20px 3px; line-height: 1.6; }
.post-copy p { margin: 0; }
.post-copy strong { margin-right: 7px; }
.post-actions { display: flex; align-items: center; gap: 8px; padding: 12px 15px 18px; }
.action-button { display: flex; align-items: center; gap: 7px; border: 0; border-radius: 12px; padding: 9px 11px; background: transparent; color: var(--muted); cursor: pointer; transition: .2s; }
.action-button:hover { background: var(--surface-2); color: white; }
.action-button.liked { color: var(--coral); }
.action-button.save { margin-left: auto; }

.sidebar { position: sticky; top: 104px; display: grid; gap: 18px; }
.side-card { padding: 22px; }
.side-card h3 { margin: 0 0 18px; font-size: 16px; }
.mini-event { display: grid; grid-template-columns: 46px 1fr; gap: 13px; align-items: center; margin: 16px 0; cursor: pointer; }
.date-tile { display: grid; place-items: center; height: 52px; border-radius: 13px; background: var(--surface-3); }
.date-tile strong { font-size: 17px; }
.date-tile small { color: var(--coral); font-size: 9px; font-weight: 800; }
.mini-event strong, .mini-event small { display: block; }
.mini-event small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.creator-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.creator-row div:nth-child(2) { flex: 1; }
.creator-row strong, .creator-row small { display: block; }
.creator-row small { color: var(--muted); margin-top: 3px; }
.text-button, .follow-mini { border: 0; background: transparent; color: var(--purple-light); cursor: pointer; font-weight: 700; }
.follow-mini { font-size: 12px; }

.event-hero { position: relative; min-height: 470px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 30px; padding: 42px; background: linear-gradient(125deg, #171027, #3b1d62 48%, #c34e6a); }
.event-hero::before { content: ""; position: absolute; width: 550px; height: 550px; right: -100px; top: -210px; border: 90px solid rgba(255,255,255,.1); border-radius: 50%; }
.event-hero::after { content: ""; position: absolute; width: 240px; height: 440px; left: 50%; top: 45px; border-radius: 140px 140px 20px 20px; transform: rotate(22deg); background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,110,97,.12)); }
.hero-copy { position: relative; z-index: 2; width: min(650px, 100%); }
.hero-copy h1 { font-size: clamp(44px, 7vw, 78px); max-width: 700px; }
.hero-copy p { color: rgba(255,255,255,.75); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0; font-size: 14px; font-weight: 650; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.primary-button, .secondary-button {
  border: 0;
  border-radius: 14px;
  padding: 13px 19px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .2s, filter .2s;
}
.primary-button { background: linear-gradient(135deg, var(--purple), #7b43e9); color: white; box-shadow: 0 12px 28px rgba(155,92,255,.25); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.secondary-button { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); }
.full { width: 100%; }

.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 28px; margin-top: 28px; }
.content-card { padding: 28px; }
.content-card + .content-card { margin-top: 22px; }
.content-card h2, .support-card h2 { margin: 0 0 20px; font-size: 22px; }
.schedule-item { display: grid; grid-template-columns: 65px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--border); }
.schedule-item:first-of-type { border-top: 0; }
.schedule-time { color: var(--purple-light); font-weight: 800; }
.schedule-item strong, .schedule-item small { display: block; }
.schedule-item small { color: var(--muted); margin-top: 6px; line-height: 1.5; }
.participant-stack { display: flex; align-items: center; margin: 20px 0 10px; }
.participant-stack .avatar { margin-right: -10px; border: 3px solid var(--surface); }
.participant-count { margin-left: 22px; color: var(--muted); }
.support-card { position: sticky; top: 105px; padding: 28px; }
.support-card .big-number { display: block; font-size: 32px; margin: 16px 0 3px; }
.progress { height: 9px; margin: 18px 0 10px; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.progress span { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--coral)); }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.safety-note { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }

.live-page { width: min(1380px, 100%); }
.live-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.live-header h1 { margin: 0; font-size: 25px; }
.live-badge { padding: 6px 10px; border-radius: 8px; background: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.viewers { margin-left: auto; color: var(--muted); font-size: 13px; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
.player { position: relative; min-height: 575px; overflow: hidden; border-radius: var(--radius); background: radial-gradient(circle at 50% 60%, #6733a6, transparent 24%), linear-gradient(150deg, #07060b, #151020 60%, #3a1834); }
.player::before { content: ""; position: absolute; inset: 17% 25% 0; background: linear-gradient(180deg, rgba(255,255,255,.13), transparent); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); }
.player::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 18%; height: 3px; background: linear-gradient(90deg, transparent, var(--coral), var(--purple), transparent); box-shadow: 0 0 30px var(--purple); }
.play-button { position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(12,9,18,.55); backdrop-filter: blur(10px); color: white; font-size: 25px; cursor: pointer; }
.player-top { position: absolute; z-index: 2; left: 20px; top: 20px; display: flex; gap: 10px; }
.player-chip { padding: 8px 12px; border-radius: 30px; background: rgba(10,8,14,.55); backdrop-filter: blur(8px); font-size: 11px; }
.reaction-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.reaction-bubble { border: 1px solid var(--border); border-radius: 30px; padding: 10px 15px; background: var(--surface); cursor: pointer; }
.reaction-bubble:hover { border-color: var(--purple); }
.live-side { display: grid; grid-template-rows: 1fr auto; gap: 18px; max-height: 650px; }
.chat-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-title { padding: 18px; border-bottom: 1px solid var(--border); font-weight: 800; }
.chat-messages { flex: 1; padding: 8px 18px; overflow-y: auto; }
.chat-message { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin: 15px 0; font-size: 13px; line-height: 1.45; }
.chat-message .avatar { width: 34px; height: 34px; font-size: 8px; }
.chat-message strong { margin-right: 5px; }
.chat-message p { margin: 0; color: #d6d0dc; }
.chat-input { display: flex; padding: 13px; border-top: 1px solid var(--border); }
.chat-input input { min-width: 0; flex: 1; border: 0; outline: 0; color: white; background: transparent; }
.chat-input button { border: 0; background: transparent; color: var(--purple-light); cursor: pointer; font-size: 20px; }
.live-support { padding: 18px; }
.live-support strong { display: block; margin-bottom: 6px; }
.live-support p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.profile-cover { height: 260px; overflow: hidden; border-radius: 30px; background: linear-gradient(120deg, #241442, #74336e 55%, #ff8067); position: relative; }
.profile-cover::before { content: ""; position: absolute; width: 430px; height: 430px; right: 8%; top: -210px; border: 65px solid rgba(255,255,255,.12); border-radius: 50%; }
.profile-cover::after { content: ""; position: absolute; width: 190px; height: 190px; left: 17%; bottom: -90px; border-radius: 45px; background: rgba(255,255,255,.12); transform: rotate(30deg); }
.profile-info { position: relative; display: flex; align-items: flex-end; gap: 22px; padding: 0 30px; margin-top: -52px; }
.profile-text { flex: 1; padding-top: 60px; }
.profile-text h1 { margin: 0 0 5px; font-size: 32px; }
.profile-text p { margin: 0; color: var(--muted); }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 5px; border-radius: 50%; background: var(--purple); font-size: 11px; vertical-align: 4px; }
.profile-stats { display: flex; gap: 30px; margin: 24px 0 0 156px; padding: 0 30px 25px; border-bottom: 1px solid var(--border); }
.profile-stats strong, .profile-stats small { display: block; }
.profile-stats small { margin-top: 3px; color: var(--muted); }
.profile-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 28px; margin-top: 28px; }
.bio-card { padding: 24px; }
.bio-card h3 { margin: 0 0 14px; }
.bio-card p { color: var(--muted); line-height: 1.65; }
.bio-list { display: grid; gap: 12px; margin-top: 18px; font-size: 13px; }
.upcoming-card { display: flex; gap: 16px; padding: 16px; margin-top: 12px; border-radius: 16px; background: var(--surface-2); cursor: pointer; }
.upcoming-card .date-tile { width: 52px; flex: 0 0 auto; }
.upcoming-card strong, .upcoming-card small { display: block; }
.upcoming-card small { color: var(--muted); margin-top: 5px; line-height: 1.4; }
.profile-feed .abstract-photo { min-height: 330px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,4,8,.78); backdrop-filter: blur(12px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(440px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: 0 30px 100px #000; animation: modalIn .25s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.modal h2 { margin: 10px 0; font-size: 28px; letter-spacing: -.7px; }
.modal > p { color: var(--muted); line-height: 1.55; font-size: 14px; }
.modal-close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); font-size: 22px; }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 25px 0 18px; }
.amount-grid button { padding: 13px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-weight: 800; }
.amount-grid button.selected { border-color: var(--purple); background: rgba(155,92,255,.18); color: var(--purple-light); }
.modal-confirmation { text-align: center; margin-top: 20px; padding: 20px; border-radius: 16px; background: rgba(114,225,174,.1); color: var(--green); }
.modal-confirmation span { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; background: var(--green); color: #10251d; font-weight: 900; }
.modal-confirmation p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 18px; border: 1px solid var(--border); border-radius: 30px; background: var(--surface-3); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }

@media (max-width: 920px) {
  .home-grid, .event-layout, .profile-layout { grid-template-columns: 1fr; }
  .home-grid .sidebar { display: none; }
  .event-layout aside { order: -1; }
  .support-card { position: static; }
  .live-layout { grid-template-columns: 1fr; }
  .live-side { max-height: none; grid-template-columns: 1fr 1fr; grid-template-rows: 420px; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 700px) {
  .topbar { height: 62px; grid-template-columns: 1fr auto; padding: 0 18px; }
  .desktop-nav, .top-actions .icon-button { display: none; }
  #app { width: min(100% - 24px, 600px); padding: 20px 0 100px; }
  .mobile-nav { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; border: 1px solid var(--border); border-radius: 22px; background: rgba(21,18,29,.92); backdrop-filter: blur(20px); box-shadow: var(--shadow); }
  .mobile-nav a { display: grid; place-items: center; gap: 3px; color: var(--muted); }
  .mobile-nav span { font-size: 20px; line-height: 1; }
  .mobile-nav small { font-size: 9px; }
  .mobile-nav a.active { color: var(--purple-light); }
  .mobile-nav .live-link span { display: grid; place-items: center; width: 34px; height: 34px; margin-top: -18px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--coral)); color: white; border: 4px solid var(--bg); font-size: 12px; }
  .page-heading { align-items: start; flex-direction: column; }
  .stories { margin-right: -12px; }
  .abstract-photo { min-height: 330px; }
  .post-header { padding: 15px; }
  .post-copy { padding: 15px 15px 0; font-size: 14px; }
  .post-actions { overflow-x: auto; }
  .event-hero { min-height: 530px; padding: 26px 22px; }
  .event-hero::after { left: 48%; opacity: .7; }
  .hero-copy h1 { font-size: 47px; }
  .hero-meta { display: grid; gap: 10px; }
  .button-row > * { flex: 1; }
  .content-card, .support-card { padding: 22px; }
  .player { min-height: 390px; }
  .live-side { display: grid; grid-template-columns: 1fr; grid-template-rows: 420px auto; }
  .reaction-bar { overflow-x: auto; padding-bottom: 4px; }
  .reaction-bubble { white-space: nowrap; }
  .profile-cover { height: 190px; border-radius: 22px; }
  .profile-info { align-items: flex-start; padding: 0 14px; gap: 14px; }
  .avatar-large { width: 86px; height: 86px; }
  .profile-text { padding-top: 57px; }
  .profile-text h1 { font-size: 24px; }
  .profile-info .primary-button { position: absolute; right: 14px; top: 60px; padding: 10px 13px; }
  .profile-stats { margin: 24px 0 0; padding: 0 14px 20px; justify-content: space-between; gap: 10px; }
  .profile-sidebar { display: block; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: 92px; white-space: nowrap; max-width: calc(100% - 30px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
