* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.meter-form {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meter-form h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  color: #222;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #444;
}

.required {
  color: #e74c3c;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: #3498db;
}

input.error {
  border-color: #e74c3c;
}

.error-message {
  display: block;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  min-height: 18px;
}

.checkbox-group {
  margin-top: 25px;
  margin-bottom: 25px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 2px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 13px;
  color: #555;
}

.submit-btn {
  width: 100%;
  padding: 12px 20px;
  background-color: #3498db;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-btn:hover:not(:disabled) {
  background-color: #2980b9;
}

.submit-btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

.success-message {
  margin-top: 20px;
  padding: 12px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .container {
    padding: 10px;
  }

  .meter-form {
    padding: 20px;
  }

  .meter-form h2 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  input[type="text"],
  input[type="email"] {
    font-size: 16px; /* Для предотвращения zoom на iOS */
  }
}

/* Стили для встраивания через iframe */
@media (max-width: 480px) {
  body {
    background-color: transparent;
  }

  .container {
    padding: 5px;
  }

  .meter-form {
    padding: 15px;
    box-shadow: none;
  }
}
