/* === Utility === */
.hidden { display: none !important; }

:root {
  --bg-gradient-start: #0a0f1c;
  --bg-gradient-end: #000000;
  --color-surface: #161b22;
  --color-border: #30363d;
  --color-text-primary: #ffffff;
  --color-text-secondary: #8b949e;
  --color-accent: #2f81f7;
  --color-accent-hover: #388bfd;
  --color-danger: #f85149;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, var(--bg-gradient-start), var(--bg-gradient-end) 70%);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(180deg, rgba(47,129,247,0.1) 0%, transparent 100%);
  border-bottom: 1px solid var(--color-border);
}
.hero-logo { filter: drop-shadow(0 0 35px rgba(47,129,247,0.6)); }
.hero-logo-xxl {
  height: 180px;
  max-width: 80%;
}
.hero-slogan {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 1.5rem;
  color: var(--color-text-primary);
}

/* === Layout === */
.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* === Search === */
.search-section { margin-bottom: 1.5rem; }

.input-field {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.05);
  color: var(--color-text-primary);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

.input-field:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(47,129,247,0.6);
  outline: none;
}

/* === Feed === */
.feed { 
  display: grid; 
  gap: 1rem; 
}

.card-elevated {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: all 0.25s ease;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.card-elevated:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(47,129,247,0.3);
}

.card-elevated h3 {
  margin: 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ✅ Summaries are always white */
.card-elevated .summary-text,
#feed .summary-text {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #ffffff !important;
}

/* ✅ CVE IDs + dates remain gray */
.cve-label,
.meta-date {
  font-size: 0.8rem;
  color: var(--color-text-secondary) !important;
}

/* === Status === */
.status-text { 
  font-size: 0.9rem; 
  color: var(--color-text-secondary); 
  margin-bottom: 0.5rem; 
}

/* === Buttons === */
.btn-primary {
  background: var(--color-accent);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:hover { background: var(--color-accent-hover); }

/* === Detail Sheet === */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
}
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }

.sheet-panel {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border-left: 2px solid var(--color-accent);
  padding: 1.5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}

/* On small screens, make sheet full width */
@media (max-width: 640px) {
  .sheet-panel {
    max-width: 100%;
    border-left: none;
    border-top: 2px solid var(--color-accent);
  }
}

/* === Animations === */
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* === Sheet Content === */
.sheet-header { display: flex; justify-content: space-between; align-items: start; }
.sheet-title { margin: 0.5rem 0 1rem; font-size: 1.1rem; }
.sheet-summary { font-size: 0.95rem; margin-top: 1rem; color: var(--color-text-secondary); }

/* === Responsive Tweaks === */
@media (max-width: 768px) {
  .hero-logo-xxl { height: 140px; }
  .hero-slogan { font-size: 1.1rem; }
  .card-elevated { padding: 0.9rem; font-size: 0.9rem; }
  .input-field { font-size: 0.9rem; padding: 0.7rem 1rem; }
}

@media (max-width: 480px) {
  .card-elevated h3 { font-size: 0.9rem; }
  .card-elevated p { font-size: 0.85rem; }
}
