* {
  box-sizing: border-box;
}

:root {
  /* BleepingComputer Inspired Palette */
  --bg-color: #ffffff;
  --bg-secondary: #f6f6f6;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #777777;
  --accent-color: #007bff; /* Bright blue for links */
  --accent-hover: #0056b3;
  --border-color: #e5e5e5;
  --header-bg: #002d5b; /* Dark Navy Blue */
  --footer-bg: #002d5b;
  --danger: #d9534f; /* Security Red */
  
  --header-height-top: 35px;
  --header-height-main: 65px;
  --container-width: 1140px;
}

/* Dark Mode Refinements */
[data-theme="dark"] {
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --card-bg: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-color: #38bdf8;
  --accent-hover: #7dd3fc;
  --border-color: #334155;
  --header-bg: #020617;
  --footer-bg: #020617;
}

body {
  font-family: 'Open Sans', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
  color: #f1f5f9;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

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

ul {
  list-style: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 4px;
  background-color: #28a745; /* Success green for buttons */
  color: #ffffff;
  transition: background-color 0.2s;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.btn:hover {
  background-color: #218838;
  color: #ffffff;
  text-decoration: none;
}

/* Double-Layered Header */
header {
  background-color: var(--header-bg);
  color: #ffffff;
}

.header-top {
  height: auto;
  min-height: var(--header-height-top);
  background-color: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  padding: 5px 0;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .header-date {
    display: none;
  }
  .header-top-inner {
    justify-content: center;
  }
}

.header-main {
  height: auto;
  min-height: var(--header-height-main);
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.logo-accent {
  color: #ffc107; /* Amber accent */
}

.tagline {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav a:hover {
  border-bottom-color: #ffc107;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon-link {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.social-icon-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.social-icon-link i {
  width: 16px;
  height: 16px;
}

.search-bar {
  position: relative;
}

.search-bar input {
  padding: 0.4rem 0.8rem 0.4rem 2rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background-color: rgba(255,255,255,0.1);
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  width: 180px;
}

.search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  width: 14px;
  height: 14px;
}

.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: all 0.2s;
  padding: 0;
  margin-left: 5px;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: #ffc107;
}

.theme-toggle i {
  width: 14px;
  height: 14px;
}

/* Featured Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 30px;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 4px;
}

.hero-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  color: #ffffff;
}

.hero-item-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Latest Grid (List view like BC) */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-list-item {
  display: flex;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--border-color);
}

.article-list-img {
  width: 250px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.article-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-list-content {
  flex-grow: 1;
}

.category-tag {
  color: var(--danger);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 5px;
  display: block;
}

.article-list-title {
  font-size: 1.4rem;
  margin: 5px 0 10px 0;
  color: var(--text-primary);
}

.article-list-desc {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.article-list-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Sidebar */
.sidebar-widget {
  margin-bottom: 30px;
}

.sidebar-title {
  font-size: 1rem;
  text-transform: uppercase;
  border-bottom: 2px solid #002d5b;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.trending-item {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.trending-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ccc;
  line-height: 1;
}

.trending-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Article Page */
.article-header-bc {
  margin-bottom: 30px;
}

.article-title-bc {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.article-meta-bc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  display: flex;
  gap: 20px;
}

.article-body-bc {
  font-size: 1.1rem;
  line-height: 1.7;
}

.article-body-bc p {
  margin-bottom: 20px;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.share-buttons a, .share-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

.share-buttons a:hover, .share-buttons button:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  text-decoration: none;
}

.share-buttons i {
  width: 18px;
  height: 18px;
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1rem;
}

.related-card img {
  border-radius: 4px;
  margin-bottom: 10px;
  height: 120px;
  width: 100%;
  object-fit: cover;
}

.related-card h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: #ffffff;
  padding: 50px 0 20px 0;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffc107;
}

.footer-links a {
  display: block;
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
  }
  .logo {
    text-align: center;
  }
  .header-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .article-list-item {
    flex-direction: column;
  }
  .article-list-img {
    width: 100%;
    height: 250px;
  }
  .article-title-bc {
    font-size: 1.8rem;
  }
  .header-top-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .logo-main {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 10px;
  }
  .nav-links a {
    font-size: 0.75rem;
  }
  .search-bar input {
    width: 100%;
    max-width: 280px;
  }
}
