*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  color: #333;
}

.navbar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  color: #4ecdc4;
}

.nav-link {
  font-weight: 500;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.3s ease;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  margin: 0 2px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(78, 205, 196, 0.2);
}

.hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  padding: 50px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234ecdc4' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-section h1 i {
  color: #4ecdc4;
}

.hero-subtitle {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  position: relative;
}

.hero-desc {
  font-size: 0.875rem;
  opacity: 0.7;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: #1a1a2e;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #4ecdc4, #44a08d);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.features-section {
  padding: 60px 0;
  background: #fff;
}

/* Zigzag layout */
.zigzag-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 50px;
  position: relative;
}

.zigzag-row:last-child {
  margin-bottom: 0;
}

.zigzag-card {
  flex: 0 0 340px;
  max-width: 340px;
}

.zigzag-text {
  flex: 1;
  position: relative;
  padding-left: 20px;
}

.zigzag-number {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(78, 205, 196, 0.12);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.zigzag-number.highlight {
  color: rgba(78, 205, 196, 0.25);
}

.zigzag-text h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.zigzag-text p {
  color: #666;
  line-height: 1.8;
  font-size: 0.95rem;
  margin: 0;
}

/* Reversed row: text on left, card on right */
.zigzag-reverse {
  flex-direction: row-reverse;
}

.zigzag-reverse .zigzag-text {
  padding-left: 0;
  padding-right: 20px;
  text-align: right;
}

/* Connecting line between rows */
.zigzag-row::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 170px;
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(78, 205, 196, 0.3), transparent);
}

.zigzag-row:last-child::after {
  display: none;
}

.zigzag-reverse::after {
  left: auto;
  right: 170px;
}

/* Feature card inside zigzag */
.feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #eef2f7;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.feature-card.highlight-card {
  border: 2px solid #4ecdc4;
  background: linear-gradient(135deg, #f0fffd 0%, #fff 100%);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.feature-icon i {
  font-size: 1.5rem;
  color: #4ecdc4;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
  font-weight: 600;
}

.feature-card .btn {
  padding: 0.5rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
}

