:root {
  --uttan-primary: #16a34a;
  --uttan-primary-dark: #15803d;
  --uttan-primary-soft: #dcfce7;
  --uttan-danger: #dc2626;
  --uttan-danger-soft: #fee2e2;
  --uttan-warning: #d97706;
  --uttan-bg: #f4f6f8;
  --uttan-card: #ffffff;
  --uttan-text: #111827;
  --uttan-muted: #6b7280;
  --uttan-border: #e5e7eb;
  --uttan-radius: 16px;
}

* { box-sizing: border-box; }

body.uttan-body {
  background: var(--uttan-bg);
  color: var(--uttan-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding-bottom: 84px;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
  body.uttan-body { padding-bottom: 24px; }
}

/* Top Navbar */
.uttan-navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--uttan-border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.uttan-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--uttan-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.uttan-brand span.accent { color: var(--uttan-primary); }

.uttan-nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: #374151;
  padding: 0.45rem 0.75rem !important;
  border-radius: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.uttan-nav-link:hover, .uttan-nav-link.active {
  background: var(--uttan-primary-soft);
  color: var(--uttan-primary-dark);
}

/* Breaking Ticker */
.breaking-banner {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
}
.breaking-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #b91c1c;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Update Cards */
.update-card {
  background: var(--uttan-card);
  border: 1px solid var(--uttan-border);
  border-radius: var(--uttan-radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.update-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}
.update-card.is-breaking {
  border: 2px solid #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.12);
}

.update-card-media {
  position: relative;
  height: 195px;
  background: #111827;
  overflow: hidden;
}
.update-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.update-media-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}
.badge-cat {
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.badge-loc {
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.gallery-count-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.update-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.update-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--uttan-text);
}
.update-card-title a {
  color: inherit;
  text-decoration: none;
}
.update-card-title a:hover { color: var(--uttan-primary-dark); }

.update-card-desc {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.55;
  margin-bottom: 12px;
  flex: 1;
}

.contributor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.contributor-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--uttan-border);
}
.reporter-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.volunteer-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.update-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--uttan-muted);
  padding: 8px 0;
  border-top: 1px solid var(--uttan-border);
  border-bottom: 1px solid var(--uttan-border);
  margin-bottom: 12px;
}
.update-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.section-header h2, .section-header h3 {
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Leaderboard Ranks */
.rank-gold { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; border-left: 5px solid #d97706 !important; }
.rank-silver { background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important; border-left: 5px solid #6b7280 !important; }
.rank-bronze { background: linear-gradient(135deg, #ffedd5, #fed7aa) !important; border-left: 5px solid #c2410c !important; }

.rank-medal {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}
.rank-medal-1 { background: #f59e0b; color: #fff; }
.rank-medal-2 { background: #6b7280; color: #fff; }
.rank-medal-3 { background: #c2410c; color: #fff; }
.rank-medal-default { background: #e5e7eb; color: #374151; }

/* Mobile Bottom Nav */
.uttan-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--uttan-border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 66px;
  z-index: 1040;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 992px) {
  .uttan-bottom-nav { display: none; }
}
.uttan-bottom-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 2px;
  padding: 6px 2px;
}
.uttan-bottom-item i { font-size: 1.2rem; }
.uttan-bottom-item.active { color: var(--uttan-primary); }
.uttan-bottom-submit {
  background: var(--uttan-primary);
  color: #fff !important;
  border-radius: 14px;
  padding: 6px 10px;
  margin: 0 4px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.32);
}

/* Gallery Grid on Details */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.photo-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--uttan-border);
  cursor: pointer;
  aspect-ratio: 16 / 10;
  background: #000;
}
.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.photo-gallery-item:hover img { transform: scale(1.03); }

/* Shorts Vertical Feed */
.shorts-feed-container {
  max-width: 440px;
  margin: 0 auto;
  height: calc(100vh - 140px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.shorts-feed-container::-webkit-scrollbar { display: none; }
.short-slide {
  scroll-snap-align: start;
  height: calc(100vh - 150px);
  min-height: 520px;
  background: #0f172a;
  color: #fff;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}
.short-media-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.short-media-wrap iframe,
.short-media-wrap video,
.short-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.short-overlay-info {
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45), transparent);
}
