* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.6;
}
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
nav a {
  color: white;
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: opacity 0.3s;
}
nav a:hover { opacity: 0.8; }
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; opacity: 0.95; max-width: 700px; margin: 0 auto; }
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.section-subtitle {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.threat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.threat-item {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid;
}
.threat-critical { border-left-color: #dc2626; }
.threat-high { border-left-color: #f59e0b; }
.threat-medium { border-left-color: #3b82f6; }
.threat-low { border-left-color: #6b7280; }
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.badge-critical { background: #dc2626; color: white; }
.badge-high { background: #f59e0b; color: white; }
.badge-medium { background: #3b82f6; color: white; }
.badge-low { background: #6b7280; color: white; }
.threat-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.threat-desc { font-size: 0.8rem; color: #6b7280; }
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
textarea.form-control {
  font-family: 'Courier New', monospace;
  resize: vertical;
}
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.btn-success {
  background: #10b981;
  color: white;
}
.btn-success:hover {
  background: #059669;
}
.code-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}
.code-comparison > div {
  min-width: 0;
  width: 100%;
  flex: 1;
}
.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: auto;
  height: 500px;
  max-height: 500px;
  width: 100%;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre;
  tab-size: 4;
  scroll-behavior: smooth;
  box-sizing: border-box;
}
.vuln-highlight {
  background-color: rgba(239, 68, 68, 0.3);
  border-left: 4px solid #ef4444;
  padding-left: 0.5rem;
  display: inline-block;
  width: 100%;
  animation: pulse-red 1s ease-in-out;
}
@keyframes pulse-red {
  0%, 100% { background-color: rgba(239, 68, 68, 0.3); }
  50% { background-color: rgba(239, 68, 68, 0.5); }
}
.fix-highlight {
  background-color: rgba(34, 197, 94, 0.2);
  border-left: 3px solid #22c55e;
  padding-left: 0.5rem;
  display: inline-block;
  width: 100%;
}
.code-header {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a1a1a;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: white;
}
.stat-card h3 { font-size: 2rem; margin-bottom: 0.25rem; }
.stat-card p { font-size: 0.9rem; opacity: 0.9; }
.stat-critical { background: linear-gradient(135deg, #dc2626, #991b1b); }
.stat-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-medium { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-low { background: linear-gradient(135deg, #6b7280, #4b5563); }
.divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin: 2rem 0;
}
footer {
  background: #1a1a1a;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}
.vuln-item {
  background: white;
  border-left: 4px solid;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.payment-box {
  background: #f9fafb;
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-box {
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: white;
}
.stat-box h3 { font-size: 2rem; margin-bottom: 0.25rem; }
.stat-box small { font-size: 0.9rem; opacity: 0.9; }

.test-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.test-stat {
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: white;
}
.test-stat h4 { font-size: 2rem; margin-bottom: 0.25rem; }
.test-stat small { font-size: 0.9rem; opacity: 0.9; }
.test-passed { background: linear-gradient(135deg, #10b981, #059669); }
.test-failed { background: linear-gradient(135deg, #ef4444, #dc2626); }
.test-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }

#fixedCodeDisplay {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
#fixedCodeDisplay::selection {
  background: transparent;
}
#fixedCodeDisplay::-moz-selection {
  background: transparent;
}
