* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f3f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.site-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: white;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header-left {
  display: flex;
  align-items: center;
}

.main-nav {
  display: flex;
  gap: 15px;
}

.main-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 16px;          /* отступы для овала */
  border-radius: 40px;         /* скругление */
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background: #f1f5f9;         /* серый фон при наведении */
  color: #0f172a;
}

.main-nav a.active {
  background: #2962ef;         /* синий фон как у кнопки входа */
  color: white;
}

.auth-button {
  background: #2962ef;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.auth-button:hover {
  background: #1e4fd9;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  color: #334155;
}

.user-name {
  font-weight: 600;
  color: #2962ef;
}

.logout-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.logout-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.container {
  max-width: 1100px;
  width: 100%;
  background: white;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
  padding: 40px;
}

h2 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 20px;
}

.info-section {
  color: #334155;
  line-height: 1.6;
  font-size: 16px;
}

.info-section p {
  margin-bottom: 16px;
}

.info-section ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

.info-section li {
  margin-bottom: 8px;
}

.info-section a {
  color: #2962ef;
  text-decoration: none;
  font-weight: 500;
}

.info-section a:hover {
  text-decoration: underline;
}

/* Десктопное меню */
.desktop-nav {
  display: flex;
  gap: 15px;
}

.desktop-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 40px;
  transition: background 0.2s, color 0.2s;
}

.desktop-nav a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.desktop-nav a.active {
  background: transparent;
  color: #2962ef;
  border-bottom: 3px solid #2962ef;
  border-radius: 0;
  padding: 6px 16px 3px;
}

/* Гамбургер (скрыт на десктопе) */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  margin-right: 15px;
}

/* Мобильное выпадающее меню */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: white;
  padding: 10px 0;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  position: absolute;
  top: calc(100% + 2px); /* отступ от шапки */
  left: 0;
  z-index: 100;
}

.mobile-nav a {
  padding: 12px 20px;
  color: #334155;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  background: #f8fafc;
}

.mobile-nav a.active {
  background: #2962ef;
  color: white;
}

@media (max-width: 600px) {
  .desktop-nav {
    display: none; /* прячем обычное меню */
  }

  .hamburger {
    display: inline-block; /* показываем гамбургер */
  }

  .site-header {
    position: relative; /* для позиционирования выпадающего меню */
    justify-content: space-between;
    padding: 15px 20px;
  }

  .header-left {
    display: flex;
    align-items: center;
  }

  /* Стили для блока авторизации на мобильных */
  .user-info {
    gap: 10px;
    font-size: 14px;
  }

  .user-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-btn {
    padding: 4px 12px;
    font-size: 13px;
  }

  .auth-button {
    padding: 6px 16px;
    font-size: 14px;
  }

  .site-header {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
  }
  .main-nav {
    gap: 15px;
  }
  .container {
    padding: 20px;
  }

  .modal-content {
    padding: 30px 20px;
  }
  .subscription-plans {
    flex-direction: column;
  }
  .plan {
    width: 100%;
  }

  .auth-button, .logout-btn {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Стили для модальных окон (скопированы из index.html) */
.subscription-modal,
.login-modal,
.register-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 28px;
  max-width: 500px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
}

.modal-close:hover {
  color: #0f172a;
}

.subscription-plans {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.plan {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  text-align: center;
  transition: 0.2s;
}

.plan:hover {
  border-color: #2962ef;
  box-shadow: 0 4px 12px rgba(41,98,239,0.1);
}

.plan h3 {
  margin-bottom: 10px;
  color: #0f172a;
}

.price {
  font-size: 24px;
  font-weight: 700;
  color: #2962ef;
  margin: 15px 0;
}

.plan button {
  background: #2962ef;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.plan button:hover {
  background: #1e4fd9;
}

.login-link,
.register-link {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
}

.login-link a,
.register-link a {
  color: #2962ef;
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover,
.register-link a:hover {
  text-decoration: underline;
}

.login-modal input,
.register-modal input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
}

.login-modal button[type="submit"],
.register-modal button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #2962ef;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}