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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1a365d, #0f172a);
  color: #f9fafb;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px; /* Добавляем отступы по краям для мобильных устройств */
}

.app {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  padding: 24px 32px 28px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto; /* Центрирование по горизонтали */
}

.title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.app-header {
  margin-bottom: 16px;
  text-align: center; /* Центрируем содержимое заголовка */
}

.nav-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  margin-bottom: 10px;
}

.nav-tab {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: #e5e7eb;
  opacity: 0.7;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease,
    transform 0.12s ease;
}

.nav-tab:hover {
  opacity: 1;
  background: rgba(31, 41, 55, 0.95);
  transform: translateY(-1px);
}

.nav-tab-active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f9fafb;
  opacity: 1;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.6);
  cursor: default;
}

button {
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: #2563eb;
  color: #f9fafb;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
  transition:
    background-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.55);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

@media (max-width: 640px) {
  .app {
    margin: 0; /* На мобильных можно убрать margin */
    padding: 18px 16px 22px;
  }

  .nav-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Стили для домашней страницы */
.home-main {
  max-width: 1000px;
  margin: 0 auto;
}

.progress-overview,
.mode-selector {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}