/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ===== BACKGROUND & ORBS ===== */
.l-page {
  min-height: 100vh;
  background: #0a0a0a;
  position: relative;
  overflow-x: hidden;
  color: #fff;
}
.l-page::before {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 70%;
  height: 80%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    #0066ff 0deg, #00ccff 60deg, #00ff88 120deg,
    #aaff00 180deg, #ffaa00 210deg, #ff0066 270deg,
    #aa00ff 320deg, #0066ff 360deg
  );
  filter: blur(80px);
  opacity: 0.25;
  border-radius: 50%;
  animation: orb-spin 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.l-page::after {
  content: '';
  position: fixed;
  top: -15%;
  right: 5%;
  width: 50%;
  height: 60%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0066 0deg, #ff6600 60deg, #ffcc00 120deg,
    #00ff66 180deg, #00ccff 240deg, #6600ff 300deg,
    #ff0066 360deg
  );
  filter: blur(100px);
  opacity: 0.15;
  border-radius: 50%;
  animation: orb-spin-reverse 25s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes orb-spin {
  from { transform: rotate(0deg) translate(5%, 10%); }
  to   { transform: rotate(360deg) translate(5%, 10%); }
}
@keyframes orb-spin-reverse {
  from { transform: rotate(0deg) translate(-3%, 8%); }
  to   { transform: rotate(-360deg) translate(-3%, 8%); }
}

/* ===== NAV ===== */
.l-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.l-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 24px;
}
.l-nav-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.l-nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) {
  .l-nav-links { display: flex; }
}
.l-nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s;
}
.l-nav-links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== BUTTONS ===== */
.l-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.l-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}
.l-btn-primary {
  background: #fff;
  color: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.l-btn-primary:hover {
  background: #e5e5e5;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.1);
}
.l-btn-lg {
  padding: 10px 24px;
  font-size: 14px;
}

/* ===== HERO (MASTODON STYLE) ===== */
.l-hero {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
@media (min-width: 768px) {
  .l-hero { flex-direction: row; padding: 120px 24px 100px; min-height: 90vh; align-items: center; }
}
.l-hero-content {
  flex: 1;
  max-width: 560px;
}
.l-hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.l-hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 20px;
}
@media (min-width: 640px) { .l-hero-title { font-size: 44px; } }
@media (min-width: 1024px) { .l-hero-title { font-size: 52px; } }
.l-hero-title .l-gradient-text {
  background: linear-gradient(135deg, #fff 0%, #a0a0c8 40%, #d0d0e8 60%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.l-hero-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 32px;
}
@media (min-width: 640px) { .l-hero-sub { font-size: 16px; } }
.l-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.l-hero-mockup {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 48px 32px;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 40px 40px;
  text-align: center;
}
.l-hero-mockup-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.5);
}
.l-hero-mockup-icon svg { width: 24px; height: 24px; }
.l-hero-mockup-title {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}
.l-hero-mockup-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.6;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== ALTERNATING FEATURES (MASTODON STYLE) ===== */
.l-feature-row {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
}
@media (min-width: 768px) {
  .l-feature-row { flex-direction: row; gap: 64px; padding: 100px 24px; }
  .l-feature-row.reverse { flex-direction: row-reverse; }
}
.l-feature-text {
  flex: 1;
  max-width: 520px;
}
.l-feature-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.l-feature-kicker {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}
.l-feature-heading {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}
@media (min-width: 640px) { .l-feature-heading { font-size: 30px; } }
.l-feature-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.65;
  margin-bottom: 20px;
}
.l-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s;
}
.l-feature-link:hover { color: rgba(255, 255, 255, 0.8); }
.l-feature-link svg { width: 16px; height: 16px; }
.l-feature-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px 28px;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 36px 36px;
}

/* ===== WHY SECTION ===== */
.l-why {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.l-why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 40px;
}
@media (min-width: 640px) { .l-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .l-why-grid { grid-template-columns: repeat(4, 1fr); } }
.l-why-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s;
}
.l-why-card:hover { border-color: rgba(255, 255, 255, 0.1); }
.l-why-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.5);
}
.l-why-icon svg { width: 20px; height: 20px; }
.l-why-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}
.l-why-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.55;
}

/* ===== SECTION LABELS ===== */
.l-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 16px;
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== PREVIEW / DEMO ===== */
.l-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.l-badge-text {
  line-height: 1.5;
  white-space: normal;
}
@media (max-width: 640px) {
  .l-badge {
    align-items: flex-start;
    border-radius: 16px;
  }
  .l-badge-dot {
    margin-top: 5px;
  }
}
.l-badge-dot {
  position: relative;
  display: flex;
  width: 8px;
  height: 8px;
}
.l-badge-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0.75;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.l-badge-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff;
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.l-preview {
  position: relative;
  z-index: 10;
  padding: 0 24px 64px;
}
.l-preview-card {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.06) 100%);
}
.l-preview-inner {
  border-radius: 19px;
  background: #05050f;
  padding: 48px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 48px 48px;
}
.l-preview-content {
  text-align: center;
}
.l-preview-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 24px;
}
.l-preview-tag svg {
  width: 16px;
  height: 16px;
}
.l-preview-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.2);
  max-width: 480px;
  line-height: 1.6;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .l-preview-inner { padding: 64px 48px; }
}

/* ===== SECTIONS ===== */
.l-section {
  position: relative;
  z-index: 10;
  padding: 80px 24px;
}
.l-container {
  max-width: 1100px;
  margin: 0 auto;
}
.l-section-header {
  text-align: center;
  margin-bottom: 56px;
}
.l-section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .l-section-title { font-size: 34px; }
}
.l-section-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== FEATURE CARDS ===== */
.l-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .l-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .l-features { grid-template-columns: repeat(3, 1fr); }
}
.l-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.l-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, rgba(255,255,255,0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}
.l-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.03);
}
.l-card:hover::before {
  opacity: 1;
}
.l-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: background 0.2s, color 0.2s;
}
.l-card:hover .l-card-icon {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}
.l-card-icon svg {
  width: 20px;
  height: 20px;
}
.l-card-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}
.l-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
}

/* ===== STATS ===== */
.l-stats {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%);
}
.l-stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
}
.l-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (min-width: 640px) {
  .l-stats-grid { grid-template-columns: repeat(4, 1fr); gap: 48px; }
}
.l-stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}
@media (min-width: 640px) {
  .l-stat-value { font-size: 32px; }
}
.l-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

/* ===== CTA ===== */
.l-cta {
  position: relative;
  z-index: 10;
  padding: 96px 24px;
  text-align: center;
}
.l-cta-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 12px;
}
@media (min-width: 640px) {
  .l-cta-title { font-size: 28px; }
}
.l-cta-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  max-width: 440px;
  margin: 0 auto 32px;
}

/* ===== FOOTER ===== */
.l-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.l-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
@media (min-width: 640px) {
  .l-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.l-footer-brand {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}
.l-footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.15);
}
.l-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.l-footer-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.15s;
}
.l-footer-links a:hover {
  color: rgba(255, 255, 255, 0.4);
}

/* ===== FEED CARDS ===== */
.feed-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, transform 0.15s ease;
}
.feed-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 103, 25, 0.22), transparent 70%);
  pointer-events: none;
}
.feed-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}
.feed-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.feed-card-meta {
  flex: 1;
  min-width: 0;
}
.feed-card-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.feed-card-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.feed-card-dot,
.feed-card-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}
.feed-card-subject {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
  transition: color 0.15s;
}
.feed-card-subject:hover {
  color: rgba(255, 255, 255, 0.6);
}
.feed-subject-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}
.feed-card-body {
  display: block;
  margin-bottom: 14px;
}
.feed-card-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
  line-height: 1.3;
}
.feed-card-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.feed-vote-group {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 12px;
  position: relative;
}
.feed-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.feed-vote-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}
.feed-vote-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
}
.feed-vote-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.feed-vote-btn.voted-up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}
.feed-vote-btn.voted-down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}
.vote-toast {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  white-space: nowrap;
  background: rgba(25, 25, 30, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 20;
  animation: vote-toast-in 0.15s ease-out;
}
@keyframes vote-toast-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.feed-score {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  min-width: 24px;
  text-align: center;
}
.feed-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  transition: background 0.15s, color 0.15s;
}
.feed-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}
.feed-action-icon {
  width: 16px;
  height: 16px;
}
.feed-action-btn.saved {
  color: #FFD166;
}
.feed-action-btn.saved:hover {
  color: #FFD166;
  background: rgba(255, 209, 102, 0.12);
}
html:not(.dark) .feed-action-btn.saved {
  color: #b8860b;
}
html:not(.dark) .feed-action-btn.saved:hover {
  color: #b8860b;
  background: rgba(184, 134, 11, 0.12);
}

