:root {
  color-scheme: dark;
  --bg: #050a10;
  --panel: #090f16;
  --panel-2: #0d131b;
  --line: #1b232d;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #f5f6f7;
  --muted: #939aa5;
  --orange: #ffb21b;
  --green: #40e66d;
  --red: #ff4d43;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 65% 30%, rgba(19, 43, 62, .12), transparent 34%),
    linear-gradient(145deg, #05090e, #040910 58%, #02070c);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 238px minmax(320px, 540px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(3, 8, 13, .92);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 14px; width: max-content; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: #17120a;
  background: linear-gradient(145deg, #ffc43d, #ee8d0e);
  box-shadow: 0 0 24px rgba(255, 177, 21, .12);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: .2px; }

.search-box {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(10, 15, 22, .76);
  color: #b2b6bd;
}
.search-box:focus-within { border-color: rgba(255, 178, 27, .55); box-shadow: 0 0 0 3px rgba(255, 178, 27, .08); }
.search-icon { width: 17px; height: 17px; border: 1.7px solid #c1c5cb; border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 1.7px; right: -5px; bottom: -2px; background: #c1c5cb; transform: rotate(48deg); }
.search-box input { min-width: 0; flex: 1; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-box input::placeholder { color: #858b94; }
.search-box kbd { padding: 4px 7px; border-radius: 6px; background: #11161d; box-shadow: 0 1px 8px rgba(0, 0, 0, .3); font: 12px Inter, sans-serif; }

.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.icon-button, .upload-button, .profile-button { border: 0; cursor: pointer; }
.icon-button { position: relative; width: 40px; height: 40px; background: transparent; font-size: 28px; transform: rotate(180deg); }
.notification-button b { position: absolute; right: 1px; top: 0; min-width: 18px; padding: 2px 5px; border-radius: 20px; color: #17120a; background: var(--orange); font-size: 11px; transform: rotate(180deg); }
.upload-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 19px;
  border-radius: 13px;
  background: #11161e;
  border: 1px solid rgba(255, 255, 255, .02);
  color: inherit;
  text-decoration: none;
}
.upload-button span { margin-right: 6px; font-size: 22px; vertical-align: -1px; }
.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.profile-button img { width: 34px; height: 34px; border: 2px solid rgba(255, 178, 27, .55); border-radius: 50%; object-fit: cover; }
.chevron { margin-left: 1px; color: #bfc3c8; }

.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.sidebar { padding: 24px 18px; border-right: 1px solid var(--line-soft); background: rgba(3, 9, 14, .38); }
.main-nav { display: grid; gap: 4px; margin-bottom: 20px; }
.nav-link { height: 48px; display: flex; align-items: center; gap: 16px; padding: 0 15px; border-radius: 11px; color: #969da6; transition: .2s ease; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav-link.active { color: var(--orange); background: linear-gradient(90deg, rgba(89, 56, 10, .54), rgba(54, 36, 11, .53)); border: 1px solid rgba(255, 178, 27, .16); }
.nav-icon { width: 24px; height: 24px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #bac0c8; }
.nav-icon svg { width: 24px; height: 24px; }
.nav-link.active .nav-icon { color: var(--orange); }

.side-card { padding: 21px 18px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(150deg, rgba(15, 22, 30, .95), rgba(6, 13, 19, .98)); box-shadow: 0 12px 35px rgba(0, 0, 0, .12); }
.side-card + .side-card { margin-top: 10px; }
.side-card h2 { margin: 0 0 10px; font-size: 16px; line-height: 1.35; }
.side-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.donut { width: 118px; height: 118px; display: grid; place-items: center; margin: 18px auto 17px; border-radius: 50%; background: conic-gradient(var(--green) 0 56%, #d65b45 56% 90%, var(--red) 90% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #091017; box-shadow: inset 0 0 20px rgba(0, 0, 0, .5); }
.donut > div { position: relative; z-index: 1; display: grid; text-align: center; }
.donut strong { font-size: 23px; font-weight: 500; }
.donut span { font-size: 11px; }
.donut-stats { display: grid; gap: 8px; font-size: 13px; }
.donut-stats small { color: #87909a; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.contribution-card { padding: 18px; }
.contribution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.contribution-grid > span { display: grid; justify-items: center; gap: 2px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .01); font-size: 18px; }
.contribution-grid small { font-size: 11px; }
.contribution-card > small { color: #7d858e; font-size: 10px; }
.contribution-card em { color: var(--orange); font-style: normal; }
.sidebar-note { margin-top: 25px; color: #747b84; text-align: center; font-size: 11px; line-height: 1.6; }
.sidebar-note span { display: block; margin-top: 7px; color: var(--orange); font-size: 43px; text-shadow: 0 0 20px rgba(255, 178, 27, .45); }

.main-content { min-width: 0; padding: 14px 20px 30px 23px; }
.karma-hero { position: relative; min-height: 430px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(115deg, #07110e 0%, #091017 43%, #0a0d13 100%); isolation: isolate; }
.karma-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 60% 73%, rgba(255, 186, 30, .24), transparent 2%, transparent 16%), radial-gradient(circle at 74% 45%, rgba(165, 21, 11, .26), transparent 25%); opacity: .8; }
.hero-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(55px); opacity: .4; }
.hero-glow-green { width: 230px; height: 360px; left: 22px; top: 40px; background: #1ab542; }
.hero-glow-red { width: 300px; height: 300px; left: 300px; top: 50px; background: #b82b18; opacity: .25; }
.gaben-portrait { position: absolute; z-index: -1; left: 48px; bottom: 0; width: 300px; height: 425px; object-fit: cover; object-position: left bottom; mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 84%, transparent 100%); }
.hero-center { width: min(630px, 55%); margin: 18px auto 0; padding-bottom: 56px; text-align: center; }
.eyebrow { color: #d8d9db; letter-spacing: 2px; font-size: 14px; }
.help { display: inline-grid; width: 14px; height: 14px; place-items: center; margin-left: 5px; border: 1px solid #969ca3; border-radius: 50%; color: #aeb2b7; font-size: 9px; vertical-align: 1px; }
.hero-center h1 { margin: 12px 0 2px; font-size: clamp(26px, 2.3vw, 36px); line-height: 1; letter-spacing: -.6px; }
.company { margin: 6px 0 2px; font-size: 16px; }
.karma-score { color: #55f273; font-size: clamp(70px, 7.8vw, 110px); font-weight: 700; line-height: .95; letter-spacing: -8px; text-shadow: 0 0 22px rgba(59, 238, 100, .22); }
.today-change { margin: 7px 0 25px; color: #efcf67; font-size: 17px; }
.today-change::first-letter { color: var(--green); }
.karma-meter { position: relative; display: flex; width: min(510px, 95%); height: 7px; margin: 0 auto; overflow: visible; border-radius: 10px; box-shadow: 0 0 14px rgba(255, 220, 71, .22); }
.meter-red { width: 44%; background: linear-gradient(90deg, #ff4742, #ff7149); border-radius: 8px 0 0 8px; }
.meter-green { width: 56%; background: linear-gradient(90deg, #f0be4d, #39ea72); border-radius: 0 8px 8px 0; }
.karma-meter i { position: absolute; width: 3px; height: 23px; left: 44%; top: -8px; border-radius: 4px; background: #fff17c; box-shadow: 0 0 18px 8px rgba(255, 232, 57, .5); }
.meter-labels { width: min(510px, 95%); display: flex; justify-content: space-between; margin: 10px auto 0; font-size: 17px; font-weight: 500; }
.vote-row { width: min(360px, 100%); display: grid; grid-template-columns: 155px 172px; justify-content: center; align-items: center; gap: 15px; margin: 17px auto 0; }
.vote-button { height: 60px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 9px; background: rgba(4, 11, 16, .7); cursor: pointer; transition: transform .15s ease, background .15s ease; }
.vote-button:hover { transform: translateY(-2px); }
.vote-button:active { transform: translateY(0) scale(.98); }
.curse-button { border: 1px solid rgba(255, 77, 67, .65); color: var(--red); }
.bless-button { border: 1px solid rgba(64, 230, 109, .6); color: var(--green); }
.vote-icon { font-size: 29px; font-weight: 700; }
.vote-button > span:last-child { display: grid; gap: 5px; }
.vote-button strong { font-size: 16px; }
.vote-button small { color: #aeb3b9; font-size: 11px; }
.community-copy { display: grid; gap: 5px; text-align: left; }
.community-copy strong { color: #eabf5e; font-size: 14px; }
.community-copy span { color: #9ea4ab; font-size: 11px; line-height: 1.5; }
.hero-messages { margin-top: 14px; display: grid; gap: 6px; min-height: 40px; }
.hero-messages #statusPhrase { color: #eabf5e; font-size: 14px; line-height: 1.4; font-weight: 600; }
.community-stats { margin: 10px 0 0; color: #9ea4ab; font-size: 11px; line-height: 1.5; }
.influence-card { position: absolute; top: 106px; right: 26px; width: 255px; height: 266px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 14, 20, .82); box-shadow: 0 18px 60px rgba(0, 0, 0, .22); }
.influence-card h2 { margin: 0; font-size: 14px; }
.influence-ring { width: 128px; height: 128px; display: grid; align-content: center; justify-items: center; margin: 16px auto 4px; border-radius: 50%; background: radial-gradient(circle at center, #091017 61%, transparent 62%), conic-gradient(var(--green) 0 28%, #534a32 28% 100%); }
.influence-ring strong { color: var(--green); font-size: 34px; line-height: 1; }
.influence-ring span { margin-top: 7px; color: #b5bac0; text-align: center; font-size: 11px; line-height: 1.4; }
.influence-stats { display: flex; justify-content: space-between; margin-top: -2px; font-size: 13px; }
.influence-card > p { margin: 22px 0 0; color: #7d858e; font-size: 10px; }
.carousel-arrow { position: absolute; z-index: 2; top: 46%; width: 50px; height: 50px; border: 1px solid #27313a; border-radius: 50%; background: rgba(8, 14, 20, .86); font-size: 38px; line-height: 1; cursor: pointer; }
.carousel-arrow:hover { border-color: rgba(255, 178, 27, .55); }
.carousel-prev { left: 2px; }
.carousel-next { right: 2px; }
.carousel-dots { position: absolute; left: 50%; bottom: 14px; display: flex; gap: 10px; transform: translateX(-50%); }
.carousel-dots button { width: 21px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: #6b727a; cursor: pointer; }
.carousel-dots button.active { background: var(--orange); }

.moments-section { padding-top: 14px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 0 0 10px; font-size: 20px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 11px; }
.filter-tabs button { height: 35px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; color: #a9aeb6; background: #0c1219; cursor: pointer; }
.filter-tabs button.active { color: var(--orange); border-color: var(--orange); box-shadow: 0 0 15px rgba(255, 178, 27, .12); }
.view-actions { display: flex; align-items: center; gap: 12px; }
.view-actions label { height: 42px; display: flex; align-items: center; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: #8e959e; background: #0b1118; white-space: nowrap; }
.view-actions select { color: var(--text); background: transparent; border: 0; outline: 0; cursor: pointer; }
.view-switch { display: flex; height: 42px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #0b1118; }
.view-switch button { width: 55px; border: 0; background: transparent; color: #a4aab1; cursor: pointer; font-size: 23px; }
.view-switch button.active { color: var(--orange); border: 1px solid rgba(255, 178, 27, .32); border-radius: 10px; box-shadow: inset 0 0 16px rgba(255, 178, 27, .08); }

.moments-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.moment-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(155deg, #0c131b, #080e14); box-shadow: 0 16px 40px rgba(0, 0, 0, .15); transition: transform .2s ease, border-color .2s ease; }
.moment-card:hover { transform: translateY(-3px); border-color: #293540; }
.moment-card.hidden { display: none; }
.moment-image { aspect-ratio: 2.03 / 1; overflow: hidden; background: #111923; }
.moment-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.moment-body { padding: 10px 16px 13px; }
.moment-body h3 { min-height: 42px; margin: 0 0 11px; font-size: 15px; line-height: 1.35; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #8f969f; font-size: 11px; white-space: nowrap; }
.author { display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.author img { width: 23px; height: 23px; margin-right: 7px; border-radius: 50%; object-fit: cover; }
.reaction-row { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(95px, 1fr) auto; align-items: center; gap: 10px; margin-top: 13px; }
.reaction { height: 39px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 6px; background: #0b1716; cursor: pointer; white-space: nowrap; }
.reaction.bless { color: var(--green); background: rgba(12, 39, 28, .45); }
.reaction.curse { color: var(--red); background: rgba(42, 19, 22, .42); }
.reaction.voted { box-shadow: 0 0 0 2px currentColor; }
.reaction b { font-weight: 500; }
.comments { min-width: 45px; border: 0; color: #abb1b8; background: transparent; cursor: pointer; }
.load-more { display: flex; align-items: center; justify-content: center; gap: 16px; min-width: 272px; height: 43px; margin: 14px auto 0; border: 1px solid var(--line); border-radius: 8px; background: #0c121a; cursor: pointer; }

.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: 320px; padding: 13px 17px; border: 1px solid #2c3742; border-radius: 10px; background: #111922; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1350px) {
  .influence-card { right: 18px; width: 230px; }
  .hero-center { width: 58%; transform: translateX(2%); }
  .vote-row { grid-template-columns: 145px 158px; }
}

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 210px minmax(280px, 1fr) auto; }
  .brand-name { font-size: 15px; }
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .main-content { padding-left: 15px; }
  .influence-card { display: none; }
  .hero-center { width: 63%; margin-right: 5%; transform: none; }
  .moments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moment-card:last-child { display: none; }
}

@media (max-width: 860px) {
  .topbar { grid-template-columns: auto minmax(240px, 1fr) auto; }
  .brand-name, .profile-button span:not(.chevron), .upload-button { display: none; }
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding: 18px 10px; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-link span:last-child, .side-card, .sidebar-note { display: none; }
  .main-content { padding-right: 14px; }
  .section-heading { align-items: flex-start; }
  .view-actions label { display: none; }
  .hero-center { width: 68%; margin-right: 2%; }
  .gaben-portrait { left: 10px; opacity: .7; }
}

@media (max-width: 680px) {
  .topbar { height: auto; min-height: 56px; grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px 12px; gap: 8px; }
  .search-box kbd { display: none; }
  .app-shell { display: flex; flex-direction: column; min-height: calc(100dvh - 56px); padding-bottom: 64px; }
  .sidebar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 50;
    width: 100%;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line-soft, rgba(255,255,255,.08));
    background: rgba(8, 10, 16, .96);
  }
  .main-nav { display: flex; gap: 2px; margin: 0; }
  .nav-link { flex: 1; flex-direction: column; height: auto; min-height: 52px; gap: 4px; padding: 6px 2px; font-size: 10px; justify-content: center; }
  .nav-link span:last-child { display: block; }
  .side-card, .sidebar-note { display: none; }
  .main-content { padding: 10px; }
  .karma-hero { min-height: 0; height: auto; border-radius: 15px; padding: 16px 12px 18px; }
  .gaben-portrait { position: relative; left: auto; top: auto; width: min(168px, 46vw); height: 168px; margin: 0 auto 8px; opacity: 1; border-radius: 16px; }
  .hero-center { width: 100%; margin: 0 auto; }
  .hero-center h1 { margin-top: 10px; }
  .karma-score { margin-top: 8px; font-size: 48px; letter-spacing: -3px; }
  .influence-card { position: relative; top: auto; right: auto; display: block; width: 100%; height: auto; margin-top: 12px; }
  .vote-row { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; width: 100%; }
  .community-copy { grid-column: 1 / -1; text-align: center; }
  .carousel-arrow { display: none; }
  .carousel-dots { position: relative; left: auto; bottom: auto; transform: none; justify-content: center; margin-top: 12px; }
  .section-heading { display: block; }
  .view-actions { margin-top: 12px; justify-content: flex-end; }
  .view-switch { display: none; }
  .filter-tabs { gap: 7px; }
  .filter-tabs button { padding: 0 12px; }
  .moments-grid { grid-template-columns: 1fr; }
  .moment-card:last-child { display: block; }
  .load-more { min-width: 240px; }
}

@media (max-width: 390px) {
  .topbar-actions { gap: 7px; }
  .profile-button img { width: 31px; height: 31px; }
  .hero-center { width: calc(100% - 18px); }
  .meter-labels { font-size: 14px; }
  .vote-row { padding: 0 5px; }
  .vote-button { gap: 6px; }
  .vote-icon { font-size: 23px; }
  .vote-button strong { font-size: 14px; }
  .meta-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
