/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0e0e0e;
  color: #f2f2f2;
  line-height: 1.6;
  padding: 20px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #1a1a1a;
  padding: 40px;
  border: 2px solid #ff007f;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #fff;
}

.age-buttons button {
  background-color: #ff007f;
  color: white;
  padding: 10px 20px;
  margin: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.age-buttons button:hover {
  background-color: #cc0066;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

nav a {
  color: #ff66a5;
  margin-left: 20px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 50px;
}

.hero h2 {
  font-size: 2em;
  color: #ffaad4;
}

/* Gallery Preview */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.gallery-card {
  background-color: #1c1c1c;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.gallery-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}

.gallery-card button {
  background-color: #ff007f;
  color: white;
  padding: 10px 15px;
  margin-top: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.gallery-card button:hover {
  background-color: #cc0066;
}

/* Footer */
footer {
  text-align: center;
  color: #999;
  padding-top: 40px;
  font-size: 0.9em;
}
/* Layout with Sidebar */
.main-layout {
  display: flex;
  flex-wrap: wrap;
}

/* Sidebar Styles */
.sidebar {
  width: 220px;
  background-color: #111;
  padding: 30px 20px;
  color: #fff;
  height: 100%;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar h3 {
  margin-bottom: 20px;
  font-size: 1.2em;
  color: #ff66a5;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin: 12px 0;
}

.sidebar a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.sidebar a:hover {
  color: #ff66a5;
}

/* Main gallery area */
.gallery-main {
  flex: 1;
  padding: 40px 30px;
  background-color: #1a1a1a;
}

/* Responsive: move sidebar on top in mobile view */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
    padding: 20px;
    text-align: center;
  }

  .gallery-main {
    padding: 20px;
  }

  .sidebar ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sidebar li {
    margin: 5px 10px;
  }
}
/* Register Modal Styling */
#register-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#register-modal .modal-content {
  background: #1a1a1a;
  padding: 30px;
  border: 2px solid #ff007f;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: #fff;
}

#register-modal input {
  width: 90%;
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  border: none;
}

#register-modal button {
  background-color: #ff007f;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

#register-modal button:hover {
  background-color: #cc0066;
}
/* Login Modal Styling */
#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#login-modal .modal-content {
  background: #1a1a1a;
  padding: 30px;
  border: 2px solid #ff007f;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: #fff;
}

#login-modal input {
  width: 90%;
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  border: none;
}

#login-modal button {
  background-color: #ff007f;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

#login-modal button:hover {
  background-color: #cc0066;
}
.sidebar h4 {
  margin-top: 1.5em;
  color: #ff66a5;
  font-size: 1.1em;
}
.sidebar ul li a {
  color: #eee;
  text-decoration: none;
}
.sidebar ul li a:hover {
  text-decoration: underline;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #1a1a1a;
  color: #eee;
}
th, td {
  padding: 12px;
  border: 1px solid #333;
}
th {
  background-color: #222;
}
tr:nth-child(even) {
  background-color: #181818;
}

/* Миниатюра изображения */
.card img {
  max-width: 100%;
  max-height: 250px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  background-color: #1a1a1a; /* для пустот вокруг узких картинок */
  border-radius: 6px;
}


/* Заголовок под картинкой */
.card h4 {
  margin-top: 8px;
  font-size: 1em;
  color: #eee;
}

/* Сетка для контента на главной */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.content-section {
  margin-bottom: 50px;
}

.see-all {
  display: inline-block;
  margin-top: 10px;
  color: #ff66a5;
  text-decoration: none;
  font-weight: bold;
}
.see-all:hover {
  text-decoration: underline;
}
.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
  gap: 10px;
  max-width: 500px;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #222;
  color: #fff;
  width: 100%;
}

