/* Enhanced CSS with premium styling */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #06d6a0;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* Enhanced Theming */
:root {
  --bg: var(--light);
  --fg: var(--dark);
  --card: #ffffff;
  --muted: var(--gray);
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --fg: #e5e7eb;
  --card: #0f172a;
  --muted: #94a3b8;
  --border: #1f2937;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Enhanced Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Announcement Bar */
.announcement-bar {
    background: var(--gradient);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
}

.announcement-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-close {
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
}

.announcement-close:hover {
    opacity: 1;
}

/* Enhanced Ticker */
.ticker {
    background: var(--darker);
    color: #cbd5e1;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 1001;
    overflow: hidden;
}

.ticker-inner {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 1.5rem;
}

.ticker-label {
    font-weight: 600;
    color: #94a3b8;
}

.ticker-items {
    display: flex;
    gap: 1.25rem;
    overflow: hidden;
    flex: 1;
    position: relative;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* two copies => loop */
}

.tick {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.tick strong {
    color: #fff;
}

.tick .up {
    color: var(--success);
}

.tick .down {
    color: var(--danger);
}

.ticker-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.market-sentiment.positive {
    color: var(--success);
}

.market-sentiment.negative {
    color: var(--danger);
}

/* Enhanced Header */
header {
    background: var(--dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 33px; /* Account for ticker height */
    z-index: 1000;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--fg);
    padding: 0.75rem 1rem;
    display: block;
}

.dropdown-content a:hover {
    background: rgba(0,0,0,0.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: white;
    width: 200px;
    transition: width 0.3s;
}

.search-bar input:focus {
    width: 250px;
    outline: none;
    background: rgba(255,255,255,0.15);
}

.search-bar button {
    background: transparent;
    border: none;
    color: white;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.user-actions {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu span {
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s;
}

/* Enhanced Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    background: var(--accent);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 0.9rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.greed {
    color: var(--success);
    font-size: 0.9rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-widget {
    max-height: none;           /* allow full height */
    overflow: visible;          /* no internal scroll clipping */
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.widget-header h3 {
    font-size: 1rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.movers-list {
  max-height: none;           /* show all rows */
  overflow: visible;          /* remove scrollbar */
  scrollbar-width: none;      /* Firefox (noop with visible but safe) */
  -ms-overflow-style: none;   /* IE/Edge legacy */
}
.movers-list::-webkit-scrollbar { display: none; }

.mover-item, .mover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto; /* name | price | % */
  align-items: center;
  gap: .5rem;
  padding: .05rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mover-item:last-child, .mover:last-child { border-bottom: 0; }

.mover-head, .mover-info {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: .5rem;
  min-width: 0; /* enable truncation */
}
.mover-head img, .mover-info img { width: 20px; height: 20px; border-radius: 50%; }

.mover-head strong { font-size: .8rem; }
.mover-head small {
  font-size: .74rem;
  opacity: .7;
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mover-price { text-align: right; font-weight: 600; font-size: .9rem; }
.mover-change { text-align: right; font-size: .85rem; }

/* Enhanced Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--fg);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    height: 180px;
    background: var(--dark);
    position: relative;
}

.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.article-excerpt {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
}

.center-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    background: var(--dark);
    color: white;
}

.card-header h3 {
    font-size: 1.1rem;
}

.tag-list {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

.popular-list {
    list-style: none;
    padding: 1.5rem;
}

.popular-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list a {
    text-decoration: none;
    color: var(--fg);
    transition: color 0.3s;
}

.popular-list a:hover {
    color: var(--primary);
}

#newsletter-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#newsletter-email {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--fg);
}

.events-list {
    list-style: none;
    padding: 1.5rem;
}

.events-list li {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.events-list li:last-child {
    border-bottom: none;
}

.event-date {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.event-title {
    font-weight: 500;
}

.ad-space {
    position: relative;
}

.ad-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.1);
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.ad-placeholder {
    padding: 3rem 1.5rem;
    text-align: center;
    background: rgba(0,0,0,0.05);
}

/* Podcast Section */
.podcast-section {
    padding: 3rem 0;
    background: var(--card);
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.podcast-card {
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.podcast-card:hover {
    transform: translateY(-5px);
}

.podcast-image {
    height: 200px;
    background: var(--dark);
    position: relative;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.play-btn:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.podcast-content {
    padding: 1.5rem;
}

.podcast-category {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.podcast-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.podcast-content p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.podcast-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Enhanced Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.socials {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.socials a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.footer-bottom-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: white;
}

/* Compact Market Overview */
.market-overview { padding: 1.5rem 0; }
.market-overview .section-title { font-size: 1.8rem; margin-bottom: 1rem; }
.market-tabs { margin-bottom: 1rem; gap: .5rem; }

.market-table-container {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Keep table layout intact (no stacking) */
.market-table {
  width: 100%;
  table-layout: auto;
}

/* Denser table */
.market-table th, .market-table td { padding: .6rem .75rem; font-size: .9rem; }
.market-table th { position: sticky; top: 0; z-index: 1; }
.market-table td.asset { display:flex; align-items:center; gap:.5rem; }
.market-table td.asset img { width: 20px; height: 20px; }
.market-table td.up { color: var(--success); }
.market-table td.down { color: var(--danger); }

/* Smaller sparkline */
.market-table svg { width: 100px; height: 24px; }

/* Featured fixes: snap scrolling + image fit */
.featured-carousel { scroll-snap-type: x mandatory; }
.featured-slide { scroll-snap-align: start; display: block; text-decoration: none; color: inherit; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured Stories – cleaner layout */
.featured-section { padding: 2rem 0; background: var(--bg); }
.section-header { margin-bottom: 1.25rem; }
.section-controls,
.carousel-indicators { display: none; } /* hide arrows/dots for a cleaner look */

/* Desktop/tablet: grid */
.featured-carousel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  overflow: visible;
  padding-bottom: 0;
}

@media (max-width: 1024px) {
  .featured-carousel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile: swipe horizontally with snap */
@media (max-width: 768px) {
  .featured-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .25rem;
  }
  .featured-carousel::-webkit-scrollbar { display: none; }
  .featured-slide { min-width: 85%; scroll-snap-align: start; }
}

/* Card polish */
.featured-slide {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.featured-slide:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.featured-image {
  position: relative;
  aspect-ratio: 16 / 9;       /* keep thumbnails consistent */
  background: var(--dark);
  overflow: hidden;
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.featured-category {
  position: absolute;
  top: .75rem; left: .75rem;
  background: var(--primary);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.featured-content {
  padding: 1rem 1rem 1.1rem;
  display: grid;
  gap: .5rem;
  flex: 1;
}
.featured-content h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}
.featured-content p {
  color: var(--muted);
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* clamp to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: .6rem;
}

/* No underline on article titles/card links */
.article-card a,
.article-card a:visited,
.article-card a:hover,
.article-card a:focus {
  text-decoration: none;
  color: inherit;
}

/* Ensure Featured slide links also never underline */
a.featured-slide,
a.featured-slide:visited,
a.featured-slide:hover,
a.featured-slide:focus {
  text-decoration: none;
  color: inherit;
}

/* Market Overview — centered heading and tabs */
.market-overview .section-title {
  text-align: center !important;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .2px;
  margin-bottom: .85rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.market-overview .section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: var(--primary);
  margin: .5rem auto 0;
  border-radius: 2px;
}

.market-overview .market-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.market-overview .tab-btn {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: .45rem .9rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--shadow);
}
.market-overview .tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.market-overview .tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

/* Mobile spacing */
@media (max-width: 480px) {
  .market-overview .section-title { font-size: 1.6rem; }
  .market-overview .tab-btn { padding: .4rem .75rem; font-size: .88rem; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links, .user-actions {
        display: none;
    }
    .nav-links.show {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 60px;
        background: var(--card);
        border-top: 1px solid var(--border);
        padding: 1rem;
        z-index: 1000;
    }
    .nav-links.show a { color: var(--fg); }
    .mobile-menu {
        display: flex;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .market-tabs {
        flex-wrap: wrap;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .podcast-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ---- Keep existing unique styles (single article, comments, social, skeletons) ---- */

/* Single Article Page */
.article-header {
    background: var(--dark);
    color: white;
    padding: 3rem 0;
}

.article-title-single {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta-single {
    display: flex;
    gap: 2rem;
    opacity: 0.8;
}

.article-content-single {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 20px;
}

.article-content-single img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
}

.article-content-single h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    color: var(--fg);
}

.article-content-single h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--fg);
}

.article-content-single p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content-single strong { font-weight: 600; }
.article-content-single em { font-style: italic; }

/* Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.social-share button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
    color: #fff;
}

.social-share button:hover { opacity: 0.85; }
.facebook { background: #1877f2; color: white; }
.twitter { background: #1da1f2; color: white; }
.linkedin { background: #0077b5; color: white; }

/* Comments */
.comment {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.comment-header strong { color: var(--fg); }
.comment-header span { color: var(--muted); font-size: 0.9rem; }

.comment-form {
    background: var(--card);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    margin-bottom: 1rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--fg);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Utilities and states */
.highlight { background-color: #ffeb3b; padding: 0.1rem 0.2rem; border-radius: 2px; }
.loading { opacity: 0.6; pointer-events: none; }
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}
#search-stats { font-size: 1.1rem; color: var(--muted); }

/* Skeletons */
.skeleton { position:relative; overflow:hidden; background: #e5e7eb; border-radius:10px; }
:root[data-theme="dark"] .skeleton { background:#111827; }
.skeleton::after {
  content:''; position:absolute; inset:0; transform:translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Bigger image for featured cards */
.article-card--big .article-image { height: 260px; }

/* Ensure titles are visible and not overlapped */
.article-content, .featured-content { position: relative; z-index: 1; }

/* Title visibility + clamp (covers both Latest and Featured) */
.article-content .article-title,
.article-card h3,
.featured-content h3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--fg) !important;
  font-weight: 700;
  line-height: 1.3;
  font-size: 1rem;
  margin: 0 0 .45rem 0;
}

/* Compact Featured cards */
.featured-section { padding: 1.25rem 0; }
.featured-carousel { gap: .9rem; }
.featured-slide {
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.featured-slide:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.featured-image {
  position: relative;
  aspect-ratio: 16 / 10; /* shorter thumbnail */
  background: var(--dark);
  overflow: hidden;
}
@supports not (aspect-ratio: 1 / 1) {
  .featured-image { height: 150px; }
}
.featured-image img { width:100%; height:100%; object-fit:cover; display:block; }

.featured-category {
  top: .55rem; left: .55rem; padding: .16rem .5rem; font-size: .7rem;
}

.featured-content {
  padding: .7rem .85rem .85rem;
  display: grid;
  gap: .4rem;
}
.featured-content p { display: none; } /* prioritize title */
.featured-meta { font-size: .78rem; padding-top: .45rem; }

/* Thumbnails: strict 16:9 and no overlays */
.article-card .article-image,
.featured-slide .article-image,
.featured-image {
  position: relative;
  aspect-ratio: 16 / 9;
  height: auto !important;     /* override any fixed heights */
  overflow: hidden;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}
.article-card .article-image img,
.featured-slide .article-image img,
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ensure content sits under the thumbnail */
.article-content,
.featured-content {
  position: static;
  padding: .85rem .95rem;
}

/* Titles: visible, readable, clamped to 2 lines */
.article-card .article-title,
.article-card h3,
.featured-content h3 {
  margin: 0 0 .45rem 0;
  color: var(--fg);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Excerpt and meta */
.article-excerpt,
.featured-content p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
  margin: 0 0 .5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta,
.featured-meta {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

/* Categories as pills below image (no overlay) */
.article-category,
.featured-category {
  position: static !important;
  display: inline-block;
  margin: .5rem 0 .35rem;
  padding: .18rem .6rem;
  border-radius: 999px;
  background: rgba(37,99,235,.12);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
}
/* Hide any category badge inside the image area if present */
.featured-image > .featured-category { display: none !important; }

/* Compact card sizing */
.article-card,
.featured-slide {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.article-card:hover,
.featured-slide:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* If any previous heights were set, override to keep cards tight */
.article-card .article-image { height: auto !important; }
.article-card--big .article-image { height: auto !important; }


/* Enhanced Article Page Styles */
.article-header {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
}

.article-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.article-category {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title-single {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta-extended {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.author-details {
    text-align: left;
}

.author-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.article-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.article-meta-single {
    display: flex;
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin: 3rem auto;
    max-width: 1200px;
}

.article-main {
    min-width: 0; /* Prevent overflow */
}

/* Featured Image */
.featured-image-container {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Article Body */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--fg);
}

.article-body h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    color: var(--fg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: var(--fg);
}

.article-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--fg);
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-body strong {
    font-weight: 600;
    color: var(--fg);
}

.article-body em {
    font-style: italic;
}

.article-body code {
    background: var(--dark);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-body .content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted);
    background: rgba(37, 99, 235, 0.05);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.article-tags .tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Article Actions */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.action-group {
    display: flex;
    gap: 1rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-action.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Premium Social Share */
.social-share.premium {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.social-share.premium h3 {
    margin-bottom: 1.5rem;
    color: var(--fg);
    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.reddit { background: #ff4500; }
.share-btn.copy-link { background: var(--primary); }

/* Author Bio */
.author-bio {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    align-items: flex-start;
}

.author-avatar-large {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.author-bio-content {
    flex: 1;
}

.author-bio-content h3 {
    margin-bottom: 1rem;
    color: var(--fg);
}

.author-bio-content p {
    margin-bottom: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: 1rem;
}

.author-social a {
    color: var(--primary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: var(--primary-dark);
}

/* Newsletter */
.article-newsletter {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    text-align: center;
}

.newsletter-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.newsletter-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form button {
    white-space: nowrap;
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-article {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.nav-article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.nav-article.prev {
    text-align: left;
}

.nav-article.next {
    text-align: right;
    flex-direction: row-reverse;
}

.nav-content span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.nav-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--fg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

/* Table of Contents */
.toc-list {
    max-height: 300px;
    overflow-y: auto;
}

.toc-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    display: block;
    padding: 0.5rem 0;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
}

.toc-list a:hover {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.toc-h2 {
    font-weight: 600;
    margin-left: 0;
}

.toc-h3 {
    font-weight: 500;
    margin-left: 1rem;
    font-size: 0.9rem;
}

/* Popular Sidebar Articles */
.sidebar-article {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-article a {
    text-decoration: none;
    color: var(--fg);
    transition: color 0.3s ease;
}

.sidebar-article a:hover {
    color: var(--primary);
}

.sidebar-article h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.sidebar-article span {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Price Widget */
.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.price-item:last-child {
    border-bottom: none;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coin-info img {
    border-radius: 50%;
}

.coin-price {
    font-weight: 600;
}

.coin-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.coin-change.up {
    color: var(--success);
}

.coin-change.down {
    color: var(--danger);
}

/* Ad Widget */
.ad-widget {
    position: relative;
}

.ad-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.ad-content {
    text-align: center;
    padding: 1rem 0;
}

.ad-content p {
    margin-bottom: 1rem;
    color: var(--muted);
}

/* Related Articles */
.related-articles {
    margin: 4rem 0 2rem;
}

.related-articles .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.related-articles .view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.related-articles .view-all:hover {
    color: var(--primary-dark);
}

/* Premium Comment Section */
.comment-section {
    margin: 4rem 0;
}

.comment-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.comment-sort select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--fg);
    font-size: 0.9rem;
}

/* Premium Comment Form */
.comment-form.premium {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.comment-form.premium h3 {
    margin-bottom: 1.5rem;
    color: var(--fg);
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-form.premium input,
.comment-form.premium textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    background: var(--bg);
    color: var(--fg);
    transition: border-color 0.3s ease;
}

.comment-form.premium input:focus,
.comment-form.premium textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form.premium textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-guidelines {
    color: var(--muted);
    font-size: 0.85rem;
}

.comment-guidelines a {
    color: var(--primary);
    text-decoration: none;
}

.comment-guidelines a:hover {
    text-decoration: underline;
}

/* Premium Comments */
.comment {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.comment-author strong {
    display: block;
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--muted);
}

.comment-content {
    line-height: 1.6;
    color: var(--fg);
}

.no-comments {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
    font-style: italic;
}

/* Comments Pagination */
.comments-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.comments-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--fg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comments-pagination button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.comments-pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Highlight */
.highlight {
    background-color: rgba(255, 235, 59, 0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Loading States */
.loading-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

/* Print Styles */
@media print {
    .announcement-bar,
    .ticker,
    header,
    .article-actions,
    .social-share,
    .article-sidebar,
    .article-newsletter,
    .comment-section,
    footer {
        display: none !important;
    }
    
    .article-header {
        background: white !important;
        color: black !important;
        padding: 1rem 0 !important;
    }
    
    .article-title-single {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
    
    .article-layout {
        grid-template-columns: 1fr !important;
        margin: 0 !important;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        position: static;
        order: -1;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-title-single {
        font-size: 2rem;
    }
    
    .article-meta-extended {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .article-meta-single {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar-large {
        align-self: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .action-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-title-single {
        font-size: 1.7rem;
    }
    
    .article-header {
        padding: 2rem 0 1.5rem;
    }
    
    .article-featured-image {
        height: 250px;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.3rem;
    }
}

/* Article page: remove sidebar widgets and collapse to one column */
.article-sidebar,
.article-sidebar .toc-widget,
.article-sidebar .price-widget,
.article-sidebar .popular-sidebar-articles {
  display: none !important;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr !important; /* single column */
  gap: 0 !important;
}

.author-avatar img, .author-avatar-large img {
  width: 100%; height: 100%; border-radius: 10%; object-fit: cover; display: block;
}
 

.author-bio {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.author-avatar-large {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.author-avatar-large i {
  font-size: 2rem;
  opacity: .7;
}

.author-bio-content h3 {
  margin: 0 0 .35rem;
}
.author-bio-content p {
  margin: 0 0 .75rem;
  color: var(--muted);
}

.author-social {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.author-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}
.author-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile stacking */
@media (max-width: 768px) {
  .author-bio {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .author-avatar-large {
    width: 65px;
    height: 65px;
  }
  .author-bio-content { width: 100%; }
  .author-social { justify-content: center; }
}

/* Extra small screens */
@media (max-width: 420px) {
  .author-avatar-large {
    width: 80px;
    height: 80px;
  }
}



/* Share this article - responsive */
.social-share.premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 1.25rem 0 1.75rem;
}
.social-share.premium h3 {
  margin: 0;
  font-size: 1.05rem;
}
.social-share.premium .share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .6rem;
  justify-content: flex-end;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .1s ease;
}
.share-btn i { font-size: 18px; }
.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.share-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}

/* Mobile: stack title and buttons, center content */
@media (max-width: 768px) {
  .social-share.premium {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .75rem;
  }
  .social-share.premium .share-buttons {
    justify-content: center;
  }
}

/* Very small screens: slightly smaller buttons and tighter gaps */
@media (max-width: 420px) {
  .social-share.premium { padding: .8rem; }
  .social-share.premium .share-buttons { gap: .4rem; }
  .share-btn { width: 40px; height: 40px; }
  .share-btn i { font-size: 16px; }
}

.nav-article.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}



/* Brand block: logo with search underneath */
.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.brand .search-bar {
  max-width: 360px; /* adjust as you like */
}
.brand .search-bar form {
  display: flex;
  gap: 8px;
}
.brand .search-bar input {
  flex: 1;
  min-width: 0;
}

/* Keep layout tidy on small screens */
@media (max-width: 900px) {
  nav.container {
    align-items: flex-start;
  }
  .brand .search-bar {
    max-width: 100%;
    width: 100%;
  }
}

/* Brand block: logo with search underneath */
.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.brand .search-bar {
  max-width: 360px; /* adjust as you like */
}
.brand .search-bar form {
  display: flex;
  gap: 8px;
}
.brand .search-bar input {
  flex: 1;
  min-width: 0;
}

/* Keep layout tidy on small screens */
@media (max-width: 900px) {
  nav.container {
    align-items: flex-start;
  }
  .brand .search-bar {
    max-width: 100%;
    width: 100%;
  }
}



/* Market Overview responsive */
.market-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-actions { display: none; }

@media (max-width: 768px) {
  /* Hide Chart (7d) and Action columns */
  .market-table th:nth-child(5),
  .market-table td:nth-child(5),
  .market-table th:nth-child(6),
  .market-table td:nth-child(6) {
    display: none;
  }
  .mobile-actions { display: block; margin-top: 6px; }
  .market-table th, .market-table td { padding: 10px 8px; }
}


/* Premium form card */
.premium-form-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  box-shadow: var(--shadow-xl, 0 10px 30px rgba(0,0,0,0.15));
  overflow: hidden;
  border: 1px solid var(--border);
}
.premium-form-card::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,.6), rgba(16,185,129,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Card header */
.card-subtitle {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Form layout */
.ad-form { padding: 2rem; }
.form-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 768px) {
  .ad-form { padding: 1.25rem; }
  .form-grid.two-col { grid-template-columns: 1fr; }
}

/* Fields */
.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: .5rem;
}
.input-wrapper {
  position: relative;
}
.input-wrapper .input-icon {
  position: absolute;
  top: 50%; left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .95rem;
}
.input-wrapper.no-icon .input-icon { display: none; }

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: .8rem 0.9rem .8rem 2.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card, #0b0b0b);
  color: var(--text, #e6e6e6);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrapper.no-icon input,
.input-wrapper.no-icon select,
.input-wrapper.no-icon textarea {
  padding-left: .9rem;
}
.input-wrapper textarea { resize: vertical; }

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: rgba(99,102,241,.6);
  box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}

/* Multi-select height */
#ad-interests {
  min-height: 120px;
}

/* Help text */
.help {
  color: var(--muted);
  display: block;
  margin-top: .4rem;
}

/* Actions */
.form-actions {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-actions .disclaimer {
  color: var(--muted);
  font-size: .9rem;
}

/* Buttons */
.btn-lg { padding: .9rem 1.2rem; border-radius: 10px; font-weight: 600; }
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #10b981);
  border: none;
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .7; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed;
  right: 24px; bottom: 24px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid #10b981;
  padding: .9rem 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 10px 20px rgba(0,0,0,.2));
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.error { border-left-color: #ef4444; }
