/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Ocean Blue Color Palette */
  --primary-blue: #0066cc;
  --deep-blue: #004499;
  --light-blue: #3399ff;
  --ocean-blue: #006bb3;
  --sky-blue: #66ccff;
  --navy-blue: #003366;
  
  /* Supporting Colors */
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --gray: #6c757d;
  --dark-gray: #343a40;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--deep-blue));
  --gradient-light: linear-gradient(135deg, var(--light-blue), var(--sky-blue));
  --gradient-ocean: linear-gradient(135deg, var(--ocean-blue), var(--navy-blue));
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 102, 204, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 102, 204, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 102, 204, 0.2);
  --shadow-xl: 0 12px 32px rgba(0, 102, 204, 0.25);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background: var(--gradient-light);
  min-height: 100vh;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo i {
  font-size: 3rem;
  animation: spin 10s linear infinite;
}

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

.logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C300,120 900,0 1200,60 L1200,120 L0,120 Z' fill='%23f8f9fa'/%3E%3C/svg%3E") no-repeat;
  background-size: cover;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* Card Styles */
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  background: var(--gradient-ocean);
  color: var(--white);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-light);
}

.card-header i {
  font-size: 1.5rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.results-stats {
  margin-left: auto;
  display: flex;
  gap: 2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.card-body {
  padding: 2rem;
}

/* Form Styles */
.crawler-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--primary-blue);
  z-index: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all var(--transition-normal);
  background: var(--white);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  transform: translateY(-2px);
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Custom Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.checkbox-label:hover {
  color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-blue);
  border-radius: 4px;
  position: relative;
  transition: all var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-weight: bold;
  font-size: 12px;
}

/* Select Styles */
select {
  padding: 0.5rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: var(--white);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* Button Styles */
.btn-primary, .btn-secondary, .btn-success, .btn-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--gray);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-info {
  background: var(--info);
  color: var(--white);
}

.btn-secondary:hover, .btn-success:hover, .btn-info:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Button Loader */
.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.btn-primary.loading .btn-loader {
  display: block;
}

.btn-primary.loading span {
  display: none;
}

/* Results Section */
.results-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-filter {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-filter i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.search-filter input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-buttons button {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

/* Results List */
.results-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.results-list {
  display: flex;
  flex-direction: column;
}

.result-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color var(--transition-fast);
}

.result-item:hover {
  background-color: #f8f9fa;
}

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

.result-checkbox {
  margin-right: 1rem;
}

.result-url {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--primary-blue);
  word-break: break-all;
}

.result-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-found {
  background: #d4edda;
  color: #155724;
}

.status-sitemap {
  background: #cce5ff;
  color: #004085;
}

.status-robots {
  background: #fff3cd;
  color: #856404;
}

/* Progress Section */
.progress-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.progress-info h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width var(--transition-normal);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Footer */
.footer {
  background: var(--gradient-ocean);
  color: var(--white);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover {
  opacity: 0.8;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--white);
  border-left: 4px solid var(--primary-blue);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
  }
  
  .logo h1 {
    font-size: 2rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
  
  .results-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filter {
    max-width: none;
  }
  
  .action-buttons {
    justify-content: center;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .toast-container {
    left: 1rem;
    right: 1rem;
  }
  
  .toast {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .card-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .results-stats {
    margin-left: 0;
    flex-direction: column;
    gap: 0.5rem;
  }
}