.search-form button {
  padding: 10px 16px;
  background-color: #ff66a5;
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.content-section {
  background-color: #111;
  padding: 30px;
  margin: 30px 0;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(255, 102, 165, 0.2);
}

.content-section h2 {
  font-size: 1.4em;
  margin-bottom: 20px;
  color: #fff;
  border-left: 4px solid #ff66a5;
  padding-left: 10px;
}

.card {
  background-color: #1e1e1e;
  border: 2px solid #ff66a5;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 15px rgba(255, 102, 165, 0.4);
}



.card h4 {
  padding: 10px;
  font-size: 0.9em;
  color: #eee;
}

.see-all {
  display: inline-block;
  margin-top: 10px;
  color: #ff66a5;
  font-weight: bold;
  text-decoration: none;
}

.see-all:hover {
  text-decoration: underline;
}

.main-layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 100%;
}

.sidebar {
  flex-shrink: 0;
  width: 220px;
}

.homepage-sections {
  flex: 1;
  padding: 30px;
}

/* Адаптив — скрыть сайдбар на мобилке */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-layout {
    flex-direction: column;
  }

  .homepage-sections {
    padding: 20px;
  }
}
/*Mobile things*/ 
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .search-form {
    width: 100%;
    max-width: none;
    padding: 0 20px;
    margin: 10px 0;
  }

  .search-form input[type="text"] {
    font-size: 1em;
    padding: 12px;
  }

  .search-form button {
    font-size: 1em;
    padding: 12px 16px;
  }

  nav#guest-nav, nav#user-nav {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
  }

  h1 {
    font-size: 1.8em;
    padding-left: 20px;
  }
}

/* Скрываем кнопку на десктопе, показываем на телефоне */
#menu-toggle {
  display: none; /* скрыт по умолчанию */
}

@media (max-width: 768px) {
  #menu-toggle {
    display: block;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000;
    background: #ff66a5;
    color: white;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }

  .sidebar.open {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    width: 220px;
    height: calc(100% - 60px);
    background: #111;
    overflow-y: auto;
    z-index: 2000;
    padding: 20px;
    animation: slide-in 0.3s ease forwards;
  }
}
#menu-toggle {
  right: 20px;
  left: auto;
}


  @keyframes slide-in {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translateX(0);
    }
  }
}
.pagination {
  text-align: center;
  margin: 40px 0;
  font-size: 1em;
}

.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background-color: #1a1a1a;
  color: #ff66a5;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #ff66a5;
  transition: background 0.3s, color 0.3s;
}

.pagination a:hover {
  background-color: #ff66a5;
  color: #fff;
}

.pagination .current {
  background-color: #ff66a5;
  color: #fff;
  border: none;
}

.pagination .dots {
  color: #888;
  padding: 8px;
}
.image-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  color: #f0f0f0;
}

.image-container {
  max-width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(255, 102, 165, 0.3);
  background: #111;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.image-details {
  max-width: 800px;
  text-align: center;
  margin-bottom: 50px;
}

.image-details h1 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

.image-details .category {
  color: #ccc;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.image-details .description {
  font-size: 1em;
  color: #ddd;
  line-height: 1.5;
}

.likes {
  margin-top: 20px;
}

.like-button {
  background-color: #ff66a5;
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

#like-count {
  margin-left: 10px;
  color: #ccc;
}

.related-section {
  margin-top: 50px;
  background: #111;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(255, 102, 165, 0.2);
}

.related-section h2 {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #fff;
  border-left: 4px solid #ff66a5;
  padding-left: 10px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.related-grid .card {
  background-color: #1a1a1a;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #ff66a5;
  transition: transform 0.3s;
}

.related-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 15px rgba(255, 102, 165, 0.3);
}

.related-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.related-grid h4 {
  margin-top: 10px;
  font-size: 0.9em;
  color: #eee;
}

