/* ==========================================================================
   CONTENTDEFEND DESIGN SYSTEM (AetherKernel-Grade)
   Enterprise Dark Glassmorphism, Responsive Grid System & Micro-Animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #040810;
  --bg-card: rgba(13, 22, 38, 0.75);
  --bg-card-hover: rgba(18, 30, 52, 0.85);
  --bg-input: rgba(6, 12, 24, 0.9);
  
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.25);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-pink: #ff007f;
  
  --accent-success: #10b981;
  --accent-success-glow: rgba(16, 185, 129, 0.2);
  --accent-danger: #ef4444;
  --accent-danger-glow: rgba(239, 68, 68, 0.2);
  --accent-warning: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(0, 240, 255, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 30px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
              radial-gradient(circle at 100% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
              var(--bg-dark);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grid overlay background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 80%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
  color: var(--text-muted);
}

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

a:hover {
  text-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-logo svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px var(--accent-cyan));
  flex-shrink: 0;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass-bright);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0099ff 100%);
  color: #040810;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
  background: linear-gradient(135deg, #33f3ff 0%, #1ab0ff 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-bright);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 15px var(--accent-danger-glow);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Glass Panels & Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Hero Section & Pill Formatting */
.hero-section {
  padding: 64px 0 40px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
  line-height: 1.4;
}

.hero-badge .badge-text {
  display: inline-block;
  white-space: normal;
  word-break: break-word;
}

@media (min-width: 600px) {
  .hero-badge .badge-text {
    white-space: nowrap;
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 780px;
  margin: 20px auto 36px;
}

/* Telemetry Ticker Strip */
.telemetry-ticker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.stat-box {
  background: rgba(6, 14, 28, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Privacy Banner */
.privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.privacy-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* App Main Navigation Tabs & Pill Styling */
.app-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
  overflow-x: auto;
  white-space: nowrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass-bright);
}

.tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Asset Fingerprinting Dropzone */
.upload-area {
  border: 2px dashed var(--border-glass-bright);
  background: rgba(0, 240, 255, 0.02);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.upload-icon {
  width: 54px;
  height: 54px;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-field:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

textarea.input-field {
  resize: vertical;
  min-height: 100px;
}

select.input-field {
  appearance: auto;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Code Output Box */
.code-box {
  background: #02050a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow-y: auto;
}

/* Radar Scan Visual */
.radar-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 20px auto;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.3);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
  overflow: hidden;
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 300deg, rgba(0, 240, 255, 0.5) 360deg);
  animation: radarSpin 2s linear infinite;
  transform-origin: center center;
  border-radius: 50%;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border-glass);
  padding: 20px 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
}

.faq-answer {
  display: none;
  padding-top: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: rgba(13, 22, 38, 0.95);
  border: 1px solid var(--accent-cyan);
  color: var(--text-main);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-cyan-glow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 48px 0 32px;
  margin-top: 80px;
  background: rgba(2, 5, 10, 0.8);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-col {
  flex: 1 1 200px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-success);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
  flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Desktop, Tablet & Mobile)
   ========================================================================== */

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(4, 8, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    flex-direction: column;
    padding: 20px;
    gap: 12px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 40px 0 24px;
  }

  .telemetry-ticker {
    grid-template-columns: repeat(2, 1fr);
  }

  .upload-area {
    padding: 32px 16px;
  }

  .code-box {
    font-size: 0.78rem;
  }

  .glass-panel {
    padding: 20px;
  }

  .data-table th, .data-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .telemetry-ticker {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .brand-tag {
    display: none;
  }
}
