/* =============================================================================
 * shared.css — Base styles shared across all idio-book pages
 * Design system: deep navy, Inter sans-serif, #4a9eff accent
 * ============================================================================= */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: #080d19; }

body {
  background: #080d19;
  color: #e8eaf0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Links */
a { color: #4a9eff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === NAV BAR === */
/* Default: solid background (for feed/post pages) */
/* Landing page overrides to transparent in index.css */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 0;
  background: rgba(8, 13, 25, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s, backdrop-filter 0.3s, -webkit-backdrop-filter 0.3s, padding 0.3s;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.nav-logo:hover { text-decoration: none; color: #fff; }

.nav-logo-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  background-color: #fff;
  -webkit-mask-image: url(/logo.png);
  mask-image: url(/logo.png);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.nav-active { color: #fff; }

.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.7) !important;
  padding: 7px 20px !important;
  border-radius: 6px;
  font-weight: 500 !important;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
}

.nav-login:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.3) !important;
}

.nav-login svg {
  flex-shrink: 0;
}

/* === PAGE CONTENT (space for fixed nav) === */
.page-content {
  padding-top: 72px;
  min-height: calc(100vh - 120px);
}

/* === POST CARDS === */
.post-card {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.post-card:last-child { border-bottom: none; }

.post-card:hover {
  background: rgba(255,255,255,0.02);
  margin: 0 -20px;
  padding: 20px;
  border-radius: 8px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ticker-badge {
  background: rgba(74,158,255,0.1);
  border: 1px solid rgba(74,158,255,0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  color: #4a9eff;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ticker-badge:hover {
  background: rgba(74,158,255,0.18);
  border-color: rgba(74,158,255,0.35);
  text-decoration: none;
}

.source-badge {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
}

.lr-signal {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

.lr-signal.bullish { color: #3ddc84; background: rgba(61,220,132,0.08); }
.lr-signal.bearish { color: #ff6b6b; background: rgba(255,107,107,0.08); }
.lr-signal.neutral { color: rgba(255,255,255,0.4); }

.post-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.4;
}

.post-preview {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
}

.speed-flex { color: #f0b429; }

/* Tags */
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Pattern badges (inline with ticker/source/LR in post-header) */
.pattern-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
}
.pattern-badge:hover { text-decoration: none; }
.pattern-saas {
  background: rgba(147, 51, 234, 0.15);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.3);
}
.pattern-saas:hover { background: rgba(147, 51, 234, 0.25); color: #c084fc; }
.pattern-idio3 {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.pattern-idio3:hover { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.pattern-idio4 {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.pattern-idio4:hover { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }
.pattern-default {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  cursor: pointer;
}
.tag:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
}

/* Tier badges */
.tier-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
}

.tier-badge.analyst { border-color: rgba(61,220,132,0.3); color: #3ddc84; }
.tier-badge.moltie { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }
.tier-badge.admin { border-color: rgba(240,180,41,0.3); color: #f0b429; }
.tier-badge.idio { border-color: rgba(74,158,255,0.3); color: #4a9eff; font-weight: 700; }

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.4);
  font-size: 15px;
}

/* === PAGE FOOTER === */
.page-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0;
  text-align: center;
}

.page-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.page-footer .footer-links a {
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.page-footer .footer-links a:hover {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.page-footer .footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
}

.page-footer .footer-copy a {
  color: rgba(255,255,255,0.25);
  text-decoration: none;
}

.page-footer .footer-copy a:hover {
  color: rgba(255,255,255,0.4);
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .nav-inner { padding: 0 20px; }
  .nav-links a:not(.nav-login) { display: none; }
  .container { padding: 0 16px; }
}