/* ===== FEED COMPOSER ===== */
.feed-composer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.feed-composer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feed-composer-input {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  text-decoration: none;
  display: block;
}
.feed-composer-input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.pagination a,
.pagination .current,
.pagination .gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}
.pagination a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}
.pagination .current {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pagination .disabled {
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* ===== EMPTY STATE ===== */
.feed-empty {
  text-align: center;
  padding: 48px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}
.feed-empty h3 {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}
.feed-empty p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
}

/* ===== POST FORM ===== */
.post-form-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.post-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.post-form-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.post-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
}
.post-form-group {
  margin-bottom: 16px;
}
.post-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
}
.post-form-group input[type="text"],
.post-form-group textarea,
.post-form-group select,
.post-form-group trix-editor {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.post-form-group input[type="text"]::placeholder,
.post-form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.post-form-group input[type="text"]:focus,
.post-form-group textarea:focus,
.post-form-group select:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.post-form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.35)' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.post-form-group select option {
  background: #1a1a1a;
  color: #fff;
}
.post-form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.post-form-body {
  min-height: 300px;
}
.post-form-body trix-editor {
  min-height: 240px;
  padding: 14px;
}
.post-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.post-cancel {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s;
}
.post-cancel:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== POST SHOW ===== */
.post-detail {
  margin-bottom: 20px;
}
.post-detail-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 12px;
}
.comment-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 20px;
}
.comment-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.comment-textarea {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  resize: none;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-height: 40px;
}
.comment-textarea:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.comment-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-item {
  display: flex;
  gap: 10px;
}
.comment-content {
  flex: 1;
  min-width: 0;
}
.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}
.comment-body {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

/* ===== APP HEADER (matches landing nav) ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.app-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
}
.app-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: none;
}
@media (min-width: 640px) { .app-brand { display: block; } }
.app-search {
  display: none;
  flex: 1;
  max-width: 448px;
  margin: 0 16px;
}
@media (min-width: 768px) { .app-search { display: flex; } }
.app-search-wrap {
  position: relative;
  width: 100%;
}
.app-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.app-search-input {
  width: 100%;
  padding: 8px 16px 8px 38px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: background 0.15s;
}
.app-search-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.app-search-input:focus { background: rgba(255, 255, 255, 0.08); }
.app-user-area {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.app-notif-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.app-notif-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}
.app-notif-btn svg { width: 16px; height: 16px; }
.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s;
}
.app-avatar:hover { background: rgba(255, 255, 255, 0.12); }
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.app-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}
.app-btn-primary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  color: #fff;
}
.app-btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===== SIDEBAR ===== */
.app-sidebar {
  display: none;
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  padding: 12px 0;
  overflow-y: auto;
}
@media (min-width: 1024px) { .app-sidebar { display: block; } }
.app-sidebar-section { padding: 0 8px; }
.app-sidebar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.15);
  padding: 0 12px;
  margin-bottom: 6px;
}
.app-sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  margin: 12px 8px;
}
.app-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  transition: background 0.15s, color 0.15s;
  margin: 1px 8px;
  border: 1px solid transparent;
}
.app-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}
.app-sidebar-link.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border-color: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.app-sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.app-right-sidebar {
  display: none;
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  padding: 12px 0;
  overflow-y: auto;
}
@media (min-width: 1280px) { .app-right-sidebar { display: block; } }
.app-trending {
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.app-trending::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.app-trending-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 14px;
}
.app-trending-item {
  display: block;
  padding: 6px 0;
}
.app-trending-code {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  font-family: 'JetBrains Mono', monospace;
}
.app-trending-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s;
}
.app-trending-item:hover .app-trending-name {
  color: rgba(255, 255, 255, 0.8);
}

.feed-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.feed-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.feed-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  width: fit-content;
}
.feed-filter-item {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  transition: background 0.15s, color 0.15s;
}
.feed-filter-item:hover {
  color: rgba(255, 255, 255, 0.7);
}
.feed-filter-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.feed-search {
  margin-bottom: 20px;
}
.feed-search input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.feed-search input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.feed-search input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}



/* ===== FLASH ===== */
.feed-flash {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 80px;
  z-index: 60;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: pop-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.feed-flash.notice {
  background: rgba(0,0,0,0.8);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.08);
}
.feed-flash.alert {
  background: rgba(0,0,0,0.8);
  color: #f87070;
  border-color: rgba(248,112,112,0.2);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.app-content {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  gap: 20px;
  padding: 0 16px 32px;
}


/* ===== MARKDOWN EDITOR ===== */
.mkd-editor {
  display: flex;
  gap: 16px;
  min-height: 360px;
}
.mkd-input {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.mkd-input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}
.mkd-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.mkd-preview {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.7;
  overflow-y: auto;
}
.mkd-preview h1 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.mkd-preview h2 { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: #fff; }
.mkd-preview h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: rgba(255,255,255,0.9); }
.mkd-preview p { margin: 0 0 8px; }
.mkd-preview strong { color: #fff; }
.mkd-preview code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.mkd-preview pre { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }
.mkd-preview pre code { background: none; padding: 0; }
.mkd-preview blockquote { border-left: 3px solid rgba(255,255,255,0.15); padding-left: 12px; margin: 8px 0; color: rgba(255,255,255,0.4); }
.mkd-preview ul { padding-left: 20px; margin: 4px 0; }
.mkd-preview a { color: rgba(255,255,255,0.6); text-decoration: underline; }
@media (max-width: 768px) {
  .mkd-editor { flex-direction: column; }
  .mkd-input, .mkd-preview { min-height: 200px; }
}

/* ===== MARKDOWN TOOLBAR ===== */
.mkd-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.mkd-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 5px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  padding: 0;
  line-height: 1;
}
.mkd-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}
.mkd-tool-btn strong, .mkd-tool-btn em, .mkd-tool-btn s {
  font-size: 13px;
}
.mkd-tool-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}
.mkd-tool-spacer {
  flex: 1;
}
.mkd-tab-btn {
  padding: 4px 14px;
  border-radius: 5px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.mkd-tab-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}
