/* ============================================================
   OSINT Lab - Complete Stylesheet
   ============================================================ */

/* 1. CSS Variables */
:root {
  --bg: #050505;
  --bg-card: #0c0c0e;
  --bg-card-hover: #111113;
  --bg-input: #0a0a0c;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #fafafa;
  --text-body: #a1a1aa;
  --text-quiet: #71717a;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(34, 211, 238, 0.08);
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
}

/* 2. Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* 3. Container */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 4. Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* 5. Nav Inner */
.nav-inner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 6. Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

/* 7. Logo Icon */
.logo-icon {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  line-height: 1;
}

/* 8. Nav Links */
.nav-links {
  display: flex;
  gap: 28px;
}

/* 9. Nav Links a */
.nav-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* 10. Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* 11. Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

/* 12. Hero Label / Badge */
.hero-label,
.hero-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 100px;
  padding: 6px 16px;
}

/* 13. Hero Heading */
.hero h1,
.hero-heading {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  max-width: 600px;
}

/* 14. Accent */
.accent {
  color: var(--accent);
}

/* 15. Hero Subheading / Description */
.hero-subheading,
.hero-desc {
  font-size: 16px;
  color: var(--text-body);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* 16. Hero Actions */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 32px;
}

/* 17. Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
  border: none;
  line-height: 1;
}

/* 18. Button Primary */
.btn-primary {
  background: var(--accent);
  color: #050505;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* 19. Button Ghost */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-body);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

/* 20. Hero Glow */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--accent-glow);
  filter: blur(120px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

/* 21. Tab Bar */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* 22. Tab Button */
.tab-btn,
.tab-button {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-quiet);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 150ms ease;
  line-height: 1;
}

.tab-btn:hover,
.tab-button:hover {
  color: var(--text-body);
}

.tab-btn.active,
.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* 23. Search Box */
.search-box {
  display: flex;
  gap: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 150ms ease;
}

.search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.15);
}

/* 24. Search Input */
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--mono);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-quiet);
}

/* 25. Search Button */
.search-btn {
  padding: 14px 24px;
  background: var(--accent);
  color: #050505;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 150ms ease;
  white-space: nowrap;
}

.search-btn:hover {
  opacity: 0.9;
}

/* 26. Stats Row */
.hero-stats,
.stats-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 48px;
}

/* 27. Stat */
.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* 28. Stat Number */
.stat-num,
.stat-number {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 29. Stat Label */
.stat-label {
  font-size: 12px;
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 30. Features / How It Works Section */
.features,
.how-it-works {
  padding: 120px 0;
}

/* 31. Section Label */
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* 32. Section Heading */
.section-title,
.section-heading {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

/* 33. Section Description */
.section-desc,
.section-description {
  font-size: 14px;
  color: var(--text-body);
  max-width: 520px;
  margin-bottom: 64px;
}

/* 34. Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* 35. Feature Card */
.feature-card {
  background: var(--bg-card);
  padding: 32px;
  transition: background 150ms ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
}

/* 36. Step Number */
.step-number {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* 37. Feature Icon */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(34, 211, 238, 0.15);
  margin-bottom: 16px;
  font-size: 18px;
  flex-shrink: 0;
}

/* 38. Feature Title */
.feature-title,
.feature-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* 39. Feature Description */
.feature-desc,
.feature-card p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
}

/* 40. Modules Section */
.modules {
  padding: 120px 0;
}

/* 41. Module Filters */
.module-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* 42. Filter Button */
.filter-btn {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-body);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  color: #050505;
  border-color: var(--accent);
}

/* 43. Module Grid */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* 44. Module Card */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 150ms ease;
  cursor: pointer;
}

.module-card:hover {
  border-color: var(--border-strong);
}

/* 45. Module Card Icon */
.module-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.module-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 46. Module Card Info */
.module-card-info {
  flex: 1;
  min-width: 0;
}

/* 47. Module Card Name */
.module-card-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 48. Module Card Category */
.module-card-cat {
  font-size: 12px;
  color: var(--text-body);
  text-transform: capitalize;
}

/* 49. Module Card Badge */
.module-card-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
}

/* 50. Module Loading */
.module-loading {
  text-align: center;
  color: var(--text-body);
  padding: 64px;
  grid-column: 1 / -1;
}

/* 51. API Section */
.api-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

/* 52. Code Block */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

/* 53. Code Header */
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-quiet);
}

/* 54. Code Dots */
.code-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red {
  background: var(--red);
}

.code-dot.yellow {
  background: var(--yellow);
}

.code-dot.green {
  background: var(--green);
}

/* 55. Code Title */
.code-title {
  font-size: 12px;
  color: var(--text-quiet);
  margin-left: auto;
}

/* 56. Code Body */
.code-body,
.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-body);
}

/* 57. Code Syntax */
.code-keyword,
.code-block .keyword {
  color: var(--accent);
}

.code-string,
.code-block .string {
  color: #a5d6ff;
}

