:root {
  --bg-dark: #0a0c10;
  --panel-bg: rgba(22, 27, 34, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-1: #2ea043;
  --accent-2: #238636;
  --accent-glow: rgba(46, 160, 67, 0.4);
  --critical: #f85149;
  --warning: #d29922;
  --info: #58a6ff;
  --success: #2ea043;
  --font-main: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Effects */
.bg-effects {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}
.glow-orb.primary {
  width: 600px; height: 600px;
  background: var(--accent-1);
  top: -200px; right: -100px;
}
.glow-orb.secondary {
  width: 500px; height: 500px;
  background: var(--info);
  bottom: -150px; left: -150px;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.main-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}
.logo { height: 35px; width: auto; }
.logo-text {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}
nav a:hover { color: var(--text-primary); }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-main); }
.text-gradient {
  background: linear-gradient(90deg, #47e165, #2ea043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass Panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 5rem 0 3rem;
  animation: fadeUp 0.8s ease-out;
}
.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Form */
.search-panel { padding: 2rem; }
.input-wrapper {
  position: relative;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.input-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.2rem;
}
input[type="url"] {
  flex: 1;
  padding: 1.2rem 1.2rem 1.2rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  outline: none;
}
input[type="url"]:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: rgba(0, 0, 0, 0.5);
}
.btn {
  font-family: var(--font-main);
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  padding: 0 2rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 160, 67, 0.6);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); }

/* Custom Checkbox */
.options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}
.custom-checkbox {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  user-select: none;
}
.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0; width: 0;
}
.checkmark {
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  height: 20px; width: 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  transition: all 0.2s;
}
.custom-checkbox:hover input ~ .checkmark { border-color: var(--text-secondary); }
.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--accent-1);
  border-color: var(--accent-1);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after { display: block; }

/* Loader */
.loader-section {
  text-align: center;
  padding: 4rem 2rem;
  margin-top: 2rem;
}
.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  margin: 2rem 0 1rem;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--info), var(--accent-1));
  border-radius: 10px;
  transition: width 0.4s ease-out;
}
.loader-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.loader-percent { font-size: 2.5rem; font-weight: 700; font-family: var(--font-main); }
.loader-text { color: var(--text-secondary); font-size: 1.1rem; }

/* Hex Loader Animation */
.hex-loader {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hex-part {
  width: 15px; height: 15px;
  background: var(--accent-1);
  border-radius: 4px;
  animation: hexBounce 1.4s infinite ease-in-out both;
}
.hex-part:nth-child(1) { animation-delay: -0.32s; }
.hex-part:nth-child(2) { animation-delay: -0.16s; }
@keyframes hexBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
}
.alert-error { background: rgba(248, 81, 73, 0.1); border: 1px solid var(--critical); color: #ff7b72; }

/* Report Structure */
.report-section { margin-top: 2rem; animation: fadeUp 0.6s ease-out; }
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.domain-info h2 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-success { background: rgba(46, 160, 67, 0.15); color: #47e165; border: 1px solid rgba(46, 160, 67, 0.4); }

/* Score Circle */
.score-overview {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 2rem;
}
.circular-chart { 
  display: block; 
  margin: 0; 
  width: 120px; 
  height: 120px; 
  flex-shrink: 0;
}
.circular-chart-svg {
  width: 100%;
  height: 100%;
}
.circle-bg { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 2.5; }
.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}
.good .circle { stroke: var(--success); }
.average .circle { stroke: var(--warning); }
.poor .circle { stroke: var(--critical); }
.percentage {
  fill: #ffffff;
  font-family: var(--font-main);
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}
.score-details h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.score-details p { color: var(--text-secondary); }

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.category-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
}
.cat-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.2);
}
.cat-header h3 { font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; text-transform: capitalize; }
.cat-body { padding: 1.5rem; }

/* Checks List */
.check-item {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
  border-left: 4px solid var(--panel-border);
}
.check-item:last-child { margin-bottom: 0; }
.check-item.status-critical { border-left-color: var(--critical); }
.check-item.status-warning { border-left-color: var(--warning); }
.check-item.status-info { border-left-color: var(--info); }
.check-item.status-success { border-left-color: var(--success); }

.check-icon { font-size: 1.4rem; margin-top: 2px; }
.status-critical .check-icon { color: var(--critical); }
.status-warning .check-icon { color: var(--warning); }
.status-info .check-icon { color: var(--info); }
.status-success .check-icon { color: var(--success); }

.check-content { flex: 1; }
.check-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.3rem; }
.check-desc { color: var(--text-secondary); font-size: 0.95rem; }

/* Category AI Box */
.cat-ai-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(to right, rgba(46, 160, 67, 0.05), transparent);
  border-left: 2px solid var(--accent-1);
  border-radius: 0 8px 8px 0;
}
.cat-ai-box h4 {
  color: var(--accent-1);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.ai-text p { margin-bottom: 0.8rem; }
.ai-text p:last-child { margin-bottom: 0; }
.ai-text ul { margin-left: 1.2rem; margin-bottom: 0.8rem; }
.ai-text li { margin-bottom: 0.3rem; }

/* Comprehensive AI */
.comprehensive-ai {
  margin-bottom: 2rem;
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.8), rgba(10, 12, 16, 0.9));
  border: 1px solid rgba(46, 160, 67, 0.3);
  position: relative;
  overflow: hidden;
}
.comprehensive-ai::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--accent-1), var(--info));
}
.ai-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.ai-header i { font-size: 1.8rem; color: var(--accent-1); }
.ai-header h3 { font-size: 1.4rem; color: #fff; }

/* Footer */
.main-footer {
  text-align: center;
  padding: 3rem 0;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2.5rem; }
  .input-wrapper { flex-direction: column; }
  .score-main { flex-direction: column; text-align: center; }
  .report-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* Print CSS */
@media print {
  body { background: #fff; color: #000; }
  .bg-effects, .main-header, .hero-section, #print-btn, .main-footer { display: none !important; }
  .glass-panel, .category-card { background: none; border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .text-gradient { -webkit-text-fill-color: #000; }
  .cat-header { border-bottom: 1px solid #ccc; }
  .check-item { background: none; border: 1px solid #eee; border-left: 4px solid #ccc; }
  .cat-ai-box { background: #f9f9f9; border-left: 4px solid #000; }
}
