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

body {
  font-family: "Courier New", Courier, monospace;
  background-color: #0a0e1a;
  color: #a8b4c9;
  min-height: 100vh;
}

/* Header */
.header {
  border-bottom: 1px solid #1e293b;
  padding: 1.5rem 2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-box {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  color: #a78bfa;
}

.main-title {
  font-family: Georgia, serif;
  font-size: 2rem;
  color: #a8b4c9;
}

.subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #8b5cf6;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.nav-link {
  color: #a8b4c9;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #a78bfa;
}

.nav-divider {
  color: #4b5563;
}

.theme-toggle {
  border: 1px solid #a78bfa;
  background: transparent;
  color: #a8b4c9;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-toggle:hover {
  background: #a78bfa;
  color: #0a0e1a;
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 120px);
}

@media (min-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr 1fr;
  }
}

.column {
  padding: 2rem;
}

.left-column {
  border-right: 1px solid #1e293b;
}

.section-title {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  color: #c4b5fd;
  margin-bottom: 2rem;
}

/* Statistics Container */
.stats-container {
  border: 1px solid #2d1b69;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(26, 15, 58, 0.2) 0%, transparent 100%);
}

.stats-header {
  margin-bottom: 1.5rem;
}

.target-label {
  font-size: 0.875rem;
  color: #c4b5fd;
}

/* Progress Bar */
.progress-section {
  margin-bottom: 2rem;
}

.progress-bar-container {
  height: 0.75rem;
  background-color: #1a1f2e;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid #2d1b69;
}

.progress-bar-fill {
  height: 100%;
  width: 0.000042%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.progress-label {
  color: #8b5cf6;
}

.progress-value {
  color: #a8b4c9;
}

/* Stats Table */
.stats-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  transition: background-color 0.3s;
}

.stats-row:hover {
  background-color: rgba(26, 15, 58, 0.3);
}

.stats-row-header {
  font-size: 0.75rem;
  color: #8b5cf6;
  border-top: 1px solid #2d1b69;
}

.stats-row-eta {
  border-top: 1px solid #2d1b69;
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.eta-label {
  color: #c4b5fd;
}

.stat-value {
  font-weight: bold;
  color: #a8b4c9;
}

.stat-value-purple {
  color: #c4b5fd;
}

.stat-value-light {
  color: #a78bfa;
}

.stat-value-yellow {
  color: #fbbf24;
}

/* Performance Stats */
.performance-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .performance-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.performance-card {
  border: 1px solid #2d1b69;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(26, 15, 58, 0.2) 0%, transparent 100%);
  transition: border-color 0.3s;
}

.performance-card:hover {
  border-color: #8b5cf6;
}

.performance-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #c4b5fd;
  margin-bottom: 0.5rem;
  word-break: break-all;
  position: relative;
}

.performance-number.streaming::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4ch;
  background: linear-gradient(90deg, transparent, #a78bfa, transparent);
  animation: stream 2s ease-in-out infinite;
}

@keyframes stream {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.performance-label {
  font-size: 0.75rem;
  color: #8b5cf6;
}

/* Filter Section */
.filter-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-btn {
  border: 1px solid #2d1b69;
  background: transparent;
  color: #a8b4c9;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.filter-checkbox {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.filter-checkbox input[type="checkbox"] {
  accent-color: #8b5cf6;
}

/* Scraper Cards */
.scraper-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.scraper-card {
  border: 1px solid #2d1b69;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(26, 15, 58, 0.1) 0%, transparent 100%);
  transition: all 0.3s;
}

.scraper-card:hover {
  border-color: #8b5cf6;
}

.scraper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.scraper-title {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  color: #c4b5fd;
  margin-bottom: 0.25rem;
}

.scraper-subtitle {
  font-size: 0.75rem;
  color: #8b5cf6;
}

.scraper-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #a78bfa;
}

.status-dot.pulsing {
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.status-text {
  font-size: 0.75rem;
  color: #a78bfa;
}

/* Scraper Stats Grid */
.scraper-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .scraper-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.scraper-stat {
  border: 1px solid #2d1b69;
  padding: 0.75rem;
  transition: border-color 0.3s;
}

.scraper-stat:hover {
  border-color: #8b5cf6;
}

.scraper-stat-value {
  font-size: 1.125rem;
  font-weight: bold;
  color: #c4b5fd;
  margin-bottom: 0.25rem;
}

.scraper-stat-label {
  font-size: 0.75rem;
  color: #8b5cf6;
}

/* Scraper Progress */
.scraper-progress {
  margin-bottom: 1rem;
}

.scraper-progress-bar {
  height: 0.5rem;
  background-color: #1a1f2e;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.scraper-progress-fill {
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  animation: pulse 2s ease-in-out infinite;
}

.scraper-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #8b5cf6;
}

.scraper-progress-info span:last-child {
  color: #a8b4c9;
}

.scraper-footer {
  font-size: 0.75rem;
  color: #a8b4c9;
}

/* System Stats */
.system-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.system-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2d1b69;
}

.system-stat-label {
  font-size: 0.875rem;
  color: #8b5cf6;
}

.system-stat-value {
  font-weight: bold;
  color: #c4b5fd;
}

.system-stat-yellow {
  color: #fbbf24;
}

.system-stat-light {
  color: #a78bfa;
}

.system-stat-green {
  color: #10b981;
}

.system-stat-purple {
  color: #c4b5fd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }

  .header-right {
    align-items: flex-start;
    width: 100%;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .performance-number {
    font-size: 1.5rem;
  }

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