@media (max-width: 768px) {
  .image-container {
    max-height: 65vh;
  }
  .image-details h1 {
    font-size: 1.3em;
  }
  .image-details .description {
    font-size: 0.95em;
  }
  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
/* --- Comment Section (image.php) --- */

.share-section {
  margin: 40px auto;
  text-align: center;
  color: #fff;
}

.share-section .share-buttons a {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background-color: #1a1a1a;
  color: #ff66a5;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.share-section .share-buttons a:hover {
  background-color: #ff66a5;
  color: #fff;
}

/* Like button */
.like-container {
  margin-top: 20px;
  text-align: center;
}

.like-button {
  background-color: #ff66a5;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s;
}

.like-button:hover {
  transform: scale(1.05);
}

.like-count {
  display: block;
  margin-top: 6px;
  color: #ccc;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .comment-section,
  .share-section {
    padding: 20px;
  }

  .like-button {
    width: 100%;
  }
}
.image-container {
  max-height: 85vh;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #111;
  border-radius: 16px;
  padding: 10px;
}
.image-page-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 40px 0;
}

.image-left {
  flex: 2;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.image-box {
  max-width: 100%;
  max-height: 80vh;
  overflow: hidden;
  background: #111;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 102, 165, 0.15);
}

.image-box img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.image-right {
  flex: 1;
  min-width: 300px;
  background: #1a1a1a;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 102, 165, 0.1);
}

.image-right h1 {
  font-size: 1.8em;
  color: #ff66a5;
  margin-bottom: 10px;
}

.image-right .description {
  margin-top: 15px;
  line-height: 1.5;
}

.share-section {
  margin-top: 25px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-buttons a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background-color: #222;
  border-radius: 8px;
  color: #ff66a5;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.share-buttons a:hover {
  background-color: #ff66a5;
  color: #fff;
}

.share-buttons img {
  width: 20px;
  height: 20px;
}

/* Like section already exists */

/* Mobile Responsive */
@media (max-width: 768px) {
  .image-page-layout {
    flex-direction: column;
  }

  .image-box img {
    max-height: 300px;
  }

  .image-right {
    width: 100%;
    margin-top: 30px;
  }

  .share-buttons {
    flex-direction: column;
  }
}
.premium-blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.card {
  position: relative;
  overflow: hidden;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  pointer-events: none;
}
.blurred-image-container {
  position: relative;
  display: inline-block;
}

.blurred-image-container img.blurred {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}

.blurred-image-container .overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}
.blurred img,
img.blurred {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.premium-lock {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
}
.card {
  position: relative;
}
.premium-lock-page {
  text-align: center;
  margin: 100px auto;
  padding: 40px;
  font-size: 24px;
  color: #fff;
  background: #1a1a1a;
  border: 2px solid #ff66a5;
  max-width: 600px;
  border-radius: 15px;
}
.image-wrapper {
  position: relative;
  display: inline-block;
}

.locked-image {
  filter: blur(6px);
  pointer-events: none;
}

.locked-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 15px;
  font-weight: bold;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
.premium-wrapper {
  position: relative;
  display: inline-block;
}

.premium-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ff66a5, #7ac3ff);
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  animation: pulse 2s infinite;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,102,165,0.5);
}

@keyframes pulse {
  0%   { transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.05); }
  100% { transform: translateX(-50%) scale(1); }
}
.image-container {
  position: relative;
  display: inline-block;
}

.premium-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, #ff66a5, #7ac3ff);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  animation: pulse 2s infinite;
  box-shadow: 0 0 14px rgba(255,102,165,0.6);
  pointer-events: none;
}

@keyframes pulse {
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.carousel {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
  height: 6px;
}
.carousel::-webkit-scrollbar-thumb {
  background: #ff66a5;
  border-radius: 4px;
}

.carousel .card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  min-width: 220px;
  max-width: 220px;
}

/* Кнопка "See all" */
.see-more-link {
  color: #ff66a5;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 10px;
}
@media (max-width: 600px) {
  .carousel .card {
    min-width: 90%;
    max-width: 90%;
    margin: 0 auto;
  }
}
.carousel .image-card {
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 220px;
  scroll-snap-align: center;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .carousel .image-card {
    min-width: 90%;
    max-width: 90%;
  }
}
.carousel {
  max-width: 100%;
  overflow-x: auto;
  display: flex;
  gap: 16px;
  scroll-snap-type: x mandatory;
  padding: 10px 0;
}
body {
  overflow-x: hidden;
}