:root {
  --bg: #0b0c10;
  --bg-elev: #11131a;
  --text: #e6e8ee;
  --muted: #a2a8b3;
  --brand: #7c5cff;
  --accent: #5eead4;
  --border: #262938;
  --pill: #1b1f2e;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --news-red: #ef4444;
  --news-orange: #f97316;
  --news-green: #10b981;
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #5b4bff;
  --accent: #0ea5e9;
  --border: #e2e8f0;
  --pill: #eef2ff;
  --shadow: 0 10px 24px rgba(2,6,23,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(17, 19, 26, 0.9);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .site-header { background: rgba(255,255,255,0.9); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; }
.brand-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}
.brand-text { 
  color: var(--text); 
  font-weight: 700; 
  letter-spacing: 0.2px;
  font-size: 18px;
  white-space: nowrap;
}

.theme-toggle {
  background: var(--pill);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}


/* Breaking News Banner */
.breaking-news-banner {
  background: linear-gradient(135deg, var(--news-red), var(--news-orange));
  color: white;
  padding: 12px 0;
  position: relative;
  overflow: hidden;
}

.breaking-news-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: slide 3s infinite;
}

@keyframes slide {
  0% { left: -100%; }
  100% { left: 100%; }
}

.breaking-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.breaking-label {
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.breaking-text {
  flex: 1;
  font-weight: 500;
}

.breaking-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.breaking-link:hover {
  text-decoration: underline;
}

/* Hero News */
.hero-news {
  padding: 40px 0;
  background: linear-gradient(135deg, var(--bg), var(--bg-elev));
}

.hero-news-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.news-category {
  background: var(--brand);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.news-meta time,
.read-time {
  color: var(--muted);
  font-size: 14px;
}

.hero-news-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: var(--text);
}

.hero-news-excerpt {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-news-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--text);
}

.author-title {
  font-size: 14px;
  color: var(--muted);
}

.hero-news-image img {
  border-radius: 16px;
  box-shadow: var(--shadow);
  height: 500px;
  object-fit: cover;
  width: 600px;
}

/* Ad Sections */
.ad-section {
  padding: 12px 0;
}

.ad-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  flex-direction: column;
}

.ad-image {
  width: 100%;
  max-width: 800px;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
}

.ad-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s ease;
}


/* Article Content */
.article-content {
  padding: 40px 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.main-article {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.article-body h2 {
  margin: 32px 0 16px 0;
  font-size: 24px;
  color: var(--text);
}

.article-body p {
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.7;
}

.article-quote {
  margin: 24px 0;
  padding: 20px;
  background: var(--pill);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  font-style: italic;
  color: var(--text);
}

/* Sidebar Ad */
.article-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-ad {
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.sidebar-ad .ad-image {
  max-width: 300px;
  height: 500px;
  margin: 0 auto;
  border-radius: 10px;
}

/* Inline Ad */
.ad-inline {
  padding: 40px 0;
}

.inline-ad {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  flex-direction: column;
}

.inline-ad .ad-image {
  max-width: 400px;
  height: 200px;
}

/* Article Inline Advertisement */
.article-inline-ad {
  margin: 40px 0;
  padding: 20px 0;
}

.article-inline-ad .ad-container {
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.article-inline-ad .ad-container img {
  max-width: 100%;
  height: 300px;
  width: 580px;
  margin-bottom: 10px;
  object-fit: cover;
  justify-content: center;
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile responsive for article inline ad image */
@media (max-width: 960px) {
  .article-inline-ad .ad-container img {
    width: 100%;
    height: 250px;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .article-inline-ad .ad-container img {
    width: 100%;
    height: 200px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .article-inline-ad .ad-container img {
    width: 100%;
    height: 180px;
    max-width: 100%;
  }
}

.article-inline-ad .ad-container p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Ad Styles */
@media (max-width: 960px) {
  .ad-image {
    max-width: 100%;
    height: 180px;
  }
  
  .sidebar-ad .ad-image {
    max-width: 100%;
    height: 400px;
  }
  
  .inline-ad .ad-image {
    max-width: 100%;
    height: 180px;
  }
}

@media (max-width: 720px) {
  .ad-image {
    height: 150px;
  }
  
  .sidebar-ad .ad-image {
    height: 350px;
  }
  
  .inline-ad .ad-image {
    height: 150px;
  }
}

/* Related Posts */
.related-posts {
  padding: 40px 0;
  background: var(--bg-elev);
}

.section-title {
  margin: 0 0 32px;
  font-size: 28px;
  color: var(--text);
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.related-post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.related-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.related-content {
  padding: 20px;
}

.related-category {
  background: var(--brand);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

.related-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.related-content h3 a {
  color: var(--text);
  text-decoration: none;
}

.related-content h3 a:hover {
  color: var(--brand);
}

.related-content p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.related-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* Newsletter */
.newsletter-signup {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: white;
  text-align: center;
}

.newsletter-content h2 {
  margin: 0 0 16px;
  font-size: 32px;
}

.newsletter-content p {
  margin: 0 0 32px;
  font-size: 18px;
  opacity: 0.9;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group input {
  flex: 1;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  color: var(--bg);
}

.form-group button {
  background: var(--bg);
  color: var(--brand);
  border: 0;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.form-disclaimer {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg-elev);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footnote { margin: 0; color: var(--muted); }
.socials { display: inline-flex; gap: 12px; }
.socials a { color: var(--muted); text-decoration: none; }
.socials a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .hero-news-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    position: static;
  }
  
  .ad-banner,
  .inline-ad {
    text-align: center;
  }
  
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  /* Ad responsive adjustments */
  .ad-image {
    max-width: 100%;
    height: 180px;
  }
  
  .sidebar-ad .ad-image {
    max-width: 100%;
    height: 160px;
  }
  
  .inline-ad .ad-image {
    max-width: 100%;
    height: 180px;
  }
}

@media (max-width: 720px) {
  .brand {
    gap: 10px;
  }
  
  .brand-logo {
    max-height: 40px;
  }
  
  .brand-text {
    font-size: 16px;
  }
  
  .nav-toggle { display: inline-block; }
  .nav-menu { 
    position: absolute; 
    right: 4%; 
    top: 60px; 
    background: var(--bg-elev); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 10px; 
    display: none; 
    flex-direction: column; 
    gap: 8px; 
    box-shadow: var(--shadow); 
  }
  .nav-menu.open { display: flex; }
  body.nav-open { overflow: hidden; }
  
  .breaking-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .news-meta {
    justify-content: center;
  }
  
  .hero-news-author {
    justify-content: center;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
} 