.code-comment,
.code-block .comment {
  color: var(--text-quiet);
}

/* 58. Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-quiet);
}

/* ============================================================
   DASHBOARD PAGE STYLES
   ============================================================ */

/* 59. Dashboard */
.dashboard {
  padding-top: 80px;
  min-height: 100vh;
}

/* 60. Search Container */
.search-container {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
}

/* 61. Platform Select */
.platform-select {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  min-width: 160px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color 150ms ease;
}

.platform-select:focus {
  border-color: rgba(255, 255, 255, 0.15);
}

/* 62. Options Row */
.options-row,
.search-options {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* 63. Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-quiet);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  transition: border-color 150ms ease, background 150ms ease;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 7px;
  border: solid #050505;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* ============================================================
   RESULTS STYLES
   ============================================================ */

/* 64. Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* 65. Results Title */
.results-title {
  font-size: 16px;
  font-weight: 500;
}

/* 66. Results Count */
.results-count {
  font-size: 12px;
  color: var(--text-quiet);
  font-family: var(--mono);
}

/* 67. Results Grid */
.results-grid {
  display: grid;
  gap: 12px;
}

/* 68. Result Card */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 150ms ease;
}

.result-card:hover {
  border-color: var(--border-strong);
}

/* 69. Result Header */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

/* 70. Result Platform */
.result-platform {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 71. Result Platform Icon */
.result-platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-input);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-platform-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 72. Result Platform Name */
.result-platform-name {
  font-size: 14px;
  font-weight: 500;
}

/* 73. Result Status */
.result-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 500;
  white-space: nowrap;
}

/* 74. Result Status Found */
.result-status.found {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

/* 75. Result Status Not Found */
.result-status.not-found {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

/* 76. Result Status Cached */
.result-status.cached {
  background: rgba(234, 179, 8, 0.1);
  color: var(--yellow);
}

/* 77. Timing Badge */
.timing-badge {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-quiet);
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 78. Result Body */
.result-body {
  padding: 18px;
}

/* 79. Result Field */
.result-field {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.result-field:last-child {
  border-bottom: none;
}

/* 80. Result Field Label */
.result-field-label,
.result-field .label {
  color: var(--text-quiet);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding-top: 2px;
  font-weight: 500;
}

/* 81. Result Field Value */
.result-field-value,
.result-field .value {
  word-break: break-word;
  color: var(--text-body);
}

/* 82. Result Field Value Link */
.result-field-value a,
.result-field .value a {
  color: var(--accent);
  text-decoration: none;
}

.result-field-value a:hover,
.result-field .value a:hover {
  text-decoration: underline;
}

/* 83. Result Field Value Mono */
.result-field-value.mono,
.result-field .value.mono {
  font-family: var(--mono);
  font-size: 12px;
}

/* 84. Result Field Value Highlight */
.result-field-value.highlight,
.result-field .value.highlight {
  color: var(--accent);
}

/* 85. Result Field Value Image */
.result-field-value img,
.result-field .value img {
  max-width: 48px;
  max-height: 48px;
  border-radius: 6px;
}

/* 86. Result Error */
.result-error {
  padding: 18px;
  color: var(--text-body);
  font-style: italic;
  font-size: 13px;
}

/* 87. Results Loading */
.results-loading {
  text-align: center;
  padding: 64px;
  color: var(--text-body);
}

/* 88. Results Empty */
.results-empty {
  text-align: center;
  padding: 80px 24px;
}

/* 89. Empty Icon */
.empty-icon,
.results-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.15;
}

/* 90. Empty Heading */
.empty-heading,
.results-empty h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* 91. Empty Description */
.empty-desc,
.results-empty p {
  font-size: 13px;
  color: var(--text-quiet);
}

/* 92. Loading State */
.loading-state {
  text-align: center;
  padding: 64px;
}

/* 93. Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
}

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

/* 94. Loading Text */
.loading-text {
  font-size: 13px;
  color: var(--text-quiet);
}

/* 95. Status Colors */
.error {
  color: var(--red);
}

.success {
  color: var(--green);
}

.warning {
  color: var(--yellow);
}

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */

@media (max-width: 768px) {
  .hero {
    padding: 120px 24px 80px;
  }

  .hero h1,
  .hero-heading {
    font-size: clamp(28px, 6vw, 40px);
  }

  .hero-stats,
  .stats-row {
    gap: 24px;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
  }

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

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

  .section-title,
  .section-heading {
    font-size: 28px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-btn {
    padding: 14px 24px;
    text-align: center;
  }

  .result-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .result-field-label,
  .result-field .label {
    padding-top: 0;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 120px 16px 60px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats,
  .stats-row {
    gap: 16px;
  }

  .stat-num,
  .stat-number {
    font-size: 22px;
  }

  .search-container {
    padding: 0 8px;
  }

  .code-body,
  .code-block pre {
    font-size: 12px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .module-filters {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}