/* Общие стили для всех страниц */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Основные стили */
body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Hero section */
.hero-section {
   flex: 1;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   padding: 40px 20px;
}

.hero-section h1 {
   color: #fff;
   font-size: 3.5em;
   font-weight: 800;
   margin-bottom: 20px;
   background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   letter-spacing: -0.5px;
}

.hero-section p {
   color: #a0a0a0;
   font-size: 1.2em;
   max-width: 600px;
   margin: 0 auto 40px;
}

/* Заголовки */
h1 {
   text-align: center;
   color: #fff;
   font-size: 2.5em;
   margin-bottom: 40px;
   font-weight: 700;
   letter-spacing: -0.5px;
}

h3 {
  color: #fff;
  margin-bottom: 24px;
  font-size: 1.25em;
  font-weight: 600;
}

/* Навигация */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 40px;
}

nav .nav-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav h1 {
  color: #fff;
  font-size: 1.5em;
  font-weight: 700;
  margin: 0;
}

nav a {
  color: #a0a0a0;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  color: #fff;
}

nav .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav .credits-display {
  display: none;
  margin: 0;
  font-size: 0.9em;
  min-width: 120px;
  white-space: nowrap;
  padding: 8px 16px;
}

nav button {
  background: #fff;
  color: #000;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.signin-btn {
  padding: 8px 16px;
  font-size: 0.9em;
}

.user-menu {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 150px;
  z-index: 1000;
}

.user-menu a {
  display: block;
  padding: 8px 16px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.9em;
}

.user-menu a:hover {
  background: #2a2a2a;
}

/* Секции */
.section {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease;
  margin-bottom: 24px;
}

.section:hover {
  border-color: #3a3a3a;
}

.section h3 {
  color: #fff;
  margin-bottom: 24px;
  font-size: 1.25em;
  font-weight: 600;
}

/* Формы */
label {
  display: block;
  margin: 20px 0 8px;
  color: #a0a0a0;
  font-weight: 500;
  font-size: 0.9em;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #0f0f0f;
  color: #fff;
  font-size: 0.95em;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4a4a4a;
  background: #141414;
}

input::placeholder, textarea::placeholder {
  color: #555;
}

/* Кнопки */
button {
  width: 100%;
  padding: 14px 24px;
  margin: 0;
  border-radius: 8px;
  border: none;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

button:hover:not(:disabled) {
  background: #a0a0a0;
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  background: #2a2a2a;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

/* Чекбоксы */
.checkbox-label {
  display: flex;
  align-items: center;
  margin: 20px 0;
  font-size: 0.95em;
  cursor: pointer;
  color: #e0e0e0;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #fff;
}

/* API статус */
.api-status {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #a0a0a0;
  display: none;
}

.api-status.visible {
  display: block;
}

.api-status.success {
  border-color: #2d5016;
  background: #1a2e0f;
  color: #7bc96f;
}

.api-status.error {
  border-color: #5e1616;
  background: #2e0f0f;
  color: #e57373;
}

/* Кредиты */
.credits-display {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.9em;
  color: #a0a0a0;
  cursor: pointer;
}

.credits-display strong {
  color: #fff;
  font-size: 1.2em;
}

/* Загрузчик */
.loader {
  border: 3px solid #2a2a2a;
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader.active {
  display: block;
}

/* Результат */
.result {
  background: #0f0f0f;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 0.85em;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.6;
  color: #a0a0a0;
}

/* Футер */
footer {
   background: #0f0f0f;
   border-top: 1px solid #2a2a2a;
   padding: 20px 0;
   margin-top: auto;
}

/* Аудио */
audio {
   width: 100%;
   margin: 12px 0;
   border-radius: 8px;
}

/* Медиа-запросы */
@media (max-width: 600px) {
   .hero-section h1 {
       font-size: 2.5em;
   }

   .hero-section {
       padding: 20px;
   }

   h1 {
       font-size: 2em;
   }

   .section {
       padding: 20px;
   }

   input, select, textarea, button {
       padding: 12px;
       font-size: 0.95em;
   }

   nav {
       flex-direction: column;
       gap: 16px;
       text-align: center;
       padding: 20px 10px 20px 10px;
   }

   body {
       padding: 0;
   }

   nav h1 {
       font-size: 1.2em;
   }

   nav a {
       font-size: 0.9em;
   }

   nav .credits-display {
       font-size: 0.8em;
       padding: 6px 12px;
       min-width: unset;
       width: auto;
   }

   nav .nav-right {
       gap: 12px;
   }

   .hero-section h1 {
       font-size: 2em;
   }

   .hero-section {
       padding: 20px 10px;
   }

   footer {
       padding: 20px 10px;
   }
}