/* === БАЗОВЫЕ СТИЛИ === */
body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
  color: black;
}

/* === ОБЩИЕ КОНТЕЙНЕРЫ === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  background: #adadad;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  color: black;
  border-radius: 15px;
}

/* === ХЕДЕР === */
header {
  position: relative;
  width: calc(100% - 10px);
  background: #ffffff;
  padding: 1rem 0;
  margin: 5px 5px 2rem 5px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  min-height: 180px;
}

/* Фоновые картинки */
.header-background,
.main-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: 20px;
}

/* Контейнер с контентом - ВЫШЕ картинки */
header .container {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-radius: 10px;
  background: transparent;
  padding: 15px;
}

/* Обертка контента хедера */
.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  color: #ffffff;
}

/* Блок лого + заголовок */
.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 10px 20px;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Логотип */
.site-logo {
  height: 120px;
  width: auto;
  border-radius: 15px;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 15px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  padding: 5px;
}

.site-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* === НАВИГАЦИОННОЕ МЕНЮ === */
.dropdown-menu ul {
  list-style: none;
  margin: 5px;
  padding: 0;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  text-decoration: none;
  color: black;
  background-color: white;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: bold;
  text-shadow: none;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dropdown-menu a:hover {
  background-color: rgba(53, 122, 184, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* === ПОДМЕНЮ === */
.submenu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.95);
  min-width: 180px;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.25);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.1);
  margin-top: 5px;
}

.menu-item:hover .submenu {
  display: block !important;
}

.submenu li a {
  padding: 12px 15px;
  color: #333;
  background-color: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  white-space: nowrap;
  text-align: left;
}

.submenu li:last-child a {
  border-bottom: none;
}

.submenu li a:hover {
  background-color: rgba(74, 144, 226, 0.1);
  color: #4a90e2;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
main {
  position: relative;
  width: calc(100% - 10px);
  margin: 0 5px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  min-height: 500px;
  padding: 20px 0;
}

main > .container {
  position: relative;
  z-index: 10;
  background: rgba(89, 170, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 20px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

main section,
main #map-container,
main > h3,
#news-container {
  position: relative;
  z-index: 15;
}

main > h3 {
  color: #fff;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 15px 30px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1.8rem;
  margin: 20px 0;
}

/* === СЕКЦИИ ВХОДА / ВЫХОДА === */
#login-section,
#logout-section,
#featured-news {
  background: rgba(74, 144, 226, 0.9);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}

#login-section,
#logout-section {
  width: 100%;
  max-width: 350px;
  margin: 1rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.3s ease, visibility 0.3s ease, height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  position: relative;
}

#login-section.hidden,
#logout-section.hidden {
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

/* === СЕКЦИЯ НОВОСТЕЙ === */
#featured-news {
  width: 100%;
  max-width: 700px;
  margin: clamp(10px, 4vw, 40px);
  background: white;
}

/* === КАРТА === */
#map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
  height: 400px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 15px;
  margin: 20px 0;
}

#map {
  width: 100%;
  height: 100%;
}

/* === ФОРМЫ === */
form {
  width: 100%;
  max-width: 320px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

main form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

/* === ХЭШТЕГИ === */
#hashtags-section {
  margin: 2rem auto;
  padding: 1.5rem;
  background: #4a90e2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 800px;
  text-align: center;
}

.hashtags-container,
.post-hashtags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}