/* Responsive zigzag */
@media (max-width: 768px) {
  .zigzag-row,
  .zigzag-reverse {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
  }

  .zigzag-card {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .zigzag-text,
  .zigzag-reverse .zigzag-text {
    text-align: center;
    padding: 0;
  }

  .zigzag-number {
    font-size: 3rem;
  }

  .zigzag-row::after,
  .zigzag-reverse::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.btn-primary {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #44a08d 0%, #3d9180 100%);
  transform: translateY(-2px);
}

.how-to-use {
  padding: 50px 0;
  background: #f5f7fa;
}

.steps-container {
  max-width: 700px;
  margin: 0 auto;
}

.step-card {
  background: #fff;
  border-left: 4px solid #4ecdc4;
  padding: 20px 25px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #4ecdc4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.step-content strong {
  display: block;
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.step-content p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.search-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  padding: 40px 0;
}

.search-container h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.search-container .lead {
  font-size: 0.9rem;
  opacity: 0.8;
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
}

.search-input {
  border-radius: 8px;
  padding: 12px 20px;
  border: 2px solid transparent;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #4ecdc4;
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.2);
}

.search-btn {
  border-radius: 8px;
  padding: 12px 25px;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: none;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: linear-gradient(135deg, #44a08d 0%, #3d9180 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
  color: white;
}

.loading {
  display: none;
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eef2f7;
  border-top: 4px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

.results {
  display: none;
  padding: 40px 0;
  background: #f5f7fa;
}

.results-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
}

.section-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  overflow: hidden;
  border: 1px solid #eef2f7;
}

.section-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  padding: 15px 20px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header i {
  color: #4ecdc4;
}

.section-content {
  padding: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

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

.info-label {
  font-weight: 600;
  color: #1a1a2e;
  min-width: 140px;
  margin-right: 15px;
  font-size: 0.875rem;
}

.info-value {
  flex: 1;
  color: #555;
  word-break: break-all;
  font-size: 0.875rem;
}

.keyword-item {
  background: #f5f7fa;
  border-radius: 20px;
  padding: 6px 12px;
  margin: 3px;
  display: inline-block;
  font-size: 0.8rem;
  border: 1px solid #eef2f7;
}

.keyword-freq {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  color: white;
  border-radius: 10px;
  padding: 2px 8px;
  margin-left: 6px;
  font-size: 0.7rem;
}

.url-list {
  max-height: 350px;
  overflow-y: auto;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 12px;
}

.url-item {
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.8rem;
  color: #555;
}

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

.success-badge {
  background: #d4edda;
  color: #155724;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.email-result-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

.email-result-card.exists {
  border: 2px solid #28a745;
}

.email-result-card.not-exists {
  border: 2px solid #dc3545;
}

.email-result-card.risky {
  border: 2px solid #ffc107;
}

.verdict-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.verdict-icon.exists {
  background: #d4edda;
  color: #28a745;
}

.verdict-icon.not-exists {
  background: #f8d7da;
  color: #dc3545;
}

.verdict-icon.risky {
  background: #fff3cd;
  color: #856404;
}

.verdict-icon i {
  font-size: 2rem;
}

.verdict-text {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.verdict-text.exists {
  color: #28a745;
}

.verdict-text.not-exists {
  color: #dc3545;
}

.verdict-text.risky {
  color: #856404;
}

.confidence-bar {
  width: 100%;
  max-width: 300px;
  height: 12px;
  background: #eef2f7;
  border-radius: 6px;
  margin: 1rem auto;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.confidence-fill.high {
  background: linear-gradient(90deg, #28a745, #20c997);
}

.confidence-fill.medium {
  background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.confidence-fill.low {
  background: linear-gradient(90deg, #dc3545, #e83e8c);
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: #f5f7fa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.check-item-label {
  font-size: 0.875rem;
  color: #555;
}

.check-item-value {
  font-weight: 600;
  font-size: 0.875rem;
}

.check-item-value.pass {
  color: #28a745;
}

.check-item-value.fail {
  color: #dc3545;
}

.check-item-value.warn {
  color: #ffc107;
}

.seo-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.seo-card {
  background: #f5f7fa;
  border-radius: 10px;
  padding: 20px 15px;
  text-align: center;
  border: 1px solid #eef2f7;
}

.seo-card h4 {
  font-size: 0.7rem;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.seo-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 8px 0;
}

.seo-card .label {
  font-size: 0.7rem;
  color: #888;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #eef2f7;
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
  transition: width 0.5s ease;
}

.recommendations {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}

.recommendations h5 {
  color: #856404;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.recommendations li {
  color: #856404;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.page-list {
  max-height: 250px;
  overflow-y: auto;
}

.page-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
}

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

.page-url {
  flex: 1;
  font-size: 0.8rem;
  color: #555;
  word-break: break-all;
}

.page-score {
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.75rem;
  margin-left: 10px;
}

.page-score.medium {
  background: #ffc107;
  color: #333;
}

.page-score.low {
  background: #dc3545;
}

.footer {
  background: #1a1a2e;
  color: white;
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer h5 {
  color: #4ecdc4;
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 1rem;
}

.footer p {
  color: #adb5bd;
  line-height: 1.7;
  font-size: 0.875rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #4ecdc4;
}

.footer-bottom {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #6c757d;
  font-size: 0.8rem;
}

.alert {
  border-radius: 8px;
  font-size: 0.875rem;
}

.advanced-options {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.advanced-options h6 {
  color: #4ecdc4;
  font-size: 0.875rem;
  margin-bottom: 15px;
}

.advanced-options label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  margin-bottom: 5px;
  display: block;
}

.advanced-options input {
  border-radius: 6px;
  border: none;
  padding: 8px 12px;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .info-item {
    flex-direction: column;
  }

  .info-label {
    min-width: auto;
    margin-bottom: 5px;
  }

  .search-input {
    margin-bottom: 10px;
  }

  .seo-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .seo-card .value {
    font-size: 1.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Fix for the footer at the bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

/* Add margin between row items when they stack on mobile */
.row.g-4 > div {
  margin-bottom: 0px; /* Bootstrap g-4 handles this, but ensuring no override */
}

/* Styling for the text selection */
::selection {
  background: #4ecdc4;
  color: #fff;
}

/* Remove the scrolling limitation */
.url-list-dynamic {
  max-height: none !important; /* Overrides any previous fixed height */
  overflow-y: visible !important;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

/* Style the links within the list */
.url-item-link {
  display: block;
  padding: 10px 15px;
  border-bottom: 1px solid #eef2f7;
  color: #0f3460;
  text-decoration: none;
  font-family: "SF Mono", SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  word-wrap: break-word; /* Ensures long URLs don't break the layout */
  word-break: break-all;
}

.url-item-link:hover {
  background-color: #ffffff;
  color: #4ecdc4;
  padding-left: 20px; /* Slight nudge effect on hover */
}

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

.url-item-link i {
  font-size: 0.75rem;
  margin-right: 10px;
  opacity: 0.5;
}

