  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #0c0e1a 0%, #1a1c3a 100%);
      min-height: 100vh;
      padding: 20px;
      color: #fff;
  }

  .container {
      max-width: 1400px;
      margin: 0 auto;
  }

  h1 {
      text-align: center;
      font-size: 32px;
      margin-bottom: 10px;
      background: linear-gradient(135deg, #667eea, #764ba2);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
  }

  .subtitle {
      text-align: center;
      color: #8892b0;
      font-size: 14px;
      margin-bottom: 30px;
  }

  /* Спидометры */
  .speedometers {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
  }

  .speedometer-wrapper {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      padding: 20px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      position: relative;
      overflow: hidden;
  }

  .speedometer-wrapper::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
      animation: rotate 20s linear infinite;
  }

  @keyframes rotate {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
  }

  .speedometer-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      position: relative;
      z-index: 1;
  }

  .speedometer-title {
      font-size: 18px;
      font-weight: 600;
      color: #ccd6f6;
  }

  .speedometer-icon {
      font-size: 24px;
  }

  .speedometer-container {
      position: relative;
      width: 100%;
      max-width: 300px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
      zoom: 0.85;
  }

  .speed-value-overlay {
      position: absolute;
      top: 73%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      z-index: 2;
      pointer-events: none;
  }

  .speed-value-number {
      font-size: 32px;
      font-weight: bold;
      background: linear-gradient(135deg, #667eea, #764ba2);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1;
  }

  .speed-value-unit {
      font-size: 14px;
      color: #8892b0;
      display: block;
  }

  .speed-status {
      text-align: center;
      margin-top: 10px;
      font-size: 12px;
      color: #8892b0;
      position: relative;
      z-index: 1;
  }

  .speed-status .status-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      margin-right: 5px;
      animation: pulse-dot 1.5s ease-in-out infinite;
  }

  .speed-status .status-dot.idle {
      background: #8892b0;
      animation: none;
  }

  .speed-status .status-dot.active {
      background: #667eea;
  }

  .speed-status .status-dot.done {
      background: #4ade80;
      animation: none;
  }

  @keyframes pulse-dot {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(0.8); }
  }

  /* Графики */
  .charts-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-bottom: 30px;
  }

  .chart-wrapper {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      padding: 20px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .chart-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
  }

  .chart-title {
      font-size: 16px;
      font-weight: 600;
      color: #ccd6f6;
  }

  .chart-current-speed {
      font-size: 14px;
      color: #8892b0;
  }

  .chart-current-speed span {
      color: #667eea;
      font-weight: bold;
      font-size: 18px;
  }

  .chart-container {
      position: relative;
      height: 100px;
  }

  /* Информационная панель */
  .info-panel {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 15px;
      margin-bottom: 30px;
  }

  .info-card {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 15px;
      padding: 15px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      transition: all 0.3s;
      min-height: 92px;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .info-card:hover {
      transform: translateY(-2px);
      border-color: rgba(102, 126, 234, 0.5);
  }

  .info-card-label {
      font-size: 11px;
      text-transform: uppercase;
      color: #8892b0;
      letter-spacing: 1px;
  }

  .info-card-value {
      font-size: 17px;
      font-weight: bold;
      color: #ccd6f6;
      margin-top: 5px;
  }

  .info-card-value.good {
      color: #4ade80;
  }

  .info-card-value.medium {
      color: #fbbf24;
  }

  .info-card-value.bad {
      color: #f87171;
  }

  /* Прогресс-бар */
  .progress-container {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 10px;
      height: 8px;
      overflow: hidden;
      margin: 20px 0px;
  }

  .progress-bar {
      height: 100%;
      background: linear-gradient(90deg, #667eea, #764ba2);
      width: 0%;
      transition: width 0.3s ease;
      border-radius: 10px;
  }

  #operatorValue{
    font-size: 15px;
  }

  #countryFlag {
    width: 24px;
    height: 24px;
    display: inline-block;
    top: 5px;
    position: relative;
  }

  /* Кнопки */
  .controls {
      display: flex;
      gap: 15px;
      justify-content: center;
      margin: 20px;
      flex-grow: 1;
  }

  .btn {
      padding: 12px 35px;
      border: none;
      border-radius: 25px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;
      min-width: 200px;
  }

  .btn-primary {
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  }

  .btn-primary:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  }

  .btn-danger {
      background: linear-gradient(135deg, #f87171, #ef4444);
      color: white;
      box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  }

  .btn-danger:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
  }

  .btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none !important;
  }

  .btn .btn-loader {
      display: none;
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto;
  }

  .btn.loading .btn-text {
      display: none;
  }

  .btn.loading .btn-loader {
      display: block;
  }

  @keyframes spin {
      to { transform: rotate(360deg); }
  }

  /* Статус */
  .status {
      text-align: center;
      margin-top: 15px;
      color: #8892b0;
      font-size: 14px;
  }

  .error {
      color: #f87171;
      text-align: center;
      margin-top: 10px;
      font-size: 14px;
  }

  /* Результаты */
  .results {
      display: none;
      margin-top: 20px;
      padding: 20px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 15px;
      border: 1px solid rgba(102, 126, 234, 0.3);
      backdrop-filter: blur(10px);
  }

  .results.show {
      display: block;
      animation: slideDown 0.5s ease;
  }

  @keyframes slideDown {
      from {
          opacity: 0;
          transform: translateY(-20px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .results-title {
      text-align: center;
      font-weight: bold;
      color: #ccd6f6;
      margin-bottom: 15px;
      font-size: 18px;
  }

  .result-row {
      display: flex;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .result-row:last-child {
      border-bottom: none;
  }

  .result-label {
      color: #8892b0;
  }

  .result-value {
      font-weight: bold;
      color: #ccd6f6;
  }

  /* Адаптивность */
  @media (max-width: 1024px) {
      .speedometers {
          grid-template-columns: 1fr 1fr;
      }
      
      .charts-container {
          grid-template-columns: 1fr;
      }
      
      .info-panel {
          grid-template-columns: repeat(2, 1fr);
      }
  }

@media (max-width: 600px) {
    .speedometers {
        grid-template-columns: 1fr;
    }
    
    .info-panel {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile mode - будут отображаться только активные спидометры и графики, остальные - нет */

    .charts-container,
    .speedometers {
        margin-bottom: 5px;
    }

    .speedometer-wrapper, 
    .chart-wrapper {
      display: none;
    }
    
    .speedometer-wrapper.speedometer-active,
    .chart-wrapper.chart-active {
      display: block;
    }

    .controls {
        margin: 20px;
    }

    #stopBtn:disabled,
    #startBtn.loading{
        display: none;
    }

}