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

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #000000;
  color: #ffffff;
}

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

h1 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.model-selector {
  margin-bottom: 30px;
  text-align: center;
}

.model-selector > label {
  display: block;
  text-align: center;
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #dddddd;
}

.radio-group {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 20px;
  background-color: #1a1a1a;
  border: 2px solid #333333;
  border-radius: 8px;
  transition: all 0.3s;
}

.radio-label:hover {
  border-color: #4a9eff;
  background-color: #252525;
}

.radio-label input[type="radio"] {
  margin-left: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-text {
  color: #667eea;
  font-weight: bold;
}

.radio-text {
  font-size: 1.1em;
  color: #dddddd;
  transition: color 0.3s;
}

.editor-section,
.result-section {
  margin-bottom: 30px;
}

label {
  display: block;
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #dddddd;
}

#inputText {
  width: 100%;
  height: 200px;
  padding: 15px;
  font-size: 1.1em;
  background-color: #1a1a1a;
  color: #ffffff;
  border: 2px solid #333333;
  border-radius: 8px;
  resize: vertical;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: border-color 0.3s;
}

#inputText:focus {
  outline: none;
  border-color: #4a9eff;
}

#inputText::placeholder {
  color: #666666;
}

.check-btn {
  display: block;
  width: 200px;
  margin: 0 auto 30px;
  padding: 15px 30px;
  font-size: 1.3em;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.check-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.check-btn:active:not(:disabled) {
  transform: translateY(0);
}

.check-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.check-btn .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}

.check-btn.loading .spinner {
  display: inline-block;
}

.check-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.output-box {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  font-size: 1.1em;
  background-color: #1a1a1a;
  color: #ffffff;
  border: 2px solid #333333;
  border-radius: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

.error-word {
  color: #ff6b6b;
  text-decoration: underline wavy #ff6b6b;
  cursor: pointer;
  position: relative;
}

.corrected-word {
  color: #51cf66;
  font-weight: bold;
}

.empty-message {
  color: #666666;
  font-style: italic;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2em;
  }
  
  .container {
    padding: 20px 10px;
  }
  
  .check-btn {
    width: 100%;
  }
}
