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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

.logo {
  margin-bottom: 20px;
}

.header h1 {
  font-size: 2em;
  margin-bottom: 20px;
  font-weight: 700;
}

.subtitle {
  font-size: 1em;
  line-height: 1.6;
  opacity: 0.95;
}

form {
  padding: 40px;
}

.block {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #E5E7EB;
}

.block:last-of-type {
  border-bottom: none;
}

.block h2 {
  color: #4F46E5;
  font-size: 1.4em;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid #E0E7FF;
}

.question {
  margin-bottom: 30px;
  padding: 20px;
  background: #F9FAFB;
  border-radius: 12px;
  border-left: 4px solid #4F46E5;
}

.question-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 15px;
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.option:hover {
  background: #EEF2FF;
  border-color: #C7D2FE;
}

.option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: #4F46E5;
  cursor: pointer;
}

.option span {
  font-size: 1em;
  color: #374151;
}

.other-input {
  margin-top: 10px;
  padding: 12px 16px;
  border: 2px solid #D1D5DB;
  border-radius: 8px;
  font-size: 1em;
  width: 100%;
  max-width: 400px;
  transition: border-color 0.2s ease;
}

.other-input:focus {
  outline: none;
  border-color: #4F46E5;
}

textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #D1D5DB;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

textarea:focus {
  outline: none;
  border-color: #4F46E5;
}

.submit-section {
  text-align: center;
  padding-top: 20px;
}

.submit-btn {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: white;
  border: none;
  padding: 16px 48px;
  font-size: 1.2em;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

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

.success-message {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-size: 40px;
  color: white;
}

.success-message h2 {
  color: #1F2937;
  font-size: 1.8em;
  margin-bottom: 15px;
}

.success-message p {
  color: #6B7280;
  font-size: 1.1em;
}

.admin-panel {
  text-align: center;
  padding: 20px;
  background: #F3F4F6;
  border-top: 1px solid #E5E7EB;
}

.admin-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

.logout-btn {
  background: #EF4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #DC2626;
}

.export-btn {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  margin: 5px;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* Кнопка отчёта — синяя, чтобы её не спутать с экспортом в Excel */
.report-btn {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  margin: 5px;
}

.report-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* Во время сборки отчёта кнопка не должна выглядеть доступной */
.report-btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.clear-btn {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  margin: 5px;
}

.clear-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #9CA3AF;
  transition: color 0.2s;
}

.close:hover {
  color: #4B5563;
}

.modal-content h2 {
  color: #1F2937;
  margin-bottom: 25px;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #D1D5DB;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #4F46E5;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: white;
  border: none;
  padding: 14px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.error-message {
  background: #FEE2E2;
  color: #DC2626;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  text-align: center;
  font-size: 0.95em;
}

.login-section {
  text-align: center;
  padding: 20px;
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
}

.login-link {
  background: none;
  border: none;
  color: #6B7280;
  font-size: 0.95em;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.login-link:hover {
  color: #4F46E5;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 30px 20px;
  }
  
  .header h1 {
    font-size: 1.5em;
  }
  
  form {
    padding: 20px;
  }
  
  .question {
    padding: 15px;
  }
}
