* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc;
  color: #64748b;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 2rem 0;
  text-align: center;
}

.header h1 {
  color: #1e293b;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header h1 i {
  color: #3b82f6;
  margin-right: 1rem;
}

.header p {
  color: #64748b;
  font-size: 1.1rem;
}

/* Form Section */
.form-section {
  padding: 3rem 0;
  background: white;
}

.form-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.form-card h2 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.input-group {
  margin-bottom: 2rem;
}

.input-group label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: all 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Scan Types */
.scan-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.scan-type {
  cursor: pointer;
}

.scan-type input[type="radio"] {
  display: none;
}

.scan-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.scan-card h3 {
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.scan-card p {
  color: #6b7280;
  font-size: 0.875rem;
}

.scan-type:hover .scan-card {
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.scan-type input:checked + .scan-card {
  border-color: #3b82f6;
  background: #eff6ff;
}

.custom-input {
  width: 60px;
  padding: 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Analyze Button */
.analyze-button {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.analyze-button:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.analyze-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-text,
.button-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Welcome Section */
.welcome-section {
  padding: 4rem 0;
  text-align: center;
}

.welcome-content {
  max-width: 600px;
  margin: 0 auto;
}

.welcome-icon {
  font-size: 4rem;
  color: #3b82f6;
  margin-bottom: 2rem;
}

.welcome-content h2 {
  color: #1e293b;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.welcome-content p {
  color: #64748b;
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.feature i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.feature h4 {
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Progress Section */
.progress-section {
  padding: 4rem 0;
  text-align: center;
}

.progress-content {
  max-width: 500px;
  margin: 0 auto;
}

.progress-icon {
  font-size: 3rem;
  color: #3b82f6;
  margin-bottom: 2rem;
}

.progress-content h2 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-content p {
  color: #64748b;
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-percent {
  color: #374151;
  font-weight: 600;
}

.progress-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.step.active {
  opacity: 1;
  color: #3b82f6;
}

.step i {
  font-size: 1.5rem;
}

.step span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Results Section */
.results-section {
  padding: 3rem 0;
}

.results-section > .container > * {
  margin-bottom: 3rem;
}

/* Overview Card */
.overview-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem;
}

.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-info h2 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.site-info a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.site-info a:hover {
  text-decoration: underline;
}

.overall-score {
  text-align: center;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.overall-score span {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
}

.stat i {
  font-size: 1.5rem;
  color: #3b82f6;
}

.stat-number {
  display: block;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Breakdown Card */
.breakdown-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem;
}

.breakdown-card h3 {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.breakdown-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.breakdown-item h4 {
  color: #374151;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: capitalize;
}

.breakdown-score {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.breakdown-percentage {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.breakdown-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.breakdown-fill {
  height: 100%;
  background: #10b981;
  border-radius: 3px;
  transition: width 1s ease;
}

.breakdown-max {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Issues Section */
.issues-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.issues-card,
.recommendations-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
}

.issues-card h3,
.recommendations-card h3 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.issues-card h3 i {
  color: #ef4444;
}

.recommendations-card h3 i {
  color: #10b981;
}

.issues-list,
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issue-item,
.recommendation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.issue-count {
  background: #fee2e2;
  color: #dc2626;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.recommendation-count {
  background: #dcfce7;
  color: #16a34a;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Pages Card */
.pages-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem;
}

.pages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pages-header h3 {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.sort-select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
}

.pages-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-info h4 {
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-url {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.875rem;
  word-break: break-all;
}

.page-url:hover {
  text-decoration: underline;
}

.page-score {
  background: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  min-width: 60px;
}

.page-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
}

.metric-value {
  display: block;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 700;
}

.metric-label {
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-issues {
  margin-bottom: 1.5rem;
}

.page-issues h5 {
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.issue-tag {
  background: #fee2e2;
  color: #dc2626;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.recommendation-tag {
  background: #dcfce7;
  color: #16a34a;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tech-checks {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
}

.tech-checks h5 {
  color: #374151;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.tech-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  font-size: 0.875rem;
}

.tech-status {
  font-weight: 600;
}

.tech-status.pass {
  color: #16a34a;
}

.tech-status.fail {
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .form-card {
    padding: 2rem;
  }

  .scan-types {
    grid-template-columns: 1fr 1fr;
  }

  .overview-header {
    flex-direction: column;
    text-align: center;
  }

  .issues-section {
    grid-template-columns: 1fr;
  }

  .page-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .scan-types {
    grid-template-columns: 1fr;
  }

  .page-metrics {
    grid-template-columns: 1fr;
  }

  .overview-stats {
    grid-template-columns: 1fr;
  }
}

/* --- Site Menu Styles --- */
.site-menu {
  display: flex;
  gap: 1rem;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  padding: 1.2rem 2rem;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.12);
  margin-bottom: 2rem;
  align-items: center;
  justify-content: flex-start;
}
.site-menu-btn {
  background: white;
  color: #764ba2;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
  margin-right: 0.5rem;
  outline: none;
}
.site-menu-btn:hover, .site-menu-btn.active {
  background: linear-gradient(90deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.18);
}

/* --- Site Pages List --- */
.site-pages-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0 2rem 2rem 2rem;
}
.site-page-item {
  background: rgba(255,255,255,0.98);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.10);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border: 1px solid #e2e8f0;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.site-page-item:hover {
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.18);
  transform: translateY(-2px) scale(1.01);
}
.site-page-title a {
  font-size: 1.15rem;
  font-weight: 700;
  color: #764ba2;
  text-decoration: none;
  transition: color 0.2s;
}
.site-page-title a:hover {
  color: #48bb78;
  text-decoration: underline;
}
.site-page-url {
  color: #718096;
  font-size: 0.98rem;
  word-break: break-all;
}
.site-page-score {
  font-size: 1.1rem;
  font-weight: 600;
  color: #10b981;
  background: #e6fffa;
  border-radius: 8px;
  display: inline-block;
  padding: 0.3rem 1rem;
  margin-top: 0.2rem;
}
.site-page-score b {
  font-size: 1.2rem;
}
.quickscan-btn {
  background: linear-gradient(90deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
}
.quickscan-btn:hover {
  background: linear-gradient(90deg, #48bb78, #38a169);
  transform: scale(1.05);
}
.quickscan-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

/* Responsive for menu and page list */
@media (max-width: 900px) {
  .site-menu {
    flex-wrap: wrap;
    padding: 1rem 0.5rem;
  }
  .site-pages-container {
    margin: 0 0.5rem 1rem 0.5rem;
  }
}
@media (max-width: 600px) {
  .site-menu {
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 0 0 12px 12px;
  }
  .site-pages-container {
    gap: 1rem;
    margin: 0 0.2rem 1rem 0.2rem;
  }
  .site-page-item {
    padding: 1rem 0.7rem;
  }
}

/* --- JSON Pretty Print Styles --- */
.json-pretty {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.7rem;
  font-size: 0.98rem;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  overflow-x: auto;
  color: #2d3748;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}
.json-key { color: #764ba2; font-weight: bold; }
.json-string { color: #10b981; }
.json-number { color: #f59e0b; }
.json-boolean { color: #3182ce; font-weight: bold; }
.json-null { color: #ef4444; font-weight: bold; }

/* --- SEO Summary Dropdown Styles --- */
.seo-summary {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin-top: 0.7rem;
  font-size: 1.01rem;
  color: #2d3748;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.seo-summary-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.3rem;
  margin-bottom: 0.3rem;
}
.seo-summary-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.seo-summary-row b {
  min-width: 120px;
  color: #764ba2;
  font-weight: 600;
}
.seo-badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 12px;
  font-size: 0.95em;
  font-weight: 600;
  margin-right: 0.3em;
  margin-bottom: 0.2em;
}
.seo-badge.issue {
  background: linear-gradient(90deg, #fed7d7, #feb2b2);
  color: #c53030;
}
.seo-badge.rec {
  background: linear-gradient(90deg, #c6f6d5, #9ae6b4);
  color: #2f855a;
}
.seo-breakdown-table {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em 1.2em;
  margin-top: 0.3em;
}
.seo-breakdown-table div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 0.3em 0.8em;
  font-size: 0.98em;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.seo-breakdown-table span {
  color: #718096;
  font-size: 0.93em;
}
.seo-breakdown-table b {
  color: #10b981;
  font-size: 1.1em;
  font-weight: 700;
}
