/* .htaccess Tester Styles */

.htaccess-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
}

/* Form */
.htaccess-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  margin-top: 40px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  color: #000;
  background: #fff;
  font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  border-width: 2px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.form-hint {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.custom-user-agent-input {
  margin-top: 8px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  color: #000;
  background: #fff;
  font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.custom-user-agent-input:focus {
  outline: none;
  border-color: #667eea;
  border-width: 2px;
}

.form-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

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

.btn-primary {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  background-color: #000;
  font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  align-self: flex-start;
}

.btn-primary:hover {
  background: #333;
}

/* Loading */
.htaccess-loading {
  text-align: center;
  padding: 60px 20px;
}

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

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

/* Results */
.htaccess-results {
  margin-top: 40px;
}

.htaccess-export {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-export {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.btn-export:hover {
  background: #f9fafb;
  border-color: #667eea;
}

.htaccess-results-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.htaccess-result-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.result-url {
  flex: 1;
  min-width: 200px;
}

.result-url a {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}

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

.result-status {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

.status-success {
  background: #d1fae5;
  color: #065f46;
}

.status-redirect {
  background: #fef3c7;
  color: #92400e;
}

.status-client-error {
  background: #fee2e2;
  color: #991b1b;
}

.status-server-error {
  background: #fecaca;
  color: #7f1d1d;
}

.status-unknown {
  background: #e5e7eb;
  color: #374151;
}

/* Redirect Timeline */
.redirect-timeline {
  margin-bottom: 24px;
}

.redirect-timeline h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.timeline-container {
  position: relative;
  padding-left: 40px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 30px;
  width: 2px;
  height: calc(100% + 4px);
  background: #e5e7eb;
}

.timeline-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.redirect-permanent {
  background: #fef3c7;
  color: #92400e;
  border: 2px solid #fbbf24;
}

.redirect-temporary {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #f87171;
}

.timeline-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-url {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #374151;
  word-break: break-all;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.timeline-url.final {
  font-weight: 600;
  background: #f0fdf4;
  border-color: #86efac;
}

.timeline-arrow {
  text-align: center;
  font-size: 20px;
  color: #9ca3af;
  margin: 4px 0;
}

.no-redirects {
  padding: 16px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #86efac;
  margin-bottom: 24px;
}

.no-redirects a {
  color: #667eea;
  text-decoration: none;
}

/* Detections & Alerts */
.detections-section,
.seo-alerts-section {
  margin-bottom: 24px;
}

.detections-section h4,
.seo-alerts-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.detections-list,
.seo-alerts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detection-item,
.seo-alert-item {
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 14px;
}

.detection-item.info,
.seo-alert-item.info {
  background: #eff6ff;
  color: #1e40af;
  list-style: none;
  list-style-type: none;
}

.detection-item.info::marker {
  display: none;
  content: '';
}

.detection-item.warning,
.seo-alert-item.warning {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.detection-item.error,
.seo-alert-item.error {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Headers */
.headers-section {
  margin-bottom: 24px;
}

.headers-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.headers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.header-item {
  padding: 12px 16px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.header-item strong {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.header-item span {
  color: #374151;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* Comparison */
.comparison-section {
  margin-bottom: 24px;
}

.comparison-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.comparison-item {
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
}

.comparison-item strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6b7280;
  text-transform: uppercase;
}

.comparison-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.comparison-url {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #374151;
  word-break: break-all;
  margin-bottom: 8px;
}

.comparison-redirects {
  font-size: 12px;
  color: #6b7280;
}

/* cURL Section */
.curl-section {
  margin-bottom: 24px;
}

.curl-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.curl-command {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1e1e1e;
  border-radius: 8px;
  position: relative;
}

.curl-command code {
  flex: 1;
  color: #d4d4d4;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  margin: 0;
}

.btn-copy-curl {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #4a5568;
  border-radius: 4px;
  background: #2d3748;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.btn-copy-curl:hover {
  background: #4a5568;
}

/* Responsive */
@media (max-width: 768px) {
  .htaccess-container {
    padding: 12px;
  }

  .htaccess-form {
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-container {
    padding-left: 30px;
  }

  .headers-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

