/* DCAST Speed Test - Matching dcast.tv Main Site Style - Fixed Colors */

/* --- ОСНОВНОЙ ФОН и БАЗА --- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  background-image: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
  min-height: 100vh;
  color: #020817;
  overflow-x: hidden;
}

/* --- КОНТЕЙНЕР ДЕСКТОП --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 3rem 2rem 3rem 2rem;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- ХЕДЕР ДЕСКТОП --- */
header {
  text-align: center;
  margin-bottom: 3rem;
  width: 100%;
}
h1 {
  color: #020817;
  margin-bottom: 0.5em;
  font-size: 3rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.subtitle {
  color: #475569;
  font-size: 1.2rem;
  margin: 0.5em 0 0 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* --- DIAL (КРУГЛЫЙ ИНДИКАТОР) ДЕСКТОП --- */
.dial-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  width: 100%;
}
#dial {
  width: 96vw;
  max-width: 280px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
#dial:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}
#speed-value {
  font-size: 3.5em;
  color: #020817;
  font-weight: 700;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.04em;
  margin-bottom: 0.1em;
  line-height: 1;
}
#unit {
  color: #475569;
  font-size: 1em;
  font-weight: 500;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin-bottom: 0.4em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#percent {
  color: #020817;
  font-weight: 500;
  font-size: 0.9em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin-bottom: 0.4em;
  opacity: 0.9;
  letter-spacing: 0.02em;
}
#status {
  color: #475569;
  font-size: 0.85em;
  position: absolute;
  bottom: 1.5em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --- КНОПКА СТАРТА ДЕСКТОП --- */
#start-button {
  background: linear-gradient(to right, #2563eb, #9333ea);
  color: #ffffff;
  border: none;
  padding: 1em 2.5em;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
  margin-top: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
}
#start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4), 0 4px 6px -2px rgba(37, 99, 235, 0.3);
  background: linear-gradient(to right, #1d4ed8, #7c3aed);
}
#start-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
}
#start-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- ГРАФИКИ ДЕСКТОП --- */
.graph-section {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
  margin-bottom: 3rem;
  justify-content: center;
}
.graph-block {
  flex: 1;
  max-width: 450px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}
.graph-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.graph-label {
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.graph-block canvas {
  width: 100% !important;
  height: 160px !important;
}
/* Исправление цветов меток на графиках - делаем темнее для видимости */
.graph-block {
  color: #1e293b;
}

/* --- СТАТИСТИКА ДЕСКТОП --- */
.stats {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  width: 100%;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.stat-block {
  flex: 1;
  min-width: 160px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}
.stat-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.stat-block label {
  display: block;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-block div {
  color: #020817;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* --- ФУТЕР ДЕСКТОП --- */
footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}
footer p {
  color: #94a3b8;
  font-size: 0.85rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.02em;
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
@media (max-width: 768px) {
  .container {
    margin-top: 0;
    padding: 2rem 1rem 2.5rem 1rem;
  }
  h1 {
    font-size: 2.2rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  #dial {
    max-width: 220px;
  }
  #speed-value {
    font-size: 2.8em;
  }
  .graph-section {
    flex-direction: column;
    gap: 1.5rem;
  }
  .stats {
    flex-direction: column;
    gap: 1rem;
  }
  .stat-block {
    min-width: 100%;
  }
}

/* --- АНИМАЦИИ --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 0.5s ease-out;
}

