/* Dark Side Web Stylesheet */

:root {
  --bg-primary: #0a0e1f;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #252b3f;
  --text-primary: #e8e9eb;
  --text-secondary: #a3a6b0;
  --accent: #f87860;
  --accent-light: #f89880;
  --success: #51cf66;
  --warning: #ffa500;
  --danger: #f87060;
  --border: #333844;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --border-light: #4a5068;
  --bg-card: #1a1f2e;
  --text-muted: #666c7e;
  --radius: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 2px solid var(--accent);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px var(--shadow);
}

.header-brand {
  margin-bottom: 0.75rem;
}

.header-logo-full {
  max-width: 420px;
  width: min(420px, 70%);
  height: auto;
  display: block;
  margin: 0 auto 0.4rem;
}

.header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.brand {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Navigation */
nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.nav-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 300px);
}

.section {
  display: none;
  animation: fade-in 0.5s ease-in-out;
}

.section.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2.5rem 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.hero-logo {
  max-width: 360px;
  width: min(360px, 70%);
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.hero h2 {
  border: none;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  outline: none;
}

.card:hover, .card:focus {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-icon {
  margin-bottom: 1rem;
}

.card-svg {
  width: 64px;
  height: 64px;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-svg,
.card:focus .card-svg {
  transform: scale(1.08);
}

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

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-arrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .card-arrow, .card:focus .card-arrow { opacity: 1; }

/* Category Filter */
.category-filter {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Tools List */
.tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.tool-item:hover, .tool-item:focus {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

.tool-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.tool-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-network { background: rgba(88,166,255,0.15); color: #58a6ff; }
.cat-search  { background: rgba(163,230,53,0.15); color: #a3e635; }
.cat-breach  { background: rgba(255,107,107,0.15); color: var(--accent); }
.cat-cti     { background: rgba(251,191,36,0.15); color: #fbbf24; }

.tool-category {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.tool-risk {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.tool-cta {
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.tool-item:hover .tool-cta, .tool-item:focus .tool-cta { opacity: 1; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* Analysis Container */
.analysis-container {
  margin-top: 2rem;
}

.input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.analysis-input,
.category-select {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1rem;
}

.analysis-input:focus,
.category-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

#analyze-btn {
  min-width: 120px;
}

/* Analysis Result */
.analysis-result {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: slide-in 0.3s ease;
}

.analysis-result.hidden { display: none; }

@keyframes slide-in {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.loading-wrap { text-align: center; padding: 2rem; }
.loading-text { color: var(--text-secondary); margin-top: 1rem; }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.result-title { font-size: 1.5rem; color: var(--accent); margin: 0 0 0.3rem; }
.result-category-label { font-size: 0.85rem; color: var(--text-secondary); }

.result-status {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.status-identified { background: rgba(81,207,102,0.15); color: var(--success); border: 1px solid var(--success); }
.status-unknown    { background: rgba(255,165,0,0.15);  color: var(--warning); border: 1px solid var(--warning); display: inline-block; margin-bottom: 1rem; }

.result-risk-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.risk-label { color: var(--text-secondary); }
.risk-low      { color: var(--success); }
.risk-medium   { color: var(--warning); }
.risk-high     { color: var(--danger); }
.risk-critical { color: #ff3b3b; font-size: 1.05em; }

.result-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
}

.info-box {
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.2rem;
}

.info-box h4 { font-size: 0.95rem; margin-bottom: 0.7rem; }
.info-box p  { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; margin: 0; }

.research-use-box { background: rgba(88,166,255,0.08); border: 1px solid rgba(88,166,255,0.25); }
.research-use-box h4 { color: #58a6ff; }

.opsec-box { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.25); }
.opsec-box h4 { color: #fbbf24; }

.defense-box { background: rgba(81,207,102,0.08); border: 1px solid rgba(81,207,102,0.25); }
.defense-box h4 { color: var(--success); }

.result-list-section { margin-bottom: 1.2rem; }
.result-list-section h4 { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; }
.result-list-section ul { list-style: none; padding: 0; }
.result-list-section li {
  padding: 0.4rem 0 0.4rem 1rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--border);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.result-msg  { color: var(--text-secondary); margin-bottom: 0.75rem; }
.result-hint { color: var(--text-secondary); font-size: 0.88rem; }

.link-btn {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: inherit; text-decoration: underline; padding: 0;
}

/* Research Guide Section */
.section-intro {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 720px;
  line-height: 1.7;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.research-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem;
  position: relative;
}

.research-card:hover { border-color: var(--accent); }

.research-step {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.25;
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  line-height: 1;
}

.research-card h3 {
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.research-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.research-card ul {
  list-style: none;
  padding: 0;
}

.research-card li {
  color: var(--text-secondary);
  font-size: 0.88rem;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid var(--border);
  margin-bottom: 0.4rem;
}

.research-disclaimer {
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.3);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.research-disclaimer strong { color: var(--accent); }

/* About Content */
.about-content {
  max-width: 800px;
}

.about-content h3 {
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.about-content ul {
  list-style-position: inside;
  color: var(--text-secondary);
  margin-left: 1rem;
}

.about-content li {
  margin-bottom: 0.6rem;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
/* Sponsor bar */
.sponsor-section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.sponsor-section .section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.sponsor-section .section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}


.sponsor-video-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  transition: var(--transition);
}

.sponsor-video-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-lg); }

.sponsor-video {
  width: 200px;
  max-width: 36%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.sponsor-video-info { flex: 1; min-width: 0; }
.sponsor-video-info h3 { font-size: 1rem; margin-bottom: 3px; color: var(--text-primary); }
.sponsor-video-info .sponsor-tagline { font-size: 0.78rem; margin-bottom: 8px; }
.sponsor-video-info .sponsor-desc { font-size: 0.8rem; margin-bottom: 12px; line-height: 1.45; }
.sponsor-video-info .sponsor-cta { width: auto; display: inline-flex; padding: 8px 16px; font-size: 0.85rem; }

@media (max-width: 720px) {
  .sponsor-video-card { flex-direction: column; }
  .sponsor-video { width: 100%; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-video { animation: none; }
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.sponsor-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.sponsor-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 2px 8px;
}

.sponsor-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.sponsor-icon svg { width: 26px; height: 26px; }

.sponsor-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.sponsor-tagline {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.sponsor-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.sponsor-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.sponsor-disclosure {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  text-align: center;
  color: var(--text-secondary);
  margin-top: 4rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin: 0 2rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-privacy-link { color: var(--accent); text-decoration: none; }
.footer-privacy-link:hover { text-decoration: underline; }

.footer-logo {
  display: block;
  margin: 12px auto 0;
  height: 48px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.footer-logo:hover { opacity: 1; }

footer p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

footer small {
  color: var(--text-secondary);
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  nav {
    gap: 0.5rem;
  }

  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .input-group {
    flex-direction: column;
  }

  .analysis-input,
  .category-select {
    min-width: auto;
  }

  .tools-list {
    grid-template-columns: 1fr;
  }
}
