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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  text-align: center;
  border-bottom: 1px solid #5558;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 8px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
  letter-spacing: 0.03em;
}

.tabs {
  display: flex;
  border-bottom: 3px solid #eee;
  background: #f5f5f5;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  color: #666;
  transition: all 0.25s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: #e0e0e0;
}

.tab-btn.active {
  background: white;
  color: #667eea;
  border-bottom: 3px solid #667eea;
}

.tab-content {
  display: none;
  padding: 25px 30px;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

h2 {
  font-size: 1.5em;
  margin-bottom: 1em;
  color: #333;
}

textarea, input[type="password"], input[type="text"], input[type="url"] {
  width: 100%;
  font-family: inherit;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 15px;
  resize: vertical;
  background: #fafafa;
  transition: border-color 0.3s ease;
}

textarea:focus, input[type="password"]:focus, input[type="text"]:focus, input[type="url"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 6px #667eeaaa;
  outline: none;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  margin-right: 10px;
  margin-bottom: 15px;
  user-select: none;
  display: inline-block;
}

button:hover {
  background: linear-gradient(135deg, #5560eb 0%, #5a3bb1 100%);
  box-shadow: 0 5px 14px #4a3baa9c;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

#dictStatus, #mistralStatus, #ollamaStatus {
  margin-top: 12px;
  padding: 12px;
  font-weight: 600;
  border-radius: 7px;
}

.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#loadingSpinner {
  text-align: center;
  font-size: 1.2em;
  padding: 25px 0;
  color: #555;
}

#loadingSpinner.hidden {
  display: none;
}

#styleExamplesContainer > div {
  background: #ececec;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#styleExamplesContainer button {
  background-color: #e74c3c;
  font-size: 0.9em;
  padding: 6px 10px;
  border-radius: 6px;
  margin-left: 12px;
}

#resultsContent {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
  line-height: 1.6em;
  white-space: pre-wrap;
}

footer {
  margin-top: 30px;
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 0.85em;
  border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }
  .tab-btn {
    margin-bottom: 5px;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .tab-btn.active {
    border-bottom: none;
    border-left: 3px solid #667eea;
  }
  button {
    width: 100%;
  }
}