.hashtag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #ffffff, #86c1ff);
  color: #000000;
  border-radius: 25px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.hashtag:hover {
  background: linear-gradient(135deg, #357ab8, #4a90e2);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hashtag.active {
  background: linear-gradient(135deg, #5aa0e6, #4a90e2);
  border-color: #357ab8;
}

.hashtag-count {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-left: 0.4rem;
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

.post-hashtag {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 5px;
  background: #e4efff;
  color: #000000;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  border: 1px solid #4a90e2;
}

.post-hashtag:hover {
  background: #4a90e2;
  color: white;
}

/* === КНОПКИ === */
button, .btn-primary, .btn-create, .read-more-btn, .share-btn {
  padding: 12px 20px;
  background: black;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  font-size: 16px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 5px;
  font-weight: bold;
  text-shadow: none;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

button:hover, .btn-primary:hover, .btn-create:hover, .read-more-btn:hover, .share-btn:hover {
  background: rgba(53, 122, 184, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

main button,
main .btn-primary,
main .btn-create {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

main button:hover,
main .btn-primary:hover,
main .btn-create:hover {
  background: rgba(53, 122, 184, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-secondary, .back-btn {
  background: rgba(108, 117, 125, 0.85);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover, .back-btn:hover {
  background: rgba(84, 91, 98, 0.9);
  transform: translateY(-2px);
}

.btn-logout {
  background: rgba(220, 53, 69, 0.85);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-logout:hover {
  background: rgba(200, 35, 51, 0.9);
  transform: translateY(-2px);
}

.read-more-btn {
  padding: 0.6rem 1.2rem;
  margin-right: 0.5rem;
  font-size: 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
}

.share-btn {
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === ЭЛЕМЕНТЫ НОВОСТЕЙ И ПОСТОВ === */
.news-item,
.news-card {
  background: white;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 80%;
  max-width: 700px;
  margin: 1rem auto;
}

.news-item:hover,
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

main .news-item,
main .news-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #666;
}

.news-info {
  display: flex;
  gap: 1rem;
}

.news-image,
.post-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 6px;
  margin: 1rem 0;
}

.news-category {
  background: #4a90e2;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
}

.read-more {
  display: inline-block;
  margin-top: 15px;
  color: #4a90e2;
  text-decoration: none;
  font-weight: bold;
}

.read-more:hover {
  text-decoration: underline;
}

/* === ДЕТАЛИ ПОСТА === */
.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.2rem;
  color: #4a90e2;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.post-author {
  font-weight: bold;
  color: #4a90e2;
}

.post-date {
  color: #888;
}

.post-views {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2rem;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 2rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f0f0f0;
}

.nav-btn {
  background: #f8f9fa;
  color: #333;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 45%;
  transition: background 0.3s ease;
}

.nav-btn:hover {
  background: #e9ecef;
}

.nav-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

/* === СТИЛИ КОНТЕНТА === */
.news-content,
.post-content {
  line-height: 1.6;
}

.news-content h1, .news-content h2, .news-content h3,
.post-content h1, .post-content h2, .post-content h3 {
  color: #4a90e2;
  margin: 15px 0 10px 0;
}

.news-content blockquote, .post-content blockquote {
  border-left: 4px solid #4a90e2;
  margin: 15px 0;
  padding: 10px 20px;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.news-content pre, .post-content pre {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 15px;
  margin: 15px 0;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

.news-content ul, .news-content ol,
.post-content ul, .post-content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.news-content li, .post-content li {
  margin: 5px 0;
}

.news-content a, .post-content a {
  color: #007bff;
  text-decoration: underline;
}

.news-content a:hover, .post-content a:hover {
  color: #0056b3;
}

/* === ПОЛЬЗОВАТЕЛЬСКИЕ ЭЛЕМЕНТЫ === */
.user-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-message {
  color: #000000;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* === КОМАНДА И МИССИЯ === */
.team-section {
  padding: 30px 0;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.team-member {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-left: 4px solid #4a90e2;
}

.team-member h3 {
  color: #4a90e2;
  margin-bottom: 10px;
  font-size: 1.4em;
}

.team-member p {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.mission-content {
  line-height: 1.7;
  margin: 20px 0;
}

.mission-languages {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 30px 0;
}

.language-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #4a90e2;
}

.language-section h3 {
  color: #4a90e2;
  margin-bottom: 15px;
  font-size: 1.3em;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.language-section p {
  margin-bottom: 12px;
  text-align: justify;
}

/* === ПАГИНАЦИЯ === */
#pagination {
  position: relative;
  z-index: 15;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* === СТАТУСНЫЕ ЭЛЕМЕНТЫ === */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  font-size: 1.1rem;
  color: #666;
}

.error-message {
  text-align: center;
  padding: 3rem;
  color: #dc3545;
  font-size: 1.1rem;
}

/* === ФУТЕР === */
footer {
  width: calc(100% - 10px);
  background: #ffffff;
  color: white;
  padding: 1rem 0;
  margin: 2rem 5px 0 5px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

footer .container {
  color: black;
  position: relative;
  z-index: 1;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
  header {
    min-height: 150px;
    padding: 0.5rem 0;
  }
  
  .logo-title {
    flex-direction: column;
    padding: 15px;
  }
  
  .site-logo {
    height: 80px;
  }
  
  .dropdown-menu ul {
    gap: 8px;
  }
  
  .dropdown-menu a {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .news-item,
  .news-card {
    width: 95%;
    padding: 1rem;
  }
  
  .post-title {
    font-size: 1.8rem;
  }
  
  main {
    min-height: 400px;
    padding: 15px 0;
  }
  
  main > .container {
    padding: 15px;
    border-radius: 15px;
  }
  
  #login-section,
  #logout-section,
  #featured-news {
    padding: 20px 15px;
    margin-bottom: 15px;
  }
  
  main > h3 {
    font-size: 1.5rem;
    padding: 12px 20px;
    margin: 15px 0;
  }
  
  #map-container {
    padding: 10px;
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  main {
    min-height: 300px;
  }
  
  main > .container {
    padding: 10px;
    border-radius: 12px;
  }
  
  #login-section,
  #logout-section,
  #featured-news {
    padding: 15px 10px;
  }
  
  main > h3 {
    font-size: 1.3rem;
    padding: 10px 15px;
  }
}

/* ========== МОБИЛЬНАЯ ФОРМА ВХОДА ========== */
/* Эти стили сработают только на экранах шириной ДО 768px (телефоны) */
@media screen and (max-width: 768px) {
    /* Делаем секцию входа компактнее */
    #login-section {
        padding: 10px !important;      /* Уменьшаем внутренние отступы */
        margin: 10px 0 !important;     /* Уменьшаем внешние отступы */
        max-width: 100% !important;    /* Растягиваем на всю ширину */
    }
    
    /* Уменьшаем заголовок "Log in" */
    #login-section h2 {
        font-size: 1.3rem !important;   /* Уменьшаем размер шрифта */
        margin-bottom: 10px !important;  /* Уменьшаем отступ снизу */
    }
    
    /* Располагаем поля ввода в ОДНУ ЛИНИЮ (горизонтально) */
    #login-form {
        display: flex !important;        /* Включаем flexbox */
        flex-wrap: wrap !important;      /* Разрешаем перенос если не влезут */
        gap: 8px !important;             /* Расстояние между элементами */
        align-items: flex-end !important; /* Выравниваем по нижнему краю */
    }
    
    /* Делаем группу с полем ввода компактнее */
    #login-form .form-group {
        flex: 1 1 auto !important;       /* Группы занимают место по содержимому */
        min-width: 120px !important;     /* Минимальная ширина чтобы не сжимались слишком */
        margin-bottom: 0 !important;      /* Убираем нижний отступ */
    }
    
    /* Уменьшаем сами поля ввода */
    #login-form input {
        padding: 6px 8px !important;     /* Уменьшаем внутренние отступы */
        font-size: 0.9rem !important;     /* Уменьшаем шрифт */
        height: 35px !important;          /* Фиксируем высоту */
        width: 100% !important;           /* На всю ширину группы */
    }
    
    /* Прячем подписи "User" и "Password" на телефонах */
    #login-form label {
        display: none !important;          /* Полностью скрываем */
    }
    
    /* Делаем кнопку входа компактнее */
    #login-form button {
        padding: 6px 12px !important;     /* Уменьшаем отступы внутри кнопки */
        font-size: 0.9rem !important;     /* Уменьшаем шрифт */
        height: 35px !important;          /* Такая же высота как у полей */
        white-space: nowrap !important;    /* Текст в одну строку */
        flex: 0 0 auto !important;         /* Кнопка не растягивается */
    }
    
    /* Для очень маленьких экранов (до 400px) */
    @media screen and (max-width: 400px) {
        /* Ставим поля друг под другом, но компактнее */
        #login-form {
            flex-direction: column !important;  /* В колонку */
            gap: 5px !important;                 /* Еще меньше отступ */
        }
        
        #login-form .form-group {
            width: 100% !important;              /* На всю ширину */
        }
        
        #login-form button {
            width: 100% !important;               /* Кнопка на всю ширину */
        }
    }
}

/* ===== КОМПАКТНАЯ ПАНЕЛЬ ВХОДА ===== */
.auth-compact {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.auth-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0099ff;
    color: white;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.auth-toggle:hover {
    background: #0008ff;
    transform: scale(1.1);
}

.auth-panel {
    position: absolute;
    top: 60px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.auth-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .auth-compact {
        top: 10px;
        right: 10px;
    }
    
    .auth-panel {
        width: 250px;
        right: 0;
    }
}

/* Стили для форм внутри панели */
.auth-panel h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

.auth-panel .form-group {
    margin-bottom: 12px;
}

.auth-panel label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #666;
}

.auth-panel input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.auth-panel button {
    width: 100%;
    padding: 10px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.auth-panel button:hover {
    background: #1e3c21;
}

/* Стили для информации о пользователе */
.auth-panel .user-info {
    text-align: center;
}

.auth-panel .welcome-message {
    margin-bottom: 15px;
    color: #333;
}

.auth-panel .user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-panel .user-actions button,
.auth-panel .user-actions a {
    width: 100%;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-panel .user-actions button {
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
}

.auth-panel .user-actions button:hover {
    background: #c82333;
}

.auth-panel .user-actions a {
    background: #007bff;
    color: white;
    display: inline-block;
}

.auth-panel .user-actions a:hover {
    background: #0056b3;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-panel.visible {
    animation: fadeIn 0.3s ease forwards;
}

/* Индикатор состояния (для будущего использования) */
.auth-status {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffc107;
    border: 2px solid white;
}

.auth-status.logged-in {
    background: #28a745;
}

/* ===== ОПТИМИЗАЦИЯ ЦЕНТРИРОВАНИЯ ЛЕНТЫ НОВОСТЕЙ ===== */

/* Контейнер для ленты новостей */
#news-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Карточки новостей */
.news-item,
.news-card {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .news-item,
    .news-card {
        max-width: 700px;
        padding: 20px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    #news-container {
        padding: 0 15px;
    }
    
    .news-item,
    .news-card {
        max-width: 100%;
        margin: 15px auto;
        padding: 18px;
        border-radius: 10px;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    #news-container {
        padding: 0 10px;
    }
    
    .news-item,
    .news-card {
        margin: 12px auto;
        padding: 15px;
        border-radius: 8px;
    }
}

/* Центрирование заголовков секций новостей */
#featured-news h3,
.news-section-title {
    text-align: center;
    width: 100%;
    margin: 20px auto;
    max-width: 800px;
}

/* Центрирование контейнера с новостями внутри main */
main #news-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Улучшение отображения на больших экранах */
@media (min-width: 1400px) {
    #news-container {
        max-width: 1400px;
    }
    
    .news-item,
    .news-card {
        max-width: 900px;
    }
}