/* style.css */
:root {
  --primary-color: #2d3436;
  --accent-color: #0984e3;
  --bg-color: #f5f6fa;
  --text-color: #2d3436;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 3rem;
  color: var(--primary-color);
}

h1 span {
  color: var(--accent-color);
}

.subtitle {
  color: #636e72;
  font-size: 1.2rem;
}

.input-section {
  margin-bottom: 2rem;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

button {
  display: block;
  margin: 1rem auto;
  padding: 1rem 2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

button:hover {
  background-color: #0873c4;
  transform: translateY(-2px);
}

.output-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #dfe6e9;
  border-bottom-color: var(--accent-color);
  border-radius: 50%;
  margin: 0 auto;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

#essayOutput {
  white-space: pre-wrap;
}

/* Typing animation */
.typing {
  border-right: 2px solid var(--accent-color);
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-color); }
}

@media (max-width: 768px) {
  .container {
      padding: 1rem;
  }

  h1 {
      font-size: 2rem;
  }
}
/* style.css - добавить к существующему CSS */
.auth-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  margin: 1rem 0;
}

.input-group input {
  flex: 1;
  padding: 0.8rem;
  border: 2px solid #dfe6e9;
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
}

.input-group button {
  margin: 0;
  border-radius: 0 8px 8px 0;
}

.key-status {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.key-status.error {
  color: #e74c3c;
}

.key-status.success {
  color: #27ae60;
}

.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.user-info p {
  margin: 0 1rem 0 0;
}

.small-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Фильтры выбора предметов */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filters label {
  font-weight: bold;
}

.filters select {
  padding: 0.8rem;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.filters select:focus {
  outline: none;
  border-color: var(--accent-color);
}
/* Стили для вкладок */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 1rem 2rem;
  background: var(--bg-color);
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  border-bottom: 3px solid var(--accent-color);
  font-weight: bold;
}

.tab-content {
  display: none;
}

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

/* Стили для формы решения задач */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-section textarea {
  width: 100%;
  height: 120px;
  padding: 1rem;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 1rem;
}

#solveTaskBtn, #generateEssayBtn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
}

/* Эффект печатания текста */
.typing {
  border-right: 3px solid var(--accent-color);
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-color); }
}

