/* ===== CSS RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== ROOT VARIABLES ===== */
:root {
  /* Gaming Colors */
  --clr-primary: #00ff88;
  --clr-secondary: #00d9ff;
  --clr-accent: #ff0080;
  --clr-warning: #ffaa00;
  
  /* Background */
  --clr-bg-dark: #0a0e27;
  --clr-bg-darker: #050812;
  --clr-bg-card: rgba(15, 23, 42, 0.8);
  --clr-bg-card-hover: rgba(20, 30, 60, 0.9);
  
  /* Text */
  --clr-text: #e8edf7;
  --clr-text-dim: #94a3b8;
  --clr-text-dimmer: #64748b;
  
  /* Fonts */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
  --shadow-glow-secondary: 0 0 20px rgba(0, 217, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== BASE STYLES ===== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg-darker);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 0, 128, 0.05) 0%, transparent 50%);
  animation: backgroundPulse 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--clr-secondary);
}

p {
  font-size: 1.1rem;
  color: var(--clr-text-dim);
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(0, 255, 136, 0.2);
  padding: var(--space-sm) 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo i {
  font-size: 1.75rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-primary);
  transition: width 0.3s ease;
}

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

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--clr-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  color: var(--clr-secondary);
  transform: scale(1.1);
}

/* Language Selector Styling */
#language-selector {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid #00ff88;
  color: #00ff88;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#language-selector:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--clr-secondary);
}

#language-selector option {
  background: #0a0e27;
  color: #e8edf7;
  padding: 10px;
  font-size: 1rem;
}

#language-selector option:hover {
  background: rgba(0, 255, 136, 0.2);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  animation: fadeInUp 1s ease;
}

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

.hero-content p {
  font-size: 1.5rem;
  margin: var(--space-lg) 0 var(--space-xl);
  color: var(--clr-text-dim);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  color: var(--clr-bg-darker);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
  background: rgba(0, 217, 255, 0.1);
  color: var(--clr-secondary);
  border: 2px solid var(--clr-secondary);
}

.btn-secondary:hover {
  background: rgba(0, 217, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-secondary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  position: relative;
  z-index: 2;
}

/* ===== SECTION ===== */
section {
  padding: var(--space-2xl) 0;
  position: relative;
}

/* ===== SYSTEM INFO SECTION ===== */
.system-info-section {
  background: linear-gradient(180deg, var(--clr-bg-darker) 0%, var(--clr-bg-dark) 100%);
}

.detection-controls {
  text-align: center;
  margin-bottom: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.detection-status {
  background: var(--clr-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-card);
}

.progress-bar-container {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: var(--space-md) 0;
}

#detection-progress {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#detection-status-text {
  font-size: 1.2rem;
  color: var(--clr-primary);
  font-weight: 600;
  margin-top: var(--space-sm);
  text-align: center;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.info-card {
  background: var(--clr-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: var(--clr-primary);
  box-shadow: 0 12px 40px rgba(0, 255, 136, 0.3);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
  color: var(--clr-primary);
}

.info-card h3 i {
  font-size: 1.75rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  font-weight: 600;
  color: var(--clr-text-dim);
  font-size: 1.1rem;
}

.info-item .value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--clr-primary);
  font-size: 1.1rem;
  text-align: right;
}

/* ===== RESULTS SECTION ===== */
#results-section {
  background: var(--clr-bg-dark);
  min-height: 50vh;
}

.score-display-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: var(--space-xl) 0;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.score-circle {
  position: relative;
  width: 280px;
  height: 280px;
}

.score-circle svg {
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 12;
}