.mkd-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.mkd-editor {
  display: flex;
  gap: 0;
}
.mkd-input {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 0 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.mkd-input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}
.mkd-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.mkd-preview {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.7;
  overflow-y: auto;
}
.mkd-preview h1 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.mkd-preview h2 { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: #fff; }
.mkd-preview h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: rgba(255,255,255,0.9); }
.mkd-preview p { margin: 0 0 8px; }
.mkd-preview strong { color: #fff; }
.mkd-preview code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.mkd-preview pre { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }
.mkd-preview pre code { background: none; padding: 0; }
.mkd-preview blockquote { border-left: 3px solid rgba(255,255,255,0.15); padding-left: 12px; margin: 8px 0; color: rgba(255,255,255,0.4); }
.mkd-preview ul, .mkd-preview ol { padding-left: 20px; margin: 4px 0; }
.mkd-preview a { color: rgba(255,255,255,0.6); text-decoration: underline; }
.mkd-preview hr { border: 0; border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }
@media (max-width: 768px) {
  .mkd-input, .mkd-preview { min-height: 220px; }
}

/* ===== TRIX EDITOR DARK THEME ===== */
.post-form-body {
  min-height: 360px;
}
.post-form-body trix-editor {
  min-height: 320px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}
.post-form-body trix-editor:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}
.post-form-body trix-editor:empty:not(:focus)::before {
  color: rgba(255, 255, 255, 0.2);
}
/* Trix toolbar */
.post-form-body trix-toolbar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 6px 8px;
}
.post-form-body trix-toolbar .trix-button-group {
  border: 0;
  margin: 0 4px;
}
.post-form-body trix-toolbar .trix-button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 8px;
  font-size: 12px;
  transition: background 0.12s, color 0.12s;
}
.post-form-body trix-toolbar .trix-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}
.post-form-body trix-toolbar .trix-button.trix-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.post-form-body trix-toolbar .trix-button--icon {
  width: 30px;
  height: 28px;
  text-indent: unset;
  font-size: 0;
}
.post-form-body trix-toolbar .trix-button--icon::before {
  filter: invert(1);
  opacity: 0.45;
}
.post-form-body trix-toolbar .trix-button--icon:hover::before,
.post-form-body trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 0.85;
}
.post-form-body trix-toolbar .trix-dialogs {
  background: #1a1a1b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}
.post-form-body trix-toolbar .trix-dialog {
  background: #1a1a1b;
  border: 0;
}
.post-form-body trix-toolbar .trix-dialog input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  padding: 8px 12px;
}
.post-form-body trix-toolbar .trix-dialog input:focus {
  border-color: rgba(255,255,255,0.2);
}
/* Trix content inside editor */
.post-form-body trix-editor h1 { font-size: 22px; }
.post-form-body trix-editor blockquote {
  border-left: 3px solid rgba(255,255,255,0.15);
  padding-left: 12px;
  color: rgba(255,255,255,0.5);
}
.post-form-body trix-editor pre {
  background: rgba(255,255,255,0.05);
  padding: 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.post-form-body trix-editor a { color: rgba(255,255,255,0.6); }

/* Connect toolbar to editor */
.post-form-body trix-toolbar + trix-editor {
  border-top: 0 !important;
  border-radius: 0 0 10px 10px !important;
}

/* ===== MARKDOWN EDITOR ===== */
.post-form-body {
  min-height: 360px;
}
.mkd-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.mkd-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 5px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  padding: 0;
  line-height: 1;
}
.mkd-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}
.mkd-tool-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}
.mkd-editor-wrap {
  display: flex;
  min-height: 360px;
}
.mkd-input {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-right: 0;
  border-radius: 0 0 0 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.mkd-input:focus {
  background: rgba(255, 255, 255, 0.06);
}
.mkd-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.mkd-preview {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 0;
  border-radius: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.7;
  overflow-y: auto;
}
.mkd-preview h1 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.mkd-preview h2 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.mkd-preview h3 { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); margin: 0 0 4px; }
.mkd-preview p { margin: 0 0 8px; }
.mkd-preview strong { color: #fff; }
.mkd-preview del { color: rgba(255,255,255,0.3); }
.mkd-preview code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.mkd-preview pre { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }
.mkd-preview pre code { background: none; padding: 0; }
.mkd-preview blockquote { border-left: 3px solid rgba(255,255,255,0.12); padding-left: 12px; margin: 8px 0; color: rgba(255,255,255,0.4); }
.mkd-preview ul, .mkd-preview ol { padding-left: 20px; margin: 4px 0; }
.mkd-preview li { margin: 2px 0; }
.mkd-preview a { color: rgba(255,255,255,0.5); text-decoration: underline; }
.mkd-preview hr { border: 0; border-top: 1px solid rgba(255,255,255,0.06); margin: 16px 0; }
.mkd-preview img { max-width: 100%; border-radius: 8px; }
@media (max-width: 768px) {
  .mkd-editor-wrap { flex-direction: column; }
  .mkd-input, .mkd-preview { min-height: 220px; flex: none; }
  .mkd-input { border-right: 1px solid rgba(255,255,255,0.08); border-radius: 0; }
  .mkd-preview { border-radius: 0; }
}

/* WYSIWYG contenteditable editor */
.mkd-editor-content {
  flex: 1;
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-right-color: rgba(255, 255, 255, 0.04);
  border-radius: 0 0 0 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  overflow-y: auto;
}
.mkd-editor-content:focus {
  background: rgba(255, 255, 255, 0.06);
}
.mkd-editor-content:empty::before {
  content: 'Write your post...';
  color: rgba(255, 255, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.mkd-editor-content h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.mkd-editor-content blockquote {
  border-left: 3px solid rgba(255,255,255,0.2);
  padding-left: 12px; margin: 8px 0;
  color: rgba(255,255,255,0.5);
}
.mkd-editor-content pre {
  background: rgba(255,255,255,0.05); padding: 12px;
  border-radius: 8px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; margin: 8px 0;
}
.mkd-editor-content code {
  background: rgba(255,255,255,0.08); padding: 2px 6px;
  border-radius: 4px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* Full-width editor (no preview) */
.mkd-editor-content {
  min-height: 360px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  overflow-y: auto;
}

.post-form-textarea {
  width: 100%;
  min-height: 320px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.post-form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}
.post-form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* ===== PROFILE ===== */
.profile-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.profile-role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}
.profile-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 8px 0;
  margin-bottom: 16px;
}
.profile-field {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
}
.profile-field + .profile-field {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.profile-field-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}
.profile-field-value {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

/* ===== ONBOARDING ===== */
.onboard-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.onboard-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.onboard-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
}
.onboard-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
}
.onboard-field {
  margin-bottom: 18px;
}
.onboard-field:last-child { margin-bottom: 0; }
.onboard-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
}
.onboard-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.onboard-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.onboard-input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.onboard-select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.35)' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.onboard-select option { background: #1a1a1a; color: #fff; }
.onboard-select:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
}
.onboard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.onboard-error {
  background: rgba(248, 112, 112, 0.08);
  border: 1px solid rgba(248, 112, 112, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #f87070;
}
.onboard-error ul { padding-left: 16px; margin: 4px 0 0; }
.onboard-error li { margin: 2px 0; }

.post-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
}
.post-form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.post-form-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.post-form-input:focus {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
EOF/* ===== APP CARDS (RubyUI replacement) ===== */
.app-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, background 0.2s, transform 0.15s ease;
}
.app-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 103, 25, 0.22), transparent 70%);
  pointer-events: none;
}
.app-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}
.app-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 0;
}
.app-card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.3;
}
.app-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.55;
}
.app-card-content {
  padding: 16px 20px 20px;
}
.app-card-footer {
  display: flex;
  align-items: center;
  padding: 0 20px 20px;
}

/* ===== APP BUTTONS (RubyUI replacement) ===== */
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.app-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}
.app-btn-primary {
  background: #fff;
  color: #000;
  border-color: rgba(255, 255, 255, 0.15);
}
.app-btn-primary:hover {
  background: #e5e5e5;
}
.app-btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}
.app-btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}
.app-btn-ghost {
  background: transparent;
  border-color: transparent;
}
.app-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}
.app-btn-destructive {
  background: rgba(248, 112, 112, 0.15);
  border-color: rgba(248, 112, 112, 0.25);
  color: #f87070;
}
.app-btn-destructive:hover {
  background: rgba(248, 112, 112, 0.25);
}
.app-btn-link {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 8px;
}
.app-btn-link:hover {
  color: #fff;
}
.app-btn-sm { padding: 4px 12px; font-size: 11px; height: 28px; }
.app-btn-lg { padding: 10px 24px; font-size: 14px; height: 40px; }
.app-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== APP BADGES (RubyUI replacement) ===== */
.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid;
}
.app-badge-sm { font-size: 10px; padding: 1px 8px; }
.app-badge-lg { font-size: 13px; padding: 3px 12px; }

