:root {
  --bg-color: #090909;
  --text-color: #f0f0f0;
  --accent: #1db954;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

/* ----- HEADER ----- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 30px;
  background: #111;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--accent);
}

.logo img {
  max-width: 120px;
  height: unset;
}

/* ----- SEARCH BAR ----- */
.search-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin-left: 2rem;
  margin-right: 2rem;
}

.search-field {
  position: relative;
  width: 100%;
}

.search-field input {
  width: 100%;
  padding: 0.5rem 4rem 0.5rem 1rem;
  background: #222;
  border: 1px solid #333;
  color: var(--text-color);
  border-radius: 4px;
  font-size: 1rem;
}

.search-label {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--accent);
  /* pointer-events: none;*/
  opacity: 0.6;
}

.search-label {
  cursor: pointer;
  color: #fff;
  padding: 0.3rem 0.8rem;
  background-color: #444;
  border-radius: 4px;
  margin-left: 0.5rem;
  transition: background-color 0.3s;
  user-select: none;
}

.search-label:hover {
  background-color: #666;
}

/* ----- SINGLE POST ------ */
.single-post {

  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.embed {
  display: block;
  margin: 20px auto;
  background: #000;
  max-width: 1100px;
  aspect-ratio: 1130 / 636;
  border-radius: 20px;
  overflow: hidden;
}

.post-title {
  font-size: 1.5rem;
  font-weight: lighter;
  margin: 1.5rem 0 1rem;
  color: var(--text-color);
  text-align: left;
}

.post-meta {
  justify-content: space-between;
  align-items: normal;
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 2rem;
  gap: 1rem;
}
.post-meta a{
  color: #1cb752 !important;
}

.post-date,
.post-views {
  white-space: nowrap;
}

.h2 {
  text-align: center;
  background-color: #111;
  padding: 15px;
  border-radius: 5px;
  color: #1cb752;
}

.models_room ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.models_room ul li {
  background-color: #1cb752;
  border-radius: 4px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.models_room ul li a {
  display: block;
  padding: 6px 12px;
  color: #000;
  text-decoration: none;
  font-weight: lighter;
  transition: color 0.3s ease;
  border-radius: 4px;
  font-size: 13px;
}

/* Ефект при наведенні */
.models_room ul li:hover {
  background-color: #159e43;
  transform: translateY(-3px);
}

.models_room ul li:hover a {
  color: #000;
}

.single-post.text {
  padding: 30px 0;
}
.single-post.text a{
  color:#1cb752
}
.single-post.text p {
  padding: 5px 0;
}

@media (max-width: 1100px) {
  .single-post {
    padding: 0 15px;
  }
}

/* Для мобільних: дата і перегляди в колонку */
@media (max-width: 600px) {
  .post-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .post-title {
    font-size: 1rem;
    text-align: center;
  }



}

/* ----- NAVIGATION MENU ----- */
.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--accent);
}

.close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
}

.hamburger {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
}

/* ----- POST GRID ----- */
.post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 30px;
  justify-content: left;
  /* Центрування при 1–2 блоках */
}

.post-grid.profile {
  padding-top: 0;
}

.post {
  background: #111;
  padding: 10px;
  border-radius: 6px;
  transition: transform 0.3s;

  flex: 1 1 320px;
  /* дозволяє рости, але мінімум 220px */
  max-width: 350px;
  /* обмеження зростання */
}

.post.small {
  flex: 1 1 200px;
  max-width: 250px;
}

.post:hover {
  /* Можна додати невелике збільшення всього поста, якщо хочеш */
  transform: translateY(-5px);
}

.thumb {
  position: relative;
  /* для loader */
  border-radius: 4px;
  overflow: hidden;
  /* обрізаємо масштабовану картинку по радіусу */
  aspect-ratio: 3 / 2;
  /* бажаний пропорційний розмір блоку */
  background: #222;
  /* фон під час загрузки */
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.5s ease;
  border-radius: 4px;
  opacity: 0;
  /* за замовчуванням сховано */
  display: block;
}

.thumb img.loaded {
  opacity: 1;
}

.post:hover .thumb img.loaded {
  transform: scale(1.1);
}


.thumb .loader {
  position: absolute;
  inset: 0;
  background: #222;
  /* схожий на фон */
  color: #aaa;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.thumb .loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.post .title {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: #eee;
  /* щоб було видно на темному фоні */
}

.meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 0.5rem;
}


/* ----- FOOTER ----- */
.site-footer {
  padding: 2rem 30px;
  background: #111;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pagination a {
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border: 1px solid #333;
  border-radius: 4px;
  text-decoration: none;
}

.pagination span {
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border: 1px solid #333;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a.active,
.pagination a:hover {
  background: var(--accent);
  color: #000;
}

.footer-info p {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.footer-info ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-info a {
  color: #aaa;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-info a:hover {
  color: var(--accent);
}

.post-title.profile {
  padding: 0 30px;
}

/* ----- MOBILE STYLES ----- */
@media (max-width: 768px) {
  .logo img {
    margin: 0 auto;
  }

  .post {
    max-width: 100%;
  }

  .post.small {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    background-color: rgba(9, 9, 9, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    z-index: 1000;
  }

  .main-nav.active {
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1.2rem;
  }

  .close-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
  }

  .hamburger {
    display: block;
  }

  .search-toggle {
    margin-top: 0;
    flex-wrap: wrap;
  }
}

/* ----- DESKTOP ONLY ----- */
@media (min-width: 769px) {
  .close-btn {
    display: none;
  }

  .hamburger {
    display: none;
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-toggle {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    margin-left: 0;
    margin-right: 0;
  }

  .search-field {
    flex: 1;
  }

  .hamburger {
    align-self: flex-start;
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .post.small {
    flex: 1 1 400px;
    max-width: 450px;
  }
}

#age-check-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-check-modal {
  max-width: 90%;

  border-radius: 8px;
  padding: 30px;
  text-align: center;

}

.age-18-icon {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
}

#confirm-button {
  background-color: darkred;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* плавний перехід */
}

#confirm-button.active {
  background-color: red;
  /* яскраво червоний при активному чекбоксі */
}

label {
  display: flex;
  font-size: 16px;
  text-align: left;
  width: max-content;
  margin: 20px auto;
}

input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

#confirm-button {
  background: darkred;
  color: white;
}

#cancel-button {
  background: #333;
  color: white;
}

body.age-check-lock {
  overflow: hidden;
}