*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #fff; color: #000; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
  background: #000;
  color: #f5f5f5;
  direction: rtl;
  min-height: 100vh;
  /* subtle dot grid */
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ===== App shell ===== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.85);
}

/* ===== Views ===== */
.view { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.view.active { display: flex; }

/* ===== Search / Home ===== */
.topbar {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}

.search-wrap { position: relative; }
.search-wrap input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: #f5f5f5;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: rgba(255,255,255,0.25); }
.search-wrap input::placeholder { color: rgba(255,255,255,0.3); }
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.35;
  pointer-events: none;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.filters::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); }
.filter-chip.active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 8px;
  flex-shrink: 0;
}
.results-info {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}
.sort-select {
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: inherit;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: rgba(255,255,255,0.6);
  outline: none;
  cursor: pointer;
}
.sort-select option { background: #111; color: #f5f5f5; }

.prof-list {
  padding: 4px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}
.prof-list::-webkit-scrollbar { width: 3px; }
.prof-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.prof-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(255,255,255,0.015);
}
.prof-card:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.info { flex: 1; min-width: 0; }
.name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.faculty {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.meta {
  display: flex;
  gap: 10px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
}
.score-box { text-align: center; min-width: 40px; }
.score-num {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.score-num.high { color: #4ade80; }
.score-num.mid  { color: #fbbf24; }
.score-num.low  { color: #f87171; }
.score-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255,255,255,0.3);
  font-size: 0.875rem;
}

/* ===== Profile ===== */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
  flex-shrink: 0;
}
.back:hover { color: #f5f5f5; }

.profile-header {
  padding: 12px 20px 16px;
  text-align: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.profile-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin: 0 auto 12px;
}
.profile-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.profile-faculty {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0 12px;
}
.stat {
  background: #000;
  padding: 12px 8px;
  text-align: center;
}
.stat-val {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-val.green { color: #4ade80; }
.stat-val.high { color: #4ade80; }
.stat-val.mid  { color: #fbbf24; }
.stat-val.low  { color: #f87171; }
.stat-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

.dims {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  text-align: right;
}
.dim {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 0.78rem;
  align-items: center;
}
.dim-label { color: rgba(255,255,255,0.45); }
.dim-value { font-weight: 600; color: rgba(255,255,255,0.8); min-width: 28px; text-align: left; }
.bar-wrap {
  grid-column: 1 / -1;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: -2px;
}
.bar { height: 100%; border-radius: 99px; background: #fff; }
.bar--high { background: #4ade80; }
.bar--mid  { background: #fbbf24; }
.bar--low  { background: #f87171; }
.bar--neutral { background: rgba(255,255,255,0.25); }
.dim-value.neutral { color: rgba(255,255,255,0.45); }
.neutral-hint { font-size: 0.7em; color: rgba(255,255,255,0.35); font-weight: 400; }
.mini.neutral strong { color: rgba(255,255,255,0.45); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}
.chip {
  font-size: 0.7rem;
  padding: 4px 11px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: rgba(255,255,255,0.5);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.tab {
  flex: 1;
  padding: 12px 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.15s;
}
.tab:hover { color: rgba(255,255,255,0.6); }
.tab.active { color: #f5f5f5; }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; right: 25%; left: 25%;
  height: 1.5px;
  background: #fff;
  border-radius: 99px;
}

.panel {
  display: none;
  padding: 16px 16px 28px;
  overflow-y: auto;
  flex: 1;
  text-align: right;
}
.panel.active { display: block; }
.panel::-webkit-scrollbar { width: 3px; }
.panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* Review card */
.review {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.015);
}
.review-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
}
.review-course { color: rgba(255,255,255,0.55); font-weight: 500; }
.review-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.mini {
  font-size: 0.68rem;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: rgba(255,255,255,0.45);
}
.mini strong { color: rgba(255,255,255,0.75); font-weight: 600; }
.mini.high strong { color: #4ade80; }
.mini.low strong { color: #f87171; }
.review-text {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; align-items: center; }
.tag-p {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74,222,128,0.1);
  color: #4ade80;
}
.tag-c {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(248,113,113,0.1);
  color: #f87171;
}
.expand {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
}
.expand:hover { color: #f5f5f5; }
.review-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}
.badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.badge-yes { background: rgba(74,222,128,0.1); color: #4ade80; }
.badge-no { background: rgba(248,113,113,0.1); color: #f87171; }
.badge-maybe { background: rgba(251,191,36,0.1); color: #fbbf24; }
.votes { display: flex; gap: 6px; }
.vote {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.vote:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); }
.vote.liked { border-color: rgba(74,222,128,0.3); color: #4ade80; background: rgba(74,222,128,0.08); }
.vote.disliked { border-color: rgba(248,113,113,0.3); color: #f87171; background: rgba(248,113,113,0.08); }

/* Courses */
.course {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.015);
}
.course h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.course p { font-size: 0.7rem; color: rgba(255,255,255,0.35); }
.course-score { text-align: center; min-width: 42px; }
.course-score .n { font-size: 1.1rem; font-weight: 600; }
.course-score .n.high { color: #4ade80; }
.course-score .n.mid  { color: #fbbf24; }
.course-score .n.low  { color: #f87171; }
.course-score .l { font-size: 0.62rem; color: rgba(255,255,255,0.3); }

/* Form */
.fg { margin-bottom: 14px; }
.fg label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
  font-weight: 500;
}
.fg select,
.fg input[type="text"],
.fg input[type="email"],
.fg input[type="password"],
.fg textarea {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5f5f5;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.fg select:focus,
.fg input:focus,
.fg textarea:focus {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
}
.fg textarea { min-height: 72px; resize: vertical; }
.fg select option { background: #111; color: #f5f5f5; }
.fg input::placeholder,
.fg textarea::placeholder {
  color: rgba(255,255,255,0.28);
}
/* Kill browser autofill white background */
.fg input:-webkit-autofill,
.fg input:-webkit-autofill:hover,
.fg input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f5;
  -webkit-box-shadow: 0 0 0 1000px #141414 inset;
  box-shadow: 0 0 0 1000px #141414 inset;
  caret-color: #f5f5f5;
  border-color: rgba(255,255,255,0.1);
  transition: background-color 9999s ease-in-out 0s;
}
.modal .fg { margin-bottom: 12px; }
.modal .fg label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
  font-weight: 500;
  text-align: right;
}
.modal .fg input[type="email"],
.modal .fg input[type="password"] {
  direction: ltr;
  text-align: left;
}

.rr { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rr label { flex: 1; font-size: 0.78rem; color: rgba(255,255,255,0.5); margin: 0; }
.rr input[type="range"] { width: 110px; accent-color: #fff; }
.rv { font-weight: 600; font-size: 0.85rem; min-width: 22px; text-align: left; }

.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  min-height: 42px;
  background: rgba(255,255,255,0.02);
}
.tag-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 500;
}
.tag-item.pros { background: rgba(74,222,128,0.1); color: #4ade80; }
.tag-item.cons { background: rgba(248,113,113,0.1); color: #f87171; }
.tag-item button {
  background: none; border: none; color: inherit;
  cursor: pointer; font-size: 0.85rem; opacity: 0.6; padding: 0 2px;
}
.tag-item button:hover { opacity: 1; }
.tag-add {
  padding: 3px 12px;
  font-size: 0.73rem;
  font-weight: 500;
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 999px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.tag-add:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.6); }
.tag-field {
  flex: 1;
  min-width: 100px;
  background: transparent;
  border: none;
  color: #f5f5f5;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  padding: 3px 0;
}
.tag-field::placeholder { color: rgba(255,255,255,0.25); }

.radios { display: flex; gap: 8px; }
.radios label {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  margin: 0;
  color: rgba(255,255,255,0.45);
}
.radios input { display: none; }
.radios label:has(input:checked) {
  font-weight: 500;
}
.radios .r-yes:has(input:checked) {
  background: rgba(74,222,128,0.15);
  border-color: rgba(74,222,128,0.45);
  color: #4ade80;
}
.radios .r-maybe:has(input:checked) {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.4);
  color: #fbbf24;
}
.radios .r-no:has(input:checked) {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.4);
  color: #f87171;
}

.submit {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  background: #fff;
  border: none;
  border-radius: 999px;
  color: #000;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.submit:hover { opacity: 0.9; }
.note {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  margin-top: 12px;
}




/* Analytics */
.analytics-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.015);
}
.analytics-card h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.analytics-card .hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  margin-bottom: 12px;
  line-height: 1.5;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.insight {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  background: rgba(255,255,255,0.02);
}
.insight .iv {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.insight .il {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
}
.insight .iv.g { color: #4ade80; }
.insight .iv.y { color: #fbbf24; }
.insight .iv.r { color: #f87171; }
.line-chart-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  margin-top: 4px;
}
.line-chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-x-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  padding: 0 2px;
}
.would-bars { display: flex; flex-direction: column; gap: 8px; }
.would-row {
  display: grid;
  grid-template-columns: 70px 1fr 32px;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.would-row .wl { color: rgba(255,255,255,0.45); }
.would-row .wv { color: rgba(255,255,255,0.6); font-weight: 500; text-align: left; }
.would-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.would-fill { height: 100%; border-radius: 99px; }
.would-fill.yes { background: #4ade80; }
.would-fill.maybe { background: #fbbf24; }
.would-fill.no { background: #f87171; }
.dim-compare { display: flex; flex-direction: column; gap: 10px; }
.dim-c-row {
  display: grid;
  grid-template-columns: 90px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}
.dim-c-row .dl { color: rgba(255,255,255,0.4); }
.dim-c-row .dv { font-weight: 600; text-align: left; color: rgba(255,255,255,0.75); }
.dim-c-track {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.dim-c-fill { height: 100%; border-radius: 99px; }
.edited-badge {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  margin-right: 6px;
}

.inbox-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color 0.15s;
}
.inbox-item:hover { border-color: rgba(255,255,255,0.18); }
.inbox-item.unread { border-color: rgba(96,165,250,0.25); background: rgba(96,165,250,0.04); }
.inbox-item.warn-item { border-color: rgba(251,191,36,0.25); background: rgba(251,191,36,0.04); }
.inbox-item .it { font-size: 0.85rem; font-weight: 600; margin-bottom: 3px; }
.inbox-item .im { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-bottom: 6px; }
.inbox-item .ib { font-size: 0.78rem; color: rgba(255,255,255,0.55); line-height: 1.45; }
.thread-msg {
  padding: 8px 10px; border-radius: 10px; margin-bottom: 6px;
  font-size: 0.8rem; line-height: 1.5;
}
.thread-msg.admin { background: rgba(255,255,255,0.05); }
.thread-msg.user { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.15); }
.thread-msg .who { font-size: 0.65rem; color: rgba(255,255,255,0.35); margin-bottom: 2px; }

/* Account / Auth */
.account-btn {
  margin-right: auto;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.account-btn:hover { border-color: rgba(255,255,255,0.3); color: #f5f5f5; }
.account-btn.logged {
  border-color: rgba(74,222,128,0.3);
  color: #4ade80;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%;
  max-width: 360px;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 22px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.modal-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.7);
  transition: all 0.15s;
}
.modal-actions button.primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.modal-actions button.danger {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.35);
  color: #f87171;
}
.modal-actions button:hover { opacity: 0.9; }

.my-post {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}
.my-post-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.my-post-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-bottom: 8px;
}
.my-post-actions {
  display: flex;
  gap: 8px;
}
.my-post-actions button {
  padding: 4px 12px;
  font-size: 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: inherit;
}
.my-post-actions button:hover { color: #f5f5f5; border-color: rgba(255,255,255,0.25); }
.my-post-actions button.del:hover { color: #f87171; border-color: rgba(248,113,113,0.4); }

.report-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  font-size: 0.68rem;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
}
.report-btn:hover { color: #f87171; }

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-family: inherit;
}
.auth-tab.active {
  background: #fff;
  color: #000;
}
.auth-note {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 12px;
}
.empty-my { text-align: center; padding: 24px; color: rgba(255,255,255,0.3); font-size: 0.85rem; }

/* terminal accent */
.term {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-bottom: 4px;
}
.term span { color: #4ade80; }

/* ===== additions for the live (API-connected) version ===== */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button:focus-visible, .prof-card:focus-visible, .tab:focus-visible, .back:focus-visible, select:focus-visible {
  outline: 1.5px solid rgba(255,255,255,0.5); outline-offset: 2px;
}

.state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  line-height: 1.8;
}
.state button {
  margin-top: 12px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.state button:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.skeleton {
  height: 74px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.025), rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  margin-bottom: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #fff;
  color: #000;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #f87171; color: #000; }

.banner {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.025);
}
.banner button {
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.form-error {
  font-size: 0.74rem;
  color: #f87171;
  margin: 10px 0 0;
  line-height: 1.6;
  min-height: 1em;
}
.form-error:empty { display: none; }
.load-more {
  display: block;
  margin: 6px auto 0;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.load-more:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.load-more:disabled { opacity: 0.5; cursor: default; }
.ts-box { margin: 12px 0 4px; display: flex; justify-content: center; min-height: 0; }
.modal select {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5f5f5;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.modal select option { background: #111; color: #f5f5f5; }
.submit:disabled, .modal-actions button:disabled { opacity: 0.5; cursor: default; }
.mine-badge { font-size: 0.62rem; color: #4ade80; margin-right: 6px; }
.dim-value.none, .stat-val.none { color: rgba(255,255,255,0.3); }
.review-text, .my-post-text, .thread-msg { white-space: pre-line; overflow-wrap: anywhere; }