.score-circle-progress {
  fill: none;
  stroke: url(#scoreGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 2s ease;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  animation: countUp 2s ease;
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.score-label {
  font-size: 1.2rem;
  color: var(--clr-text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: var(--space-xs);
}

.component-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.component-card {
  background: var(--clr-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  text-align: center;
}

.component-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.3);
}

.component-card h4 {
  font-size: 1.3rem;
  color: var(--clr-secondary);
  margin-bottom: var(--space-md);
}

.component-score {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--clr-primary);
  display: block;
  margin: var(--space-sm) 0;
}

/* ===== SEO SECTION ===== */
.seo-section {
  background: var(--clr-bg-dark);
  padding: var(--space-2xl) 0;
}

.seo-section h2 {
  color: var(--clr-primary);
}

.seo-section h3 {
  color: var(--clr-secondary);
  margin: var(--space-lg) 0 var(--space-md);
}

.seo-section p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.seo-section ul {
  list-style: none;
  padding-left: 0;
}

.seo-section li {
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-left: 3px solid var(--clr-primary);
  padding-left: var(--space-md);
  background: rgba(0, 255, 136, 0.05);
  border-radius: var(--radius-sm);
}

/* ===== FAQ SECTION ===== */
.faq-section {
  background: var(--clr-bg-darker);
}

.faq-item {
  background: var(--clr-bg-card);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--clr-primary);
  box-shadow: 0 8px 30px rgba(0, 255, 136, 0.2);
}

.faq-item h3 {
  color: var(--clr-primary);
  margin-bottom: var(--space-sm);
  font-size: 1.3rem;
}

.faq-item p {
  color: var(--clr-text-dim);
  line-height: 1.8;
}

/* ===== FOOTER ===== */
footer {
  background: var(--clr-bg-darker);
  border-top: 1px solid rgba(0, 255, 136, 0.2);
  padding: var(--space-lg) 0;
  text-align: center;
}

footer p {
  color: var(--clr-text-dimmer);
  font-size: 1rem;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 18, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(0, 255, 136, 0.2);
  border-top: 4px solid var(--clr-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: var(--space-lg);
  font-size: 1.3rem;
  color: var(--clr-primary);
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    order: 3;
  }
  
  #language-selector {
    order: 2;
    margin-right: 0;
    font-size: 0.9rem;
    padding: 6px 10px;
  }
  
  .logo {
    order: 1;
    font-size: 1.2rem;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-top: 2px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    order: 4;
    width: 100%;
    z-index: 999;
  }
  
  .nav-links.active {
    display: flex !important;
  }
  
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  
  .nav-links a {
    display: block;
    padding: 12px;
    font-size: 1.2rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

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

  .score-circle {
    width: 220px;
    height: 220px;
  }

  .score-value {
    font-size: 2.5rem;
  }

  .detection-controls {
    flex-direction: column;
  }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* ===== SOCIAL ICONS ===== */
.social-icons-box {
  background: var(--clr-bg-card);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--clr-bg-card), var(--clr-bg-card-hover));
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  color: var(--clr-text);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
  transition: left 0.5s ease;
}

.social-icon:hover::before {
  left: 100%;
}

.social-icon:hover {
  transform: translateY(-3px);
  border-color: var(--clr-primary);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
  color: var(--clr-primary);
}

.social-icon:active {
  transform: translateY(-1px);
}

/* Social Icon Colors */
.social-icon:nth-child(1):hover { /* Twitter */
  color: #1da1f2;
  border-color: #1da1f2;
  box-shadow: 0 8px 25px rgba(29, 161, 242, 0.3);
}

.social-icon:nth-child(2):hover { /* Facebook */
  color: #1877f2;
  border-color: #1877f2;
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

.social-icon:nth-child(3):hover { /* LinkedIn */
  color: #0077b5;
  border-color: #0077b5;
  box-shadow: 0 8px 25px rgba(0, 119, 181, 0.3);
}

.social-icon:nth-child(4):hover { /* GitHub */
  color: #333;
  border-color: #333;
  box-shadow: 0 8px 25px rgba(51, 51, 51, 0.3);
}

.social-icon:nth-child(5):hover { /* YouTube */
  color: #ff0000;
  border-color: #ff0000;
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.social-icon:nth-child(6):hover { /* Reddit */
  color: #ff4500;
  border-color: #ff4500;
  box-shadow: 0 8px 25px rgba(255, 69, 0, 0.3);
}

/* Responsive Social Icons */
@media (max-width: 768px) {
  .social-icons-box {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .social-icons {
    gap: 1rem;
  }
  
  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .social-icons {
    gap: 0.8rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
