/* ========================================= */
/* 🕷️ Website Crawler Section */
/* ========================================= */

#crawlerSection {
  width: 100%;
  max-width: 980x;
  margin: 20px auto 40px auto;
  padding: 20px;
  border-radius: 20px;
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  color: #fff;
}

#crawlerSection h2 {
  font-family: "Michroma", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #fff;
  text-align: left;
}

.crawler-description {
  text-align: center;
  color: #bbb;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

/* Crawler Form */
.crawler-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.crawler-form input[type="url"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: "Open Sans", sans-serif;
  border-radius: 10px;
  border: 1px solid #ccc;
  outline: none;
  box-sizing: border-box;
}

.crawler-options {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 0.95rem;
  cursor: pointer;
}

.option-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.option-label select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  cursor: pointer;
}

.crawler-form button {
  width: 100%;
  margin: 10px auto 0 auto;
  padding: 12px 20px;
  font-family: "Michroma", sans-serif;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}

.crawler-form button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  transform: translateY(-2px);
}

.crawler-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Progress Indicator */
#crawlProgress {
  text-align: center;
  padding: 30px;
  margin: 20px 0;
}

.progress-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #2575fc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-text {
  color: #ddd;
  font-size: 1rem;
}

/* Results Summary Cards */
.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.summary-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2575fc;
  margin-bottom: 5px;
}

.summary-label {
  font-size: 0.85rem;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Results Sections */
.results-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.results-section h3 {
  font-family: "Michroma", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.no-data {
  text-align: center;
  color: #999;
  padding: 20px;
  font-style: italic;
}

/* Structure Analysis */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.structure-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 15px;
}

.structure-item h4 {
  font-family: "Michroma", sans-serif;
  font-size: 1rem;
  margin-bottom: 15px;
  color: #2575fc;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-label {
  min-width: 80px;
  font-size: 0.85rem;
  color: #ddd;
}

.bar-wrapper {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  height: 20px;
  overflow: hidden;
}

.bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.bar-value {
  min-width: 40px;
  text-align: right;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
}

/* Segment List */
.segment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.segment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: background 0.2s ease;
}

.segment-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.segment-name {
  font-family: "Courier New", monospace;
  color: #2575fc;
  font-weight: 600;
}

.segment-count {
  color: #bbb;
  font-size: 0.85rem;
}

/* SEO Stats Grid */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.seo-stat {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: #bbb;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2575fc;
}

/* Ersetze diese Regel in crawler.css: */

/* Page List Controls */
.page-list-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.search-input::placeholder {
  color: #999;
}

.export-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 12px;
}

.export-btn {
  padding: 10px 20px;
  font-family: "Michroma", sans-serif;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.export-btn:hover {
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  transform: translateY(-2px);
}

/* Page Table */
.page-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
}

.page-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #2575fc;
  transition: all 0.2s ease;
}

.page-row:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.page-url {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.page-url a {
  color: #2575fc;
  text-decoration: none;
  word-break: break-all;
}

.page-url a:hover {
  text-decoration: underline;
}

.page-title {
  color: #ddd;
  font-size: 0.95rem;
  font-weight: 500;
}

.page-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-tag {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: #bbb;
}

/* Error Table */
.error-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.error-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: rgba(255, 100, 100, 0.1);
  border-radius: 8px;
  border-left: 3px solid #ff6b6b;
}

.error-url {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: #ff6b6b;
  word-break: break-all;
}

.error-message {
  font-size: 0.85rem;
  color: #ddd;
}

/* ========================================= */
/* 📱 Responsive - Tablet */
/* ========================================= */
@media screen and (max-width: 768px) {
  #crawlerSection {
    padding: 20px;
  }

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

  .structure-grid {
    grid-template-columns: 1fr;
  }

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

  .page-list-controls {
    flex-direction: column;
  }

  .export-btn {
    width: 100%;
  }
  
  .viz-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.viz-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
}
}

/* ========================================= */
/* 📱 Responsive - Mobile */
/* ========================================= */
@media screen and (max-width: 400px) {
  #crawlerSection {
    width: calc(100% - 20px);
    padding: 15px;
    margin: 10px auto;
  }

  #crawlerSection h2 {
    font-size: 1.4rem;
  }

  .results-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .summary-card {
    padding: 15px;
  }

  .summary-icon {
    font-size: 1.5rem;
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .crawler-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .page-table {
    max-height: 400px;
  }

  .page-meta {
    gap: 5px;
  }

  .meta-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .structure-item h4 {
    font-size: 0.9rem;
  }

  .bar-label {
    min-width: 70px;
    font-size: 0.75rem;
  }
}