/* Reset и базовые стили */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background: radial-gradient(circle at center, #e6f0ff 0%, #ffffff 100%);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Анимация фона */
body::before {
  content: "";
  position: fixed; /* Меняем на fixed */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(173, 216, 255, 0.3), transparent);
  animation: pulse 8s infinite;
  z-index: -1;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
}

/* Верхняя панель */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: #f5faff;
  border-bottom: 2px solid #cce0f5;
  box-shadow: 0 4px 12px rgba(0, 85, 153, 0.05);
  font-weight: 500;
  font-size: 16px;
  color: #003366;
}

.top-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #1a2b66;
}

.corner-icons {
  font-size: 20px;
  color: #003366;
}

.corner-status i {
  margin-left: 8px;
  font-size: 16px;
  color: #003366;
}

/* Часы и иконки Twitch */
.clock {
  font-size: 96px;
  font-weight: 600;
  color: #001a66;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  margin: 40px auto 20px auto;
}

.twitch-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
  font-size: 28px;
}

/* Основной контент */
#command-panel {
  flex: 1;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 30px; /* Отступ снизу для контента */
}

.neu {
  background: #e6f0ff;
  border-radius: 20px;
  box-shadow: 8px 8px 20px #cfd9e6, -8px -8px 20px #ffffff;
}

/* Вкладки */
.tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: #e6f0ff;
  border: none;
  color: #333;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 4px 4px 10px #cfd9e6, -4px -4px 10px #ffffff;
  transition: all 0.2s ease-in-out;
}

.tab-btn.active {
  background: #b3d9ff;
  color: #003366;
}

.tab-content {
  display: none;
}
body::before {
  content: "";
  position: fixed; /* Меняем на fixed */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(173, 216, 255, 0.3), transparent);
  animation: pulse 8s infinite;
  z-index: -1;
}
.tab-content.active {
  display: block;
}
.tab-content:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Команды */
.command-row {
  background: #e6f0ff;
  margin: 10px auto;
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: 8px 8px 16px #cfd9e6, -8px -8px 16px #ffffff;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.command-desc {
  font-size: 14px;
  color: #555;
  margin-top: 5px;
  padding: 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  word-break: break-word;
}

.command-row button {
  margin-left: 8px;
}

/* Кнопки */
.icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #e6f0ff;
  color: #333;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 4px 4px 10px #cfd9e6, -4px -4px 10px #ffffff;
  border: none;
  transition: all 0.2s ease-in-out;
}

.icon-btn:hover {
  background: #d9eaff;
}

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #e6f0ff;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 8px 8px 20px #cfd9e6, -8px -8px 20px #ffffff;
  width: 95%;
  max-width: 600px;
  color: #000;
  box-sizing: border-box;
}

.modal-content label {
  display: block;
  text-align: left;
  margin-bottom: 14px;
  font-size: 14px;
  color: #333;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  box-shadow: inset 2px 2px 5px #cfd9e6, inset -2px -2px 5px #ffffff;
  background: #f0f5ff;
  box-sizing: border-box;
}

.modal-content textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
}

/* Переключатели */
.switch input {
  display: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 26px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
  box-shadow: inset 2px 2px 5px #cfd9e6, inset -2px -2px 5px #ffffff;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
  box-shadow: 2px 2px 5px #cfd9e6, -2px -2px 5px #ffffff;
}

input:checked + .slider {
  background-color: #4da6ff;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
  padding: 4px 0;
}

/* Модераторы */
#moderators-list {
  max-height: 400px;
  overflow-y: auto;
}

.moderators-container {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.moderator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin: 5px 0;
  background: rgba(145, 71, 255, 0.1);
  border-radius: 8px;
}

.moderator-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moderator-name {
  font-weight: 500;
}

.delete-moderator {
  background: none;
  border: none;
  color: #ff4d4d;
  cursor: pointer;
}

.add-moderator-form {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

#new-moderator {
  flex-grow: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.no-moderators, .error-message {
  text-align: center;
  padding: 15px;
  color: #666;
}

.moderator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.default-avatar {
  font-size: 24px;
  color: #9147ff;
}

.loading {
  text-align: center;
  padding: 15px;
  color: #666;
}

/* Футер */
.site-footer {
  width: 100%;
  background: #e6f0ff;
  padding: 15px 0;
  margin-top: auto; /* Это ключевое свойство для прижатия футера */
  box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
  position: relative; /* Убираем fixed/absolute позиционирование */
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-weight: bold;
  color: #003366;
  margin-bottom: 3px;
}

.footer-subtitle {
  font-size: 0.85em;
  color: #555;
}

.footer-icons {
  display: flex;
  gap: 20px;
}

.footer-icon {
  color: #003366;
  font-size: 1.2em;
  transition: color 0.3s;
}

.footer-icon:hover {
  color: #0066cc;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  font-size: 0.75em;
  color: #666;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .clock {
    font-size: 72px;
  }
  
  .twitch-icons {
    gap: 20px;
    font-size: 24px;
  }
  
  .tabs-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .footer-brand {
    align-items: center;
  }
  
  .footer-icons {
    margin: 5px 0;
  }
  
  .command-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-content {
    width: 90%;
  }
}
  #command-panel {
    padding: 20px 15px;
    padding-bottom: 20px;
  }
  
  .site-footer {
    padding: 10px 0;
  }
/* Стили для страницы входа */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  padding: 30px;
  text-align: center;
}

.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 8px 0 20px;
  border: none;
  border-radius: 10px;
  box-shadow: inset 2px 2px 5px #cfd9e6, inset -2px -2px 5px #ffffff;
  background: #f0f5ff;
}

.error-message {
  color: #ff4d4d;
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 8px;
}
.remember-me {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.remember-me input {
    margin-right: 10px;
}

.remember-me label {
    font-size: 14px;
    color: #555;
}
/* Стили для автосообщений */
#automessages-list {
    max-height: 500px;
    overflow-y: auto;
}

.auto-message-row {
    background: #e6f0ff;
    margin: 10px 0;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-buttons button.danger {
    background: #ffebee;
    color: #f44336;
}