:root {
  --bg-color: #0a202b;
  --text-color: #1182a5;
  --accent: #1182a5 ;
}

* {
  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: #04141c;
  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: #04141c;
  border: 1px solid #1f5772;
  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: #1f5772;
  border-radius: 4px;
  margin-left: 0.5rem;
  transition: background-color 0.3s;
  user-select: none;
  border: none;
}

.search-label:hover {
  background-color: #2779a2;
}

/* ----- 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: #2eb5df !important;
}

.post-date,
.post-views {
  white-space: nowrap;
}

.h2 {
  text-align: center;
  background-color: #04141c;
  padding: 15px;
  border-radius: 5px;
  color: #2eb5df;
}

.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: #2eb5df;
  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:#2eb5df
}
.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-grid.search{
  text-align: center;
}

.post-grid.search a{
  color: var(--accent);
  text-decoration: none;
}
.post {
  background: #04141c;
  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: #0a202b;
  /* схожий на фон */
  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: #04141c;
  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 #1182a5;
  border-radius: 4px;
  text-decoration: none;
}

.pagination span {
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border: 1px solid #1182a5;
  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 --------- */

    .age-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(10, 32, 43, 0.95);
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .age-modal {
        background: #04141c;
        color: #fff;
        padding: 40px;
        border-radius: 12px;
        text-align: center;
        max-width: 500px;
        width: 90%;
        text-align: center;
        font-size: 14px;
    }

    .age-circle {
        width: 100px;
        height: 100px;
        background: #0f7a9c;
        color: #000;
        font-size: 32px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto 20px;
    }



    .age-options label {
        display: block;
        margin: 10px 0;
        cursor: pointer;
    }

    .age-options {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Кожен пункт */
    .opt {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: max-content;
        margin: 0 auto;
    }


    .age-buttons {
        display: flex;
        justify-content: center;
        gap: 20px;
    }

    .age-buttons button {
        background: #777;
        border: none;
        padding: 7px 18px;
        border-radius: 6px;
        cursor: pointer;
        color: white;
        transition: 0.2s;
    }

    .age-buttons button:hover {
        background: #0f7a9c;
    }


    .age-buttons button.active {
        background: #0f7a9c !important;
    }

    /* ------- and age --------- */
  @media all and (max-width: 655px) {
        .opt {
            display: flex;
            gap: 10px;

            margin-top: unset;
        }

        .age-modal {

            margin: 10px;
        }
    }