.app-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}
.app-badge-green {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
  color: #34d399;
}
.app-badge-red {
  background: rgba(248, 112, 112, 0.1);
  border-color: rgba(248, 112, 112, 0.2);
  color: #f87070;
}
.app-badge-amber {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}
.app-badge-blue {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}
.app-badge-purple {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}
.app-badge-gray {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
.app-badge-orange {
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}
.app-badge-lime {
  background: rgba(163, 230, 53, 0.1);
  border-color: rgba(163, 230, 53, 0.2);
  color: #a3e635;
}
.app-badge-teal {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
}
.app-badge-pink {
  background: rgba(244, 114, 182, 0.1);
  border-color: rgba(244, 114, 182, 0.2);
  color: #f472b6;
}
/* ===== NOTIFICATION BELL ===== */
.app-notif-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.app-notif-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}
.app-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f87070;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== ANNOUNCEMENT BANNER ===== */
.app-banner {
  background: linear-gradient(135deg, #526AF1, #3b4fcc);
  color: #fff;
  text-align: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}
.app-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.app-banner-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.app-banner-link:hover { color: #fff; text-decoration-thickness: 3px; }

html:not(.dark) .app-banner {
  background: linear-gradient(135deg, #FF6719, #e55a10);
  color: #fff;
}
html:not(.dark) .app-banner::before {
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
}
html:not(.dark) .app-banner-link { color: #fff; }

.app-banner-slide {
  transition: opacity 0.5s ease;
}

/* ===== WHATSAPP FAB ===== */
.app-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: transform 0.15s, background 0.15s;
}
.app-whatsapp:hover {
  background: #1fb557;
  transform: scale(1.05);
}
.app-whatsapp-icon { width: 28px; height: 28px; }

/* ===== ADMIN NAV ===== */
.admin-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}
.admin-nav-link {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}
.admin-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
/* ===== GENERIC PAGE LAYOUT ===== */
.page-wrap { max-width: 1100px; margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
 .page-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
 .page-title a, .page-hero-title a, .page-section-title a, .page-room-title a { color: #fff; }
.page-btn { padding: 8px 18px; border-radius: 8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.page-btn:hover { background: rgba(255,255,255,0.12); }
.page-btn-danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.35); color: #f87171; }
.page-btn-danger:hover { background: rgba(239,68,68,0.25); color: #fca5a5; }

/* Hero banner */
.page-hero {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
}
.page-hero-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-hero-desc { font-size: 14px; color: rgba(255,255,255,0.35); }

/* Section */
.page-section-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.page-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
@media (min-width: 768px) { .page-grid { grid-template-columns: repeat(2, 1fr); } }
.page-list { display: flex; flex-direction: column; gap: 12px; }

/* Card inner elements */
.page-card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.page-card-meta { font-size: 13px; color: rgba(255,255,255,0.35); }
.page-link { font-size: inherit; text-decoration: none; }
.page-link:hover { text-decoration: underline; }
.page-muted { font-size: 13px; color: rgba(255,255,255,0.35); margin-bottom: 6px; }
.page-strong { font-weight: 600; color: rgba(255,255,255,0.7); }

/* Notifications */
.page-notif { margin-bottom: 8px; }
.page-notif-unread { margin-bottom: 8px; border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); }
.page-notif-link { display: block; }
.page-notif-msg { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.page-notif-time { font-size: 12px; color: rgba(255,255,255,0.25); }

/* Empty state */
.page-empty { text-align: center; padding: 32px 0; font-size: 13px; color: rgba(255,255,255,0.25); }
/* Tournament room */
.page-room {
  border-radius: 10px;
  border: 1px solid;
  padding: 16px;
}
.page-room.unlocked {
  border-color: rgba(52, 211, 153, 0.15);
  background: rgba(52, 211, 153, 0.05);
}
.page-room.locked {
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.page-room-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.page-room p { font-size: 13px; margin-bottom: 6px; }
.page-room code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.page-room .app-btn { margin-top: 8px; }

/* Leaderboard */
.page-leaderboard {}
.page-leaderboard-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.page-leaderboard-row:last-child { border-bottom: 0; }
.page-lb-place { font-weight: 700; min-width: 40px; color: rgba(255,255,255,0.35); font-size: 13px; }
.page-lb-name { flex: 1; font-weight: 500; font-size: 14px; color: rgba(255,255,255,0.8); }
.page-lb-prize { font-weight: 600; font-size: 13px; color: #34d399; }

/* Back link + tags */
.page-back { font-size: 13px; color: rgba(255,255,255,0.3); }
.page-back:hover { color: rgba(255,255,255,0.6); }
.page-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.page-description { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.7; }
/* Subjects */
.subject-row {
  display: flex; flex-direction: column; gap: 14px;
}
.subject-code {
  font-size: 18px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em;
}
.subject-code:hover { opacity: 0.7; }
.subject-name { flex: 1; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7); }

/* Subjects glassy grid */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.subject-card {
  position: relative;
  display: block;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.subject-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 103, 25, 0.25), transparent 70%);
  pointer-events: none;
}
.subject-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
}
.subject-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.subject-card-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 10px;
}
.subject-card-arrow {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, color 0.15s ease;
}
.subject-card:hover .subject-card-arrow {
  transform: translateX(3px);
  color: #FF6719;
}
.subject-card-name {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}
.subject-card-meta {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Lecture video */
.lecture-video {
  position: relative; aspect-ratio: 16/9;
  background: #0a0a0a; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.lecture-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.page-phases { padding-left: 20px; margin-top: 4px; }
.page-phases li { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.page-featured-quote { border-left: 4px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }
.page-quote-text { font-size: 16px; font-weight: 500; color: rgba(255,255,255,0.8); line-height: 1.65; margin-bottom: 8px; }
/* ===== ADMIN TABLE ===== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table td {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.7);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-actions a { font-size: 12px; color: rgba(255,255,255,0.4); }
.admin-actions a:hover { color: rgba(255,255,255,0.7); }
.admin-actions form button { font-size: 12px; color: #f87070; background: transparent; border: 0; cursor: pointer; padding: 0; font-family: 'Inter', sans-serif; }
.admin-actions form button:hover { color: #fca5a5; }
.admin-place-form { display: flex; gap: 6px; align-items: center; }
.admin-place-input { width: 60px; padding: 6px 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; color: #fff; font-size: 13px; text-align: center; }
.page-notif-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: inherit;
  color: inherit;
}
/* ===== CS619 ROADMAPS ===== */
.roadmap-card { margin-bottom: 16px; }
.roadmap-phases { display: flex; flex-direction: column; }
.roadmap-phase {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.04);
}
.roadmap-phase:first-child { border-top: 0; padding-top: 0; }
.roadmap-phase-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.roadmap-phase-content { flex: 1; min-width: 0; }
.roadmap-phase-text { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6; }

/* ===== PRICING ===== */
.pricing-amount { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
/* ===== ADMIN FULL-WIDTH LAYOUT ===== */
.admin-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  min-height: calc(100vh - 52px);
}
.admin-content .admin-nav {
  margin-bottom: 28px;
}
.admin-content .page-header {
  margin-bottom: 24px;
}
/* Ensure dark backgrounds everywhere */
.admin-content,
.admin-content main,
.admin-content table,
.admin-content td,
.admin-content th,
.admin-content tr,
.admin-content thead,
.admin-content tbody {
  background: transparent;
  color: rgba(255,255,255,0.8);
}
.admin-content input,
.admin-content textarea,
.admin-content select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
/* Admin form overrides */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.35); margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.35)' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field select option { background: #1a1a1a; color: #fff; }
.actions input[type="submit"] {
  padding: 10px 24px;
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.actions input[type="submit"]:hover { background: #e5e5e5; }
.errors {
  background: rgba(248,112,112,0.08);
  border: 1px solid rgba(248,112,112,0.15);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #f87070;
  font-size: 13px;
}
.errors ul { padding-left: 16px; margin: 4px 0 0; }
.errors li { margin: 2px 0; }


/* ===== LIGHT THEME (Substack-inspired) ===== */
html:not(.dark) { color-scheme: light; }
html:not(.dark) body { background: #ffffff !important; color: #242424; }
html:not(.dark) .app-header { background: rgba(255,255,255,0.9); border-bottom: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .app-brand { color: #242424; }
html:not(.dark) .app-search-input { background: #f4f4f4; color: #242424; }
html:not(.dark) .app-search-input::placeholder { color: #999; }
html:not(.dark) .app-search-input:focus { background: #eee; }
html:not(.dark) .app-search-icon { color: #999; }
html:not(.dark) .app-notif-btn { color: #666; }
html:not(.dark) .app-notif-btn:hover { background: rgba(0,0,0,0.04); color: #242424; }
html:not(.dark) .app-btn { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .app-btn:hover { background: #e8e8e8; }
html:not(.dark) .app-btn-primary { background: #FF6719; color: #fff; border-color: #FF6719; }
html:not(.dark) .app-btn-primary:hover { background: #e55a10; }
html:not(.dark) .app-btn-destructive { background: #fff; color: #cc0000; border-color: rgba(204,0,0,0.2); }
html:not(.dark) .app-btn-destructive:hover { background: #fff5f5; }
html:not(.dark) .app-avatar { background: #f4f4f4; color: #242424; }
html:not(.dark) .app-sidebar-link { color: #666; }
html:not(.dark) .app-sidebar-link:hover { background: #f4f4f4; color: #242424; }
html:not(.dark) .app-sidebar-link.active { background: #242424; color: #fff; border-color: #242424; }
html:not(.dark) .app-sidebar-divider { background: linear-gradient(90deg,transparent,rgba(0,0,0,0.06),transparent); }
html:not(.dark) .app-sidebar-label { color: #999; }
html:not(.dark) .app-trending { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .app-trending::before { background: linear-gradient(90deg,transparent,rgba(0,0,0,0.04),transparent); }
html:not(.dark) .app-trending-title { color: #999; }
html:not(.dark) .app-trending-code { color: #999; }
html:not(.dark) .app-trending-name { color: #666; }
html:not(.dark) .app-trending-item:hover .app-trending-name { color: #242424; }
html:not(.dark) .app-card, html:not(.dark) .feed-card, html:not(.dark) .l-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 8px 24px rgba(0,0,0,0.07); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); }
html:not(.dark) .app-card::before, html:not(.dark) .feed-card::before { background: radial-gradient(circle, rgba(255,103,25,0.16), transparent 70%); }
html:not(.dark) .app-card:hover, html:not(.dark) .feed-card:hover { border-color: rgba(0,0,0,0.13); background: #fff; }
html:not(.dark) .app-card-title, html:not(.dark) .feed-card-title { color: #242424; }
html:not(.dark) .feed-card-name { color: #242424; }
html:not(.dark) .feed-card-dot, html:not(.dark) .feed-card-time { color: #999; }
html:not(.dark) .feed-card-subject { color: #999; }
html:not(.dark) .feed-card-text { color: #666; }
html:not(.dark) .feed-card-actions { border-top-color: rgba(0,0,0,0.04); }
html:not(.dark) .page-title, html:not(.dark) .l-hero-title, html:not(.dark) .l-section-title, html:not(.dark) .l-feature-heading { color: #242424; }
html:not(.dark) .page-muted, html:not(.dark) .l-hero-sub, html:not(.dark) .l-feature-desc, html:not(.dark) .app-card-desc { color: #666; }
html:not(.dark) .page-hero { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .page-hero-title { color: #242424; }
html:not(.dark) .page-hero-desc { color: #666; }
html:not(.dark) .page-back, html:not(.dark) .post-cancel { color: #999; }
html:not(.dark) .page-back:hover { color: #242424; }
html:not(.dark) .feed-filters { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .feed-filter-item { color: #666; }
html:not(.dark) .feed-filter-item:hover { color: #242424; }
html:not(.dark) .feed-filter-item.active { background: #242424; color: #fff; }
html:not(.dark) .feed-search input { background: #f4f4f4; color: #242424; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .feed-search input::placeholder { color: #999; }
html:not(.dark) .feed-composer { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .post-form-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .post-form-group input,
html:not(.dark) .post-form-group select,
html:not(.dark) .post-form-group textarea { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .field input,
html:not(.dark) .field select,
html:not(.dark) .field textarea { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .onboard-form { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .admin-table { border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .admin-table th { background: #fafafa; color: #999; border-bottom-color: rgba(0,0,0,0.06); }
html:not(.dark) .admin-table td { color: #242424; border-top-color: rgba(0,0,0,0.03); }
html:not(.dark) .admin-table tr:hover td { background: #fafafa; }
html:not(.dark) .admin-nav-link { color: #666; }
html:not(.dark) .admin-nav-link:hover { background: #f4f4f4; color: #242424; }
html:not(.dark) .admin-nav-link.active { background: #242424; color: #fff; }
html:not(.dark) .profile-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .profile-field + .profile-field { border-top-color: rgba(0,0,0,0.04); }
html:not(.dark) .profile-field-label { color: #999; }
html:not(.dark) .profile-field-value { color: #242424; }
html:not(.dark) .feed-vote-btn { color: #999; }
html:not(.dark) .feed-vote-btn:hover { background: #f4f4f4; color: #242424; }
html:not(.dark) .feed-vote-btn.voted-up { color: #16a34a; background: rgba(22,163,74,0.1); }
html:not(.dark) .feed-vote-btn.voted-down { color: #dc2626; background: rgba(220,38,38,0.1); }
html:not(.dark) .feed-vote-btn.locked { opacity: 0.5; }
html:not(.dark) .vote-toast { background: rgba(255,255,255,0.96); color: #242424; border: 1px solid rgba(0,0,0,0.08); }
html:not(.dark) .feed-score { color: #666; }
html:not(.dark) .feed-action-btn { color: #999; }
html:not(.dark) .feed-action-btn:hover { background: #f4f4f4; color: #242424; }
html:not(.dark) .feed-page-title { color: #242424; }
html:not(.dark) .feed-empty { background: #fff; border: 1px solid rgba(0,0,0,0.04); }
html:not(.dark) .feed-empty h3 { color: #999; }
html:not(.dark) .feed-empty p { color: #bbb; }
html:not(.dark) .page-empty { color: #bbb; }
html:not(.dark) .page-strong { color: #242424; }
html:not(.dark) .page-section-title { color: #242424; }
html:not(.dark) .feed-flash { background: #fff; border-color: rgba(0,0,0,0.06); }
html:not(.dark) .feed-flash.notice { color: #242424; border-color: rgba(0,0,0,0.08); }
html:not(.dark) .feed-flash.alert { color: #cc0000; border-color: rgba(204,0,0,0.1); }
html:not(.dark) .auth-bg { background: #ffffff; }
html:not(.dark) .auth-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .auth-title { color: #242424; }
html:not(.dark) .auth-toggle { background: #f4f4f4; }
html:not(.dark) .auth-toggle a { color: #999; }
html:not(.dark) .auth-toggle a.active { background: #fff; color: #242424; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .auth-input, html:not(.dark) .auth-select { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .auth-input::placeholder { color: #bbb; }
html:not(.dark) .auth-social-btn { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .auth-social-btn:hover { background: #e8e8e8; }
html:not(.dark) .auth-submit { background: #FF6719; color: #fff; }
html:not(.dark) .auth-divider::before, html:not(.dark) .auth-divider::after { background: rgba(0,0,0,0.06); }
html:not(.dark) .auth-divider span { color: #bbb; }
html:not(.dark) .auth-footer { color: #999; }
html:not(.dark) .auth-footer a { color: #666; }
html:not(.dark) .auth-label { color: #999; }
html:not(.dark) .auth-checkbox-row label { color: #666; }
html:not(.dark) .l-page { background: #ffffff; color: #242424; }
html:not(.dark) .l-page::before, html:not(.dark) .l-page::after { opacity: 0.02 !important; }
html:not(.dark) .l-nav { background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .l-nav-logo { color: #242424; }
html:not(.dark) .l-nav-links a { color: #666; }
html:not(.dark) .l-nav-links a:hover { color: #242424; }
html:not(.dark) .l-btn { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .l-btn:hover { background: #e8e8e8; }
html:not(.dark) .l-btn-primary { background: #FF6719; color: #fff; border-color: #FF6719; }
html:not(.dark) .l-btn-primary:hover { background: #e55a10; box-shadow: 0 0 24px rgba(255,103,25,0.15); }
html:not(.dark) .btn-linear { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .btn-linear:hover { background: #e8e8e8; }
html:not(.dark) .btn-linear-primary { background: #FF6719; color: #fff; border-color: #FF6719; }
html:not(.dark) .btn-linear-primary:hover { background: #e55a10; }
html:not(.dark) .l-hero { color: #242424; }
html:not(.dark) .l-hero::before { background: radial-gradient(ellipse at center, rgba(255,103,25,0.03) 0%, transparent 70%); }
html:not(.dark) .l-hero-title { color: #242424; }
html:not(.dark) .l-hero-title .l-gradient-text { background: linear-gradient(135deg, #242424 0%, #555 40%, #FF6719 60%, #242424 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
html:not(.dark) .l-hero-sub { color: #666; }
html:not(.dark) .l-badge { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #666; }
html:not(.dark) .l-badge-dot::before, html:not(.dark) .l-badge-dot::after { background: #FF6719; }
html:not(.dark) .l-section-label { color: #999; border-bottom-color: rgba(0,0,0,0.06); }
html:not(.dark) .l-section-title { color: #242424; }
html:not(.dark) .l-section-desc { color: #666; }
html:not(.dark) .l-feature-heading { color: #242424; }
html:not(.dark) .l-feature-kicker { color: #FF6719; }
html:not(.dark) .l-feature-desc { color: #666; }
html:not(.dark) .l-feature-link { color: #242424; }
html:not(.dark) .l-feature-link:hover { color: #FF6719; }
html:not(.dark) .l-why-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .l-why-card:hover { border-color: rgba(0,0,0,0.1); }
html:not(.dark) .l-why-icon { background: #f4f4f4; color: #FF6719; }
html:not(.dark) .l-why-title { color: #242424; }
html:not(.dark) .l-why-desc { color: #666; }
html:not(.dark) .card-linear { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .card-linear:hover { background: #fafafa; border-color: rgba(0,0,0,0.1); }
html:not(.dark) .card-linear .icon-box { background: #f4f4f4; }
html:not(.dark) .l-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .l-card:hover { background: #fafafa; border-color: rgba(0,0,0,0.1); }
html:not(.dark) .l-card::before { background: linear-gradient(135deg, rgba(255,103,25,0.06) 0%, transparent 40%, rgba(0,0,0,0.03) 100%); }
html:not(.dark) .l-card-icon { background: #f4f4f4; color: #FF6719; }
html:not(.dark) .l-card:hover .l-card-icon { background: rgba(255,103,25,0.1); color: #FF6719; }
html:not(.dark) .l-card-title { color: #242424; }
html:not(.dark) .l-card-desc { color: #666; }
html:not(.dark) .l-preview-card { background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.02) 100%); }
html:not(.dark) .l-preview-inner { background: #fff; background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.03) 1px, transparent 0); }
html:not(.dark) .l-preview-tag { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #666; }
html:not(.dark) .l-preview-desc { color: #bbb; }
html:not(.dark) .l-stats { border-color: rgba(0,0,0,0.06); background: radial-gradient(ellipse at 50% 50%, rgba(255,103,25,0.02) 0%, transparent 70%); }
html:not(.dark) .l-stat-value { color: #242424; }
html:not(.dark) .l-stat-label { color: #999; }
html:not(.dark) .l-cta-title { color: #242424; }
html:not(.dark) .l-cta-desc { color: #666; }
html:not(.dark) .l-footer { border-top: 1px solid rgba(0,0,0,0.06); }
html:not(.dark) .l-footer-brand { color: #242424; }
html:not(.dark) .l-footer-copy { color: #bbb; }
html:not(.dark) .l-footer-links a { color: #999; }
html:not(.dark) .l-footer-links a:hover { color: #242424; }
html:not(.dark) .l-feature-card { background: #fff; border: 1px solid rgba(0,0,0,0.06); background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.03) 1px, transparent 0); }
html:not(.dark) .l-hero-mockup { background: #fff; border: 1px solid rgba(0,0,0,0.06); background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.04) 1px, transparent 0); }
html:not(.dark) .l-hero-mockup-icon { background: #f4f4f4; color: #FF6719; }
html:not(.dark) .l-hero-mockup-title { color: #242424; }
html:not(.dark) .l-hero-mockup-desc { color: #bbb; }
html:not(.dark) .hero-badge { background: #f4f4f4; border: 1px solid rgba(0,0,0,0.06); color: #666; }
html:not(.dark) .hero-glow { background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255,103,25,0.03), transparent); }
html:not(.dark) .landing-bg { background: #ffffff; }
html:not(.dark) .landing-bg::before, html:not(.dark) .landing-bg::after { opacity: 0.02 !important; }
html:not(.dark) .subject-row { color: #242424; }
html:not(.dark) .subject-code { color: #242424; }
html:not(.dark) .subject-name { color: #666; }
html:not(.dark) .roadmap-phase-num { background: #f4f4f4; color: #666; }
html:not(.dark) .roadmap-phase-text { color: #666; }
html:not(.dark) .pricing-amount { color: #242424; }
html:not(.dark) .page-room.unlocked { border-color: rgba(0,0,0,0.06); background: #fafafa; }
html:not(.dark) .page-room.locked { border-color: rgba(0,0,0,0.06); background: #f4f4f4; }
html:not(.dark) .page-room-title { color: #242424; }
html:not(.dark) .page-room code { background: #e8e8e8; }
html:not(.dark) .page-tags { color: #666; }
html:not(.dark) .page-description { color: #666; }
html:not(.dark) .page-leaderboard-row { border-bottom-color: rgba(0,0,0,0.04); }
html:not(.dark) .page-lb-place { color: #999; }
html:not(.dark) .page-lb-name { color: #242424; }
html:not(.dark) .page-lb-prize { color: #FF6719; }
html:not(.dark) .page-phases li { color: #666; }
html:not(.dark) .page-featured-quote { border-left-color: #FF6719; background: #fafafa; }
html:not(.dark) .page-quote-text { color: #242424; }
html:not(.dark) .app-badge { background: #f4f4f4; border-color: rgba(0,0,0,0.06); color: #666; }
html:not(.dark) .app-badge-green { background: #e8f5e9; border-color: rgba(76,175,80,0.2); color: #2e7d32; }
html:not(.dark) .app-badge-red { background: #ffebee; border-color: rgba(244,67,54,0.2); color: #c62828; }
html:not(.dark) .app-badge-amber { background: #fff8e1; border-color: rgba(255,193,7,0.2); color: #e65100; }
html:not(.dark) .app-badge-blue { background: #e3f2fd; border-color: rgba(33,150,243,0.2); color: #1565c0; }
html:not(.dark) .subject-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
html:not(.dark) .subject-card::before { background: radial-gradient(circle, rgba(255,103,25,0.16), transparent 70%); }
html:not(.dark) .subject-card:hover { background: #fff; border-color: rgba(0,0,0,0.13); }
html:not(.dark) .subject-card-code { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.09); color: #242424; }
html:not(.dark) .subject-card-arrow { color: rgba(0,0,0,0.3); }
html:not(.dark) .subject-card:hover .subject-card-arrow { color: #FF6719; }
html:not(.dark) .subject-card-name { color: #242424; }
html:not(.dark) .subject-card-meta { color: #999; }
html:not(.dark) .app-badge-purple { background: #f3e5f5; border-color: rgba(156,39,176,0.2); color: #7b1fa2; }
html:not(.dark) .page-notif-unread { border-color: rgba(0,0,0,0.1); background: #fafafa; }
html:not(.dark) .page-notif-msg { color: #242424; }
html:not(.dark) .page-notif-time { color: #999; }
html:not(.dark) .mkd-editor-content { background: #f4f4f4; border-color: rgba(0,0,0,0.06); color: #242424; }
html:not(.dark) .mkd-editor-content:focus { background: #eee; }
html:not(.dark) .mkd-preview { background: #fff; border-color: rgba(0,0,0,0.06); color: #666; }
html:not(.dark) .feed-composer-input {
  background: #f4f4f4;
  border: 1px solid rgba(0,0,0,0.06);
  color: #999;
}
html:not(.dark) .feed-composer-input:hover {
  background: #e8e8e8;
  border-color: rgba(0,0,0,0.1);
  color: #666;
}
html:not(.dark) .feed-composer .feed-avatar {
  background: #f4f4f4;
  color: #666;
}
.app-avatar img, .feed-avatar img, .profile-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.feed-avatar { overflow: hidden; }
.roadmap-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, background 0.2s;
}
.roadmap-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
html:not(.dark) .roadmap-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.06);
}
html:not(.dark) .roadmap-card:hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.1);
}
.game-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.game-card:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.game-card .app-card-title {
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
html:not(.dark) .game-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
html:not(.dark) .game-card:hover {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
html:not(.dark) .game-card .app-card-title {
  background: linear-gradient(135deg, #FF6719, #e55a10);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.feed-filter-select {
  padding: 8px 14px;
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.35)' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
  min-width: 200px;
}
.feed-filter-select:focus {
  border-color: rgba(255,255,255,0.15);
  background-color: rgba(255,255,255,0.08);
}
html:not(.dark) .feed-filter-select {
  background-color: #f4f4f4;
  border-color: rgba(0,0,0,0.08);
  color: #242424;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(0,0,0,0.35)' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E");
}
html:not(.dark) .feed-filter-select:focus {
  border-color: rgba(0,0,0,0.15);
}
/* Trix code formatting in feed cards */
.feed-card-text pre {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 8px 0;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.5;
}
.feed-card-text code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  font-size: 12px;
}
html:not(.dark) .feed-card-text pre {
  background: #f4f4f4;
  border-color: rgba(0,0,0,0.06);
}
html:not(.dark) .feed-card-text code {
  background: rgba(0,0,0,0.06);
}
.post-form-body trix-editor {
  min-height: 320px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}
.post-form-body trix-editor:focus {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
}
.post-form-body trix-editor:empty:not(:focus)::before {
  color: rgba(255,255,255,0.2);
}
.post-form-body trix-toolbar {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 6px 8px;
}
.post-form-body trix-toolbar .trix-button-group {
  border: 0;
  margin: 0 4px;
}
.post-form-body trix-toolbar .trix-button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: rgba(255,255,255,0.45);
  padding: 4px 8px;
  font-size: 12px;
  transition: background 0.12s, color 0.12s;
}
.post-form-body trix-toolbar .trix-button:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}
.post-form-body trix-toolbar .trix-button.trix-active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.post-form-body trix-toolbar .trix-button--icon {
  width: 30px; height: 28px;
  text-indent: unset; font-size: 0;
}
.post-form-body trix-toolbar .trix-button--icon::before {
  filter: invert(1); opacity: 0.45;
}
.post-form-body trix-toolbar .trix-button--icon:hover::before,
.post-form-body trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 0.85;
}
.post-form-body trix-editor pre {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.post-form-body trix-editor blockquote {
  border-left: 3px solid rgba(255,255,255,0.15);
  padding-left: 12px;
  color: rgba(255,255,255,0.5);
}
.post-form-body trix-editor a { color: rgba(255,255,255,0.6); }
.post-form-body trix-toolbar + trix-editor {
  border-top: 0 !important;
  border-radius: 0 0 10px 10px !important;
}
html:not(.dark) .post-form-body trix-editor {
  background: #f4f4f4;
  border-color: rgba(0,0,0,0.08);
  color: #242424;
}
html:not(.dark) .post-form-body trix-editor:focus {
  border-color: rgba(0,0,0,0.15);
  background: #eee;
}
html:not(.dark) .post-form-body trix-toolbar {
  background: #f4f4f4;
  border-color: rgba(0,0,0,0.06);
}
html:not(.dark) .post-form-body trix-toolbar .trix-button {
  color: rgba(0,0,0,0.4);
}
html:not(.dark) .post-form-body trix-toolbar .trix-button:hover {
  background: rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.7);
}
html:not(.dark) .post-form-body trix-toolbar .trix-button.trix-active {
  background: rgba(0,0,0,0.08);
  color: #242424;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button--icon::before {
  filter: invert(0); opacity: 0.4;
}
html:not(.dark) .roadmap-card .app-card-title { color: #242424; }
html:not(.dark) .game-card .app-card-title {
  -webkit-text-fill-color: #242424;
}
.roadmap-phase-heading {
  font-size: 15px; font-weight: 600; color: #fff; margin: 20px 0 12px;
}
.roadmap-phase-card {
  background: rgba(255,255,255,0.02); padding: 14px; border-radius: 10px; margin-bottom: 12px;
}
.roadmap-phase-num-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.roadmap-phase-label {
  font-size: 13px; color: rgba(255,255,255,0.6);
}
html:not(.dark) .roadmap-phase-heading { color: #242424; }
html:not(.dark) .roadmap-phase-card { background: rgba(0,0,0,0.02); }
html:not(.dark) .roadmap-phase-num-circle { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.5); }
html:not(.dark) .roadmap-phase-label { color: rgba(0,0,0,0.5); }
/* Fix light mode post card elements */
html:not(.dark) .feed-score { color: #242424; font-weight: 700; }
html:not(.dark) .feed-action-btn { color: #999; }
html:not(.dark) .feed-action-btn:hover { background: #f4f4f4; color: #242424; }
html:not(.dark) .feed-card-subject:hover { color: #242424; }
html:not(.dark) .feed-subject-icon { color: #999; }
html:not(.dark) .feed-card-body { color: inherit; }
html:not(.dark) .feed-avatar { background: #f4f4f4; color: #666; }
html:not(.dark) .feed-card-body:hover .feed-card-title { color: #FF6719; }
html:not(.dark) .feed-vote-btn:hover { background: #f4f4f4; color: #242424; }
/* Post show page light mode */
html:not(.dark) .feed-card.post-detail .feed-card-title,
html:not(.dark) .feed-card.post-detail h1 { color: #242424 !important; }
html:not(.dark) .feed-card-body,
html:not(.dark) .feed-card-text { color: #666 !important; }
html:not(.dark) .comment-section h2 { color: #999 !important; }
html:not(.dark) .post-detail-actions a { color: #999 !important; }
html:not(.dark) .post-detail-actions a:hover { color: #242424 !important; }
html:not(.dark) .comment-textarea {
  background: #f4f4f4; border-color: rgba(0,0,0,0.08); color: #242424;
}
html:not(.dark) .comment-textarea::placeholder { color: #bbb; }
html:not(.dark) .comment-form { border-bottom-color: rgba(0,0,0,0.05); }
html:not(.dark) .comment-author { color: #242424; }
html:not(.dark) .comment-body { color: #666; }
html:not(.dark) .comment-section {
  background: #fff; border: 1px solid rgba(0,0,0,0.06);
}
/* Override inline white text in post detail */
html:not(.dark) .feed-card.post-detail div[style*="color"] { color: #666 !important; }
html:not(.dark) .post-detail-actions a[style*="color"] { color: #999 !important; }
html:not(.dark) .post-detail-actions a:hover { color: #242424 !important; }
html:not(.dark) .comment-section div[style*="color"] { color: #999 !important; }
html:not(.dark) .comment-section a[style*="color"] { color: #242424 !important; }
html:not(.dark) .comment-author time { color: #bbb !important; }
html:not(.dark) .comment-item .feed-avatar { background: #f4f4f4; }

/* ===== MOBILE LAYOUT & HAMBURGER ===== */
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  margin-right: 8px;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
@media (min-width: 1024px) { .hamburger-btn { display: none; } }
html:not(.dark) .hamburger-btn { color: rgba(0,0,0,0.5); }
html:not(.dark) .hamburger-btn:hover { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.7); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
}
.sidebar-overlay.active { display: block; }

/* Mobile sidebar slide-in */
@media (max-width: 1023px) {
  .app-sidebar {
    display: block !important;
    position: fixed; top: 52px; left: 0; bottom: 0;
    width: 260px !important;
    background: #0a0a0a;
    z-index: 45;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 12px 0;
    overflow-y: auto;
  }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .app-brand { display: block !important; }
  .app-search { display: flex !important; max-width: 200px; }
}

/* Mobile cards and forms */
@media (max-width: 640px) {
  .app-content { padding: 0 8px 24px; }
  .feed-page-header { flex-wrap: wrap; gap: 8px; }
  .feed-card { padding: 12px; }
  .feed-card-title { font-size: 14px; }
  .feed-card-text { font-size: 13px; }
  .page-hero { padding: 20px; }
  .page-grid { grid-template-columns: 1fr !important; }
  .post-form-card { padding: 16px; }
  .admin-content { padding: 16px 12px 32px; }
  .admin-table { font-size: 11px; }
  .admin-table th, .admin-table td { padding: 6px 8px; }
  .page-wrap { padding: 0 8px; }
  .l-hero { padding: 100px 16px 60px; min-height: auto; }
  .l-hero-title { font-size: 28px; }
  .l-section { padding: 40px 8px; }
  .l-feature-row { padding: 40px 8px; }
  .l-stats-inner { padding: 40px 16px; }
  .l-cta { padding: 48px 16px; }
  .auth-card { margin: 1rem 0.5rem; padding: 20px; border-radius: 16px; }
  .auth-input-row { flex-direction: column; gap: 0; }
}

/* Light mode mobile */
html:not(.dark) .app-sidebar { background: #fff; }
html:not(.dark) .sidebar-overlay { background: rgba(0,0,0,0.3); }

/* Hide search on mobile */
@media (max-width: 767px) {
  .app-search { display: none !important; }
}

/* New post form light mode */
html:not(.dark) .post-form-group label { color: #666; }
html:not(.dark) .post-form-input::placeholder { color: #bbb; }
html:not(.dark) .post-form-group select option { background: #fff; color: #242424; }
html:not(.dark) .post-form-group select { color: #242424; }
html:not(.dark) .post-form-group input[type="text"],
html:not(.dark) .post-form-group input[type="search"],
html:not(.dark) .post-form-group textarea {
  background: #f4f4f4;
  border-color: rgba(0,0,0,0.08);
  color: #242424;
}
html:not(.dark) .post-form-group input::placeholder,
html:not(.dark) .post-form-group textarea::placeholder {
  color: #bbb;
}
html:not(.dark) .post-cancel:hover { color: #242424; }
html:not(.dark) .post-form-label { color: #666; }
html:not(.dark) .post-form-body trix-editor { 
  background: #f4f4f4 !important;
  border-color: rgba(0,0,0,0.08) !important;
  color: #242424 !important;
}
html:not(.dark) .post-form-body trix-editor:focus {
  border-color: rgba(0,0,0,0.15) !important;
  background: #e8e8e8 !important;
}
html:not(.dark) .post-form-body trix-toolbar {
  background: #f4f4f4 !important;
  border-color: rgba(0,0,0,0.08) !important;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button {
  color: rgba(0,0,0,0.4) !important;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button:hover {
  background: rgba(0,0,0,0.06) !important;
  color: #242424 !important;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button.trix-active {
  background: rgba(0,0,0,0.08) !important;
  color: #242424 !important;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button--icon::before {
  filter: invert(0) !important;
  opacity: 0.5 !important;
}
html:not(.dark) .post-form-body trix-toolbar .trix-button--icon.trix-active::before,
html:not(.dark) .post-form-body trix-toolbar .trix-button--icon:hover::before {
  opacity: 0.8 !important;
}
html:not(.dark) .post-form-body trix-editor pre {
  background: rgba(0,0,0,0.04);
}
html:not(.dark) .post-form-body trix-editor blockquote {
  border-left-color: rgba(0,0,0,0.15);
  color: #666;
}
html:not(.dark) .post-form-body trix-editor a { color: #FF6719; }
html:not(.dark) .post-form-actions .l-btn-primary {
  background: #FF6719; color: #fff; border-color: #FF6719;
}
html:not(.dark) .post-form-actions .l-btn-primary:hover {
  background: #e55a10;
}
html:not(.dark) .auth-error {
  background: rgba(220,0,0,0.06); border-color: rgba(220,0,0,0.1); color: #c00;
}
/* Prevent Turbo preview flash on feed */
html { scroll-behavior: smooth; }
.l-nav-actions { display: flex; align-items: center; gap: 6px; }
.l-theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5); cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.l-theme-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }
html:not(.dark) .l-theme-btn {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.06); color: rgba(0,0,0,0.5);
}
html:not(.dark) .l-theme-btn:hover { background: rgba(0,0,0,0.08); color: rgba(0,0,0,0.7); }
.l-hero-screenshot {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.hero-screenshot-img {
  display: block;
  width: 100%;
  height: auto;
}
html:not(.dark) .l-hero-screenshot {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
/* 3D tilt for hero screenshot */
.l-hero-screenshot {
  transform: perspective(1200px) rotateY(-5deg) rotateX(3deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 15px 25px 50px rgba(0,0,0,0.4);
}
.l-hero-screenshot:hover {
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg) translateY(-4px);
  box-shadow: 20px 35px 60px rgba(0,0,0,0.5);
}
html:not(.dark) .l-hero-screenshot {
  box-shadow: 4px 12px 30px rgba(0,0,0,0.1);
}
html:not(.dark) .l-hero-screenshot:hover {
  box-shadow: 8px 20px 40px rgba(0,0,0,0.15);
}
/* Hide Trix attachment button */
.post-form-body trix-toolbar .trix-button--icon-attach { display: none; }
/* Prevent file drop attachment in Trix editor */
.post-form-body trix-editor [data-trix-attachment] { display: none !important; }

/* ===== HOTWIRE NATIVE ADJUSTMENTS ===== */
body.hotwire-native {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.hotwire-native .app-content {
  max-width: 100%;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 32px);
}

body.hotwire-native main.flex-1 {
  max-width: 100%;
}

body.hotwire-native .admin-content {
  padding: 0 16px calc(env(safe-area-inset-bottom) + 32px);
}

/* Native drawer toggle bar (Hotwire Native only) */
.native-drawer-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 16px;
  background: #11111b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.hotwire-native .native-drawer-bar {
  display: flex;
  align-items: center;
}
.native-drawer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 0;
  cursor: pointer;
}
.native-drawer-toggle svg {
  width: 22px;
  height: 22px;
}
html:not(.dark) .native-drawer-bar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
html:not(.dark) .native-drawer-toggle {
  color: #242424;
}

/* Corrected list rows so action buttons wrap instead of overflowing on narrow/native screens */
body.hotwire-native .app-content {
  padding: 0 16px calc(env(safe-area-inset-bottom) + 32px);
  max-width: 100%;
}
body.hotwire-native .page-wrap {
  max-width: 100%;
  padding: 0;
}
body.hotwire-native .feed-card.assignment-row,
body.hotwire-native .feed-card.file-row {
  flex-wrap: wrap;
  gap: 10px;
}
body.hotwire-native .feed-card.assignment-row > div:nth-child(1),
body.hotwire-native .feed-card.file-row > div:nth-child(1) {
  flex: 1 1 200px;
  min-width: 0;
}
body.hotwire-native .feed-card.assignment-row > div:nth-child(2),
body.hotwire-native .feed-card.file-row > div:nth-child(2) {
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.hotwire-native .subject-row {
  padding: 16px !important;
}
body.hotwire-native .subject-row .app-badge,
body.hotwire-native .assignment-row .app-btn,
body.hotwire-native .file-row .app-btn {
  padding: 6px 10px;
  font-size: 11px;
  white-space: nowrap;
}
