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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f5f5;
  color: #333;
  padding-top: 90px;
}

/* Фиксированная шапка */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 15px 0;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo i {
  font-size: 28px;
}

.logo h1 {
  font-size: 24px;
  font-weight: 600;
}

/* Контейнер фильтра */
.tag-filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.9;
}

.tag-filter {
  flex: 1;
  padding: 8px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.tag-filter:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.tag-filter:focus {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.tag-filter option {
  background: #764ba2;
  color: white;
}

.clear-filter {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.clear-filter:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Информация о боте */
.bot-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.9;
  padding: 5px 0;
}

/* Основная лента */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.media-feed {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Карточка медиа */
.media-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.media-content {
  width: 100%;
  height: auto;
  /* max-height: 600px; */
  max-height: calc(100vh - 200px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.media-content img {
  width: 100%;
  height: auto;
  /* max-height: 600px; */
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
}

.media-content video {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
}

.media-info {
  padding: 20px;
  border-top: 1px solid #eee;
}

.meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.date i {
  color: #667eea;
}

.type-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #eef2ff;
  color: #667eea;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #e0e7ff;
}

/* .tag:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
} */

/* Загрузка */
.loading,
.no-more {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.no-more-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.no-more-content i {
  font-size: 48px;
  color: #667eea;
  opacity: 0.7;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  color: #667eea;
  background: rgba(255, 255, 255, 0.9);
}

.modal-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000;
  max-height: 70vh;
  overflow: hidden;
}

.modal-media img,
.modal-media video {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-info {
  padding: 20px;
  background: white;
  border-top: 1px solid #eee;
}

.modal-date {
  color: #666;
  margin-bottom: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Адаптивность */
@media (max-width: 850px) {
  .header-content {
    padding: 0 15px;
  }

  .main {
    padding: 15px;
  }

  .media-content {
    /* max-height: 500px; */
    max-height: calc(100vh - 100px);
  }

  .media-content img,
  .media-content video {
    /* max-height: 500px; */
    max-height: calc(100vh - 100px);
  }
}

@media (max-width: 600px) {
  body {
    padding-top: 90px;
  }

  .header-content {
    gap: 10px;
  }

  .logo h1 {
    font-size: 20px;
  }

  .tag-filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-header {
    justify-content: center;
  }

  .bot-info {
    justify-content: center;
    text-align: center;
  }

  .media-content {
    /* max-height: 400px; */
    max-height: calc(100vh - 100px);
  }

  .media-content img,
  .media-content video {
    /* max-height: 400px; */
    max-height: calc(100vh - 100px);
  }

  .media-info {
    padding: 15px;
  }

  .meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .media-content {
    /* max-height: 300px; */
    max-height: calc(100vh - 100px);
  }

  .media-content img,
  .media-content video {
    /* max-height: 300px; */
    max-height: calc(100vh - 100px);
  }
}

/* Плашка подтверждения возраста */
.age-verification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.age-verification-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.age-icon {
  font-size: 60px;
  color: #ff6b6b;
  margin-bottom: 20px;
}

.age-verification h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 28px;
}

.age-message {
  color: #666;
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.age-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.age-confirm-btn,
.age-decline-btn {
  padding: 16px 30px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.age-confirm-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.age-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.age-decline-btn {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e9ecef;
}

.age-decline-btn:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.age-notice {
  color: #888;
  font-size: 14px;
  line-height: 1.4;
}

.terms-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Блюр поверх контента */
.content-blur {
  filter: blur(20px);
  opacity: 0.3;
  pointer-events: none;
  transition: all 0.5s ease;
  min-height: 100vh;
}

.content-blur.age-confirmed {
  filter: blur(0);
  opacity: 1;
  pointer-events: all;
}

/* Адаптивность для плашки возраста */
@media (max-width: 600px) {
  .age-verification-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .age-icon {
    font-size: 48px;
  }

  .age-verification h2 {
    font-size: 24px;
  }

  .age-message {
    font-size: 16px;
  }

  .age-confirm-btn,
  .age-decline-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}