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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  text-align: center;
  padding: 40px 0;
  color: white;
}

.header-content h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Main Content */
.main {
  padding-bottom: 40px;
}

.analyzer-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

/* Input Section */
.input-container {
  margin-bottom: 30px;
}

.input-group {
  display: flex;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.url-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.url-input:focus {
  border-color: #667eea;
}

.analyze-btn {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.analyze-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Error Message */
.error-message {
  background: #fee;
  color: #c33;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

/* Results Container */
.results-container {
  margin-top: 30px;
}

/* Score Card - Keep custom styling */
.score-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  max-width: 100%;
  overflow: hidden;
}

.score-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  word-wrap: break-word;
}

.score-domain {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

.score-status {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  opacity: 0.95;
}

.score-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.score-description p {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
  margin: 0;
}

/* Override Bootstrap card styles for our custom cards */
.summary-card.card {
  border-left: 5px solid #667eea;
  border-radius: 15px;
}

.meta-tags-card.card {
  border-left: 5px solid #28a745;
  border-radius: 15px;
}

.keywords-card.card {
  border-left: 5px solid #ffc107;
  border-radius: 15px;
}

.technical-details.card {
  border-left: 5px solid #ffc107;
  border-radius: 15px;
}

.recommendations-card.card {
  border-left: 5px solid #dc3545;
  border-radius: 15px;
}

.link-analysis-card.card {
  border-left: 5px solid #17a2b8;
  border-radius: 15px;
}

.image-analysis-card.card {
  border-left: 5px solid #fd7e14;
  border-radius: 15px;
}

.summary-card.card .card-title {
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-tags-card.card .card-title {
  color: #28a745;
  display: flex;
  align-items: center;
  gap: 10px;
}

.keywords-card.card .card-title {
  color: #ffc107;
  display: flex;
  align-items: center;
  gap: 10px;
}

.technical-details.card .card-title {
  color: #ffc107;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommendations-card.card .card-title {
  color: #dc3545;
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-analysis-card.card .card-title {
  color: #17a2b8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.image-analysis-card.card .card-title {
  color: #fd7e14;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Detail items styling */
.detail-item.card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
}

.detail-item .card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label {
  font-weight: 600;
  color: #333;
}

.value {
  color: #666;
  font-weight: 500;
}

/* Meta tags list */
.meta-tags-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.meta-tag-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
  border-left: 4px solid #28a745;
}

.meta-tag-name {
  font-weight: 600;
  color: #28a745;
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.meta-tag-content {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

/* Recommendations list */
.recommendations-list {
  display: grid;
  gap: 15px;
}

.recommendation-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #dc3545;
}

.recommendation-item.warning {
  border-left-color: #ffc107;
}

.recommendation-item.info {
  border-left-color: #17a2b8;
}

.recommendation-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 5px;
}

.recommendation-type.critical {
  color: #dc3545;
}

.recommendation-type.warning {
  color: #ffc107;
}

.recommendation-type.info {
  color: #17a2b8;
}

.recommendation-message {
  color: #666;
  line-height: 1.5;
}

.circular-progress {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.progress-ring {
  transform: rotate(-90deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  width: 100%;
  height: 100%;
  max-width: 160px;
  max-height: 160px;
}

.progress-ring-background {
  stroke: rgba(255, 255, 255, 0.2);
}

.progress-ring-progress {
  stroke: #ffffff;
  stroke-width: 10;
  transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-number-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-number {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.score-divider {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  top: 10px;
  bottom: 10px;
  margin: 0 auto;
}

.score-denominator {
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 15px;
}

/* Circular Progress Styles */

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.8);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Expandable Section Cards */
.score-section-header {
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 10px;
  border-radius: 8px;
}

.score-section-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.section-title-area {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-status {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.8;
}

.section-score {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mini Circular Progress */
.mini-circular-progress {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.mini-progress-ring {
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mini-progress-ring-background {
  stroke: #e0e0e0;
}

.mini-progress-ring-progress {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-score-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mini-score-number {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: #333;
}

.mini-score-denominator {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.7;
  color: #666;
}
.mini-score-divider {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.5);
  margin: 4px auto;
}
.expand-indicator {
  text-align: center;
  margin-top: 15px;
  color: #666;
  font-size: 0.85rem;
}

.expand-indicator i {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.expand-indicator.expanded i {
  transform: rotate(180deg);
}

.section-details {
  margin-top: 10px;
}

.section-divider {
  margin: 20px 0;
  border-color: rgba(0, 0, 0, 0.1);
}

.hidden-details {
  display: none;
}

/* Custom Accordion Styles */
.accordion-item {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 12px !important;
  margin-bottom: 0;
  overflow: hidden;
}
/* 
.accordion-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1.5rem;
  border-radius: 12px !important;
  font-weight: 500;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  border: none;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  filter: brightness(0) invert(1);
} */

.accordion-body {
  background: white;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.accordion-button .section-title-area h3 {
  color: white;
  margin: 0;
}

.accordion-button .section-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* Ensure the accordion content doesn't interfere with score circle */
.accordion-button:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
}

/* Keywords Analysis Styles */
.keywords-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.keyword-item {
  background: #fff3cd;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ffeaa7;
  border-left: 4px solid #ffc107;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.keyword-word {
  font-weight: 600;
  color: #856404;
  font-size: 0.95rem;
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.keyword-count {
  background: #ffc107;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.density-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.density-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
  border-left: 4px solid #6c757d;
}

.density-word {
  font-weight: 600;
  color: #495057;
  margin-bottom: 4px;
}

.density-bar {
  background: #e9ecef;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.density-fill {
  background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.density-percentage {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 2px;
}

.issues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keyword-issue {
  background: #f8d7da;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  border-left: 4px solid #dc3545;
  color: #721c24;
  font-size: 0.9rem;
}

/* Keyword effectiveness and meta keyword styles */
.meta-keyword-badge {
  background: #0066cc;
  color: white;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  font-weight: bold;
}

.keyword-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.keyword-effectiveness {
  font-size: 0.8em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 8px;
}

.keyword-effectiveness.excellent {
  background: #d4edda;
  color: #155724;
}

.keyword-effectiveness.good {
  background: #d1ecf1;
  color: #0c5460;
}

.keyword-effectiveness.fair {
  background: #fff3cd;
  color: #856404;
}

.keyword-effectiveness.poor {
  background: #f8d7da;
  color: #721c24;
}

.keyword-indicators {
  display: flex;
  gap: 4px;
}

.indicator-badge {
  font-size: 0.7em;
  padding: 2px 4px;
  border-radius: 6px;
  font-weight: bold;
}

.indicator-badge.title {
  background: #e7f3ff;
  color: #0066cc;
}

.indicator-badge.heading {
  background: #f0f8f0;
  color: #28a745;
}

/* Meta Tags Analysis Styles */
.meta-tag-detail {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  flex-direction: column;
  gap: 4px;
}

.meta-tag-detail:last-child {
  border-bottom: none;
}

.meta-tag-detail.missing {
  background-color: #fff5f5;
  border-left: 3px solid #e53e3e;
  padding-left: 12px;
  margin-left: -12px;
  border-radius: 4px;
}

.meta-tag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tag-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95em;
}

.tag-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-name {
  font-weight: 600;
  color: #2d3748;
}

.tag-status.present {
  color: #38a169;
  font-weight: bold;
}

.tag-status.missing {
  color: #e53e3e;
  font-weight: bold;
}

.tag-info {
  font-size: 0.85em;
  color: #718096;
  margin-left: 8px;
}

/* Keywords display in meta tags section */
.keywords-display {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.keywords-label {
  font-size: 0.9em;
  color: #4a5568;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8em;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.keyword-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.meta-issues-header,
.meta-recommendations-header {
  font-weight: bold;
  margin-top: 16px;
  margin-bottom: 8px;
  color: #2d3748;
}

.meta-issues-header {
  color: #e53e3e;
}

.meta-recommendations-header {
  color: #3182ce;
}

.meta-issue {
  background: #fed7d7;
  color: #c53030;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 4px 0;
  font-size: 0.9em;
}

.meta-recommendation {
  background: #bee3f8;
  color: #2c5282;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 4px 0;
  font-size: 0.9em;
}

/* Link Analysis Styles */
.broken-link-item {
  background: #f8d7da;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 4px 0;
  border-left: 3px solid #dc3545;
  font-size: 0.9em;
  color: #721c24;
}

.broken-link-url {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

.link-recommendation {
  background: #d1ecf1;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 4px 0;
  border-left: 3px solid #17a2b8;
  font-size: 0.9em;
  color: #0c5460;
}

.link-recommendation.warning {
  background: #fff3cd;
  border-left-color: #ffc107;
  color: #856404;
}

.link-recommendation.error {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.recommendation-message {
  margin-bottom: 4px;
  font-weight: 500;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.recommendation-details {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.recommendation-details .text-muted {
  opacity: 0.8;
}

/* Broken Links List Styles */
.broken-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.broken-links-list:empty::after {
  content: "✓ No broken links found!";
  color: #28a745;
  font-style: italic;
  padding: 8px;
  background: #d4edda;
  border-radius: 6px;
  border-left: 3px solid #28a745;
}

/* Site-wide metrics display */
.site-wide-metrics {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
}

.metrics-header h6 {
  color: #495057;
  margin-bottom: 12px;
  font-weight: 600;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #17a2b8;
}

.metric-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.metric-value {
  font-weight: 600;
  color: #17a2b8;
}

/* Enhanced broken link items */
.broken-link {
  padding: 8px 0;
}

.broken-link-url {
  color: #dc3545;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
}
