/* ===== BASE STYLES ===== */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: #FFE4EC;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
  display: none;
  padding-bottom: 60px;
}

.screen:not(.hidden) {
  display: block;
}

/* ===== TOOLBAR ===== */
.toolbar {
  background-color: #00796b;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.toolbar-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  flex: 1;
}

.toolbar-icon {
  width: 24px;
  height: 24px;
  margin-left: 10px;
  filter: brightness(0) invert(1);
  cursor: pointer;
}

.back-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  margin-right: 10px;
}

/* ===== THEMES & CONTENT ===== */
.themes {
  padding: 16px;
  padding-bottom: 70px;
}

.theme-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  text-align: center; /* Названия по центру */
  cursor: pointer;
  transition: transform 0.2s;
}

.theme-btn:active {
  transform: scale(0.98);
}

/* ===== SUBTHEME BUTTONS (для general.html) ===== */
.subtheme-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px; /* Уменьшил padding */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px; /* Уменьшил шрифт */
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s;
  min-height: 44px; /* Фиксированная высота */
}

.subtheme-btn:active {
  transform: scale(0.98);
}

.subtheme-text {
  flex: 1;
  text-align: center; /* Текст по центру */
  padding-right: 30px; /* Место для звездочки */
}

.favorite-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px; /* Уменьшил звездочку */
  color: #ccc;
  padding: 0;
  margin-left: 5px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.favorite-star.active {
  color: #ffd700;
}

.favorite-star:hover {
  transform: scale(1.1);
}

.no-star {
  width: 20px;
  height: 20px;
  visibility: hidden;
  flex-shrink: 0;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  padding: 10px;
  background-color: #fff;
}

.search-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 10px;
}

.search-icon {
  width: 20px;
  margin-right: 10px;
}

#search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  background: transparent;
}

/* Убираем автозаполнение */
#search-input:-webkit-autofill,
#search-input:-webkit-autofill:hover, 
#search-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px white inset;
  box-shadow: 0 0 0px 1000px white inset;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 48px;
  background: #E6DADA;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 10;
}

.bottom-nav button {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #00796b;
  padding: 0;
  cursor: pointer;
}

.bottom-nav img {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

/* ===== PROFILE STYLES ===== */
.profile-header {
  display: flex;
  align-items: center;
  padding: 16px;
}

.app-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.profile-title {
  font-size: 20px;
  font-weight: bold;
}

.profile-info {
  background: #fff;
  padding: 16px;
  margin: 10px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.subscribe-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: #ffd700;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.profile-buttons-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 18px 0;
}

.wide-button {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  min-height: 40px;
  box-sizing: border-box;
}

.wide-button img {
  height: 20px;
  width: auto;
  margin-right: 6px;
}

.logout-btn {
  display: block;
  width: 90%;
  margin: 24px auto 12px auto;
  padding: 12px 0;
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

/* ===== AUTH STYLES ===== */
.auth-container {
  max-width: 340px;
  margin: 0 auto;
  padding: 32px 16px 0;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 32px;
  font-weight: bold;
  color: #5a5757;
}

.auth-container input {
  display: block;
  width: 100%;
  margin: 18px 0 0 0;
  padding: 10px;
  font-size: 17px;
  border: none;
  border-bottom: 2px solid #5a5757;
  background: transparent;
  outline: none;
}

.auth-container button {
  width: 100%;
  padding: 12px 0;
  margin: 24px 0 0 0;
  font-size: 16px;
  background: #00897b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.auth-container .link {
  text-align: center;
  margin-top: 18px;
  color: #0082c8;
  cursor: pointer;
  font-size: 15px;
}

/* ===== NOTIFICATIONS & MESSAGES ===== */
.notification-block {
  margin: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  font-size: 15px;
  color: #333;
}

.centered-message-block {
  margin: 30px 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
}

.centered-message {
  text-align: center;
  font-size: 18px;
  color: #666;
  padding: 20px;
}

.notify {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #00796b;
  border: 1px solid #00796b;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1000;
  min-width: 220px;
  text-align: center;
}

/* ===== INFO SECTION ===== */
.info-block {
  padding: 18px 16px 32px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.info-section {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 18px;
  padding: 16px 14px;
}

.info-section h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
  color: #00796b;
}

.info-section p, .info-section ul {
  margin: 0;
  font-size: 15px;
  color: #444;
}

.info-section ul {
  padding-left: 18px;
}

.info-section a {
  color: #0082c8;
  text-decoration: underline;
}

/* ===== FAVORITES STYLES ===== */
.favorites-container {
  padding: 16px;
  padding-bottom: 20px;
}

.favorite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 16px;
  margin: 10px 0;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.favorite-text {
  flex: 1;
  font-size: 16px;
  color: #333;
}

.favorite-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
}

.open-btn {
  color: #00796b;
}

.delete-btn {
  color: #f44336;
}

.no-favorites {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
  background: #fff;
  border-radius: 10px;
  margin-top: 20px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .toolbar-title {
    font-size: 18px;
  }
  
  .theme-btn, .subtheme-btn {
    font-size: 14px;
    padding: 10px;
  }
  
  .auth-container {
    padding: 20px 16px 0;
  }
  
  .profile-buttons-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .wide-button {
    width: 100%;
  }
  
  .subtheme-text {
    font-size: 13px;
    padding-right: 25px;
  }
  
  .favorite-star {
    font-size: 18px;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen:not(.hidden) {
  animation: fadeIn 0.3s ease;
}

.notify {
  animation: fadeIn 0.3s ease;
}