/* =============================
   Bubble News — Styles
   Matches ffizzi.com header/footer design
   ============================= */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0F172A;
  color: #F9FAFB;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: #3B82F6; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* Container */
.bn-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Bar (matches ffizzi .le-topbar) */
.bn-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.bn-topbar-brand {
  flex-shrink: 0;
}

.bn-logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  display: block;
}

.bn-topbar-app {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bn-topbar-app strong {
  font-size: 16px;
  font-weight: 700;
  color: #F9FAFB;
}

.bn-topbar-app > span {
  font-size: 13px;
  color: #D1D5DB;
  margin-bottom: 6px;
}

.bn-topbar-badges {
  display: flex;
  gap: 8px;
}

.bn-topbar-badges img {
  height: 32px;
  width: auto;
  display: block;
}

/* Header (matches ffizzi .le-header) */
.bn-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.bn-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #F9FAFB;
  margin-bottom: 4px;
  line-height: 1.15;
}

.bn-subtitle {
  color: #D1D5DB;
  font-size: 16px;
}

/* Search Bar */
.bn-search-bar {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.bn-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  color: #F9FAFB;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
}

.bn-search-input::placeholder { color: #9CA3AF; }

.bn-search-input:focus {
  outline: none;
  border-color: #3B82F6;
}

.bn-sort-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: #D1D5DB;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}

.bn-sort-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Category Chips */
.bn-chips {
  margin-top: 16px;
  overflow: hidden;
}

.bn-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.04);
}

.bn-chips-scroll::-webkit-scrollbar {
  height: 6px;
}

.bn-chips-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.bn-chips-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.bn-chips-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.bn-chip {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  color: #D1D5DB;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.bn-chip:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
  color: #F9FAFB;
  text-decoration: none;
}

.bn-chip-active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93C5FD;
}

.bn-chip-active:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
  color: #BFDBFE;
}

/* Category Sections (Home Page) */
.bn-category-section {
  margin-bottom: 32px;
}

.bn-category-section-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.bn-category-section-header h2 a {
  color: #F9FAFB;
  text-decoration: none;
}

.bn-category-section-header h2 a:hover {
  color: #93C5FD;
}

.bn-category-section-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bn-category-section-footer {
  margin-top: 12px;
  text-align: right;
}

.bn-more-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #93C5FD;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
}

.bn-more-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  text-decoration: none;
}

/* Main Content */
.bn-main {
  padding-bottom: 48px;
}

/* Category Hub Grid (matches ffizzi .le-region-grid) */
.bn-category-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.bn-category-card {
  display: block;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #F9FAFB;
  font-size: 14px;
  transition: background 0.12s, border-color 0.12s;
}

.bn-category-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.bn-category-card-name {
  font-weight: 600;
}

/* Category list for error pages */
.bn-category-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.bn-category-list li a {
  display: block;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #F9FAFB;
  font-size: 14px;
  transition: background 0.12s;
}

.bn-category-list li a:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

/* Article List */
.bn-article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Article Card */
.article-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: background 0.12s, border-color 0.12s, transform 0.15s, box-shadow 0.15s;
}

.article-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.article-card a {
  display: flex;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.article-card a:hover { text-decoration: none; }

.article-card-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
}

.article-card-img-placeholder {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.25));
}

.article-card-body {
  flex: 1;
  min-width: 0;
}

.article-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
  color: #9CA3AF;
}

.article-card-source {
  color: #10B981;
  font-weight: 600;
}

.article-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: #F9FAFB;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-desc {
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline Ad */
.bn-inline-ad {
  margin: 24px 0;
  min-height: 100px;
  overflow: hidden;
}

/* Empty State */
.bn-empty-state {
  text-align: center;
  padding: 64px 16px;
  color: #9CA3AF;
  font-size: 16px;
}

/* App Promo (matches ffizzi .app-promo) */
.bn-app-promo {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 24px;
}

.bn-app-promo p {
  font-size: 15px;
  color: #D1D5DB;
  margin-bottom: 12px;
}

.bn-app-promo-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bn-app-promo-buttons img {
  height: 40px;
}

/* Footer (matches ffizzi .le-footer) */
.bn-footer {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 32px;
  font-size: 13px;
  color: #9CA3AF;
  text-align: center;
}

.bn-footer a {
  color: #9CA3AF;
}

.bn-footer a:hover {
  color: #E5E7EB;
}

.bn-footer p {
  margin-top: 8px;
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 640px) {
  .bn-header h1 { font-size: 22px; }
  .bn-category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .article-card a {
    flex-direction: column;
  }

  .article-card-img,
  .article-card-img-placeholder {
    width: 100%;
    height: 180px;
  }
}
