/* ==================================
   Spot the Scam - Professional Wiki Styles
   ================================== */

:root {
  /* Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --dark-border: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--dark-bg);
  overflow: hidden;
}

.animated-background::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--gradient-2);
  z-index: 1000;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dark-border);
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 101;
}

.navbar-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-links a.active {
  color: var(--primary-color);
}

.navbar-links a.active::after {
  width: 100%;
}

.navbar-links li {
  display: flex;
  align-items: center;
}

.github-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px !important;
  border-radius: 50%;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
}

.github-link::after {
  display: none !important;
}

.github-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.github-link svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.github-link:hover svg {
  transform: scale(1.1);
}

/* Hamburger Menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
  transition: all 0.3s ease;
}

.navbar-toggle:hover {
  opacity: 0.8;
}

.navbar-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.navbar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar-overlay.active {
  display: block;
  opacity: 1;
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

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

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.badge-icon {
  font-size: 1.2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: var(--dark-card);
  color: var(--text-primary);
  border: 1px solid var(--dark-border);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
}

/* Main Content */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.section {
  margin: 4rem 0;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 800px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card ul {
  list-style: none;
  margin-top: 1rem;
}

.card ul li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card ul li::before {
  content: '→';
  color: var(--primary-color);
  font-weight: bold;
}

/* Performance Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.metric-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
  border-color: var(--secondary-color);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 0.5rem;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tech Stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.tech-badge {
  padding: 0.75rem 1.5rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tech-badge:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Mermaid Diagrams */
.mermaid-container {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.mermaid {
  display: flex;
  justify-content: center;
}

/* Code Blocks */
pre {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--dark-card);
  border-radius: 1rem;
  overflow: hidden;
}

thead {
  background: rgba(37, 99, 235, 0.1);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dark-border);
}

th {
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
}

tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--dark-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid var(--dark-bg);
  box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.timeline-content h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--text-secondary);
}

/* Screenshots */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.screenshot {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--dark-border);
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.screenshot:hover {
  border-color: var(--primary-color);
}

.screenshot img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.75rem;
  border: 1px solid var(--dark-border);
  box-shadow: var(--shadow-xl);
  background: var(--dark-bg);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

body.lightbox-open {
  overflow: hidden;
}

/* Footer */
footer {
  background: var(--dark-card);
  border-top: 1px solid var(--dark-border);
  padding: 3rem 2rem;
  margin-top: 6rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin: 0.5rem 0;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--dark-border);
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--dark-border);
    transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .navbar-links.active {
    right: 0;
  }

  .navbar-links li {
    width: 100%;
  }

  .navbar-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }

  .navbar-links a:hover,
  .navbar-links a.active {
    background: rgba(37, 99, 235, 0.1);
  }

  .navbar-links a::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 3rem 1rem;
  }

  .container {
    padding: 0 1rem 3rem;
  }

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

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

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

  .navbar-links {
    width: 100%;
    right: -100%;
  }

  .navbar-content {
    padding: 1rem;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--dark-border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 1rem; }
