:root {
  --bg: #0d1117;
  --card-bg: #161b22;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #3a8de0;
  --input-bg: #0d1117;
  --font: 'Poppins', sans-serif;
}

[data-theme='light'] {
  --bg: #ffffff;
  --card-bg: #f1f1f1;
  --text: #111;
  --muted: #666;
  --accent: #0070f3;
  --accent-hover: #0059cc;
  --input-bg: #fff;
}

@font-face {
  font-family: 'Poppins';
  font-weight: 400;
  src: url('https://assets.threatscopecheck.com/fonts/Poppins-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  src: url('https://assets.threatscopecheck.com/fonts/Poppins-Bold.woff2') format('woff2');
  font-display: swap;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  flex: 1 0 auto;
  max-width: 1400px; /* 💡 Wider content container */
  margin: 0 auto;
  padding: 0.5rem 1rem; /* 💡 More breathing room on large screens */
}


footer {
  flex-shrink: 0;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--card-bg);
}

/* HEADER */
.header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
}

.header-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .header-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.branding {
  display: flex;
  gap: 1rem;
  align-items: center;
  text-align: left;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 0;
}

.tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.25rem 0 0 0;
}

.header-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem; /* add spacing below header branding */
}

.refresh-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#current-date {
  color: var(--text);
  font-weight: 500;
}

#refresh-button {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

#refresh-button:hover {
  background: var(--accent-hover);
}

.header-meta {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.header-meta small {
  display: block;
}

/* MAIN GRID + CARDS */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.card h2 {
  margin-top: 0;
  color: var(--accent);
}

.card-footer {
  margin-top: 1rem;
}

.card-footer a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

/* SPECIAL BLOCKS */
.pulse-card, .cloud-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
}

.pulse-card h3, .cloud-card h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  color: var(--text);
}

.tags {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.summary {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.stacked-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* EXPOSURE METRICS */
.section-subheading {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
  text-align: center;
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  font-size: 0.95rem;
  color: var(--muted);
}

.metric-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.metrics-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

/* NEWSLETTER */
.newsletter {
  margin-top: 2rem;
  text-align: center;
}

.newsletter h3 {
  margin-bottom: 1rem;
  color: var(--accent);
}

.newsletter input {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  margin-right: 0.5rem;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

.newsletter button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* FOOTER */
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 600px) {
  .footer-top {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
}

@media (min-width: 1600px) {
  .container {
    max-width: 90vw;
  }
}


.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.footer-bottom {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-disclaimer {
  margin-top: 0.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  font-size: 0.8rem;
  color: var(--muted);
}

/* SOCIAL */
.social-group {
  text-align: center;
}

.social-group span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.social-icons a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.icon {
  width: 24px;
  height: 24px;
}

/* LINKS */
a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
