/* Sidebar styles for mobile */
.sidebar-toggle {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: #2e8bc0;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1.5rem;
  z-index: 100;
  cursor: pointer;
}
.sidebar {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 70vw;
  max-width: 320px;
  height: 100vh;
  background: #142850;
  color: #fff;
  box-shadow: -2px 0 16px rgba(46,139,192,0.2);
  z-index: 9999;
  flex-direction: column;
  padding: 2rem 1rem 1rem 1rem;
  transition: transform 0.3s;
}
.sidebar.open {
  display: flex;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.sidebar ul li {
  margin-bottom: 1.2rem;
}
.sidebar ul li a {
  color: #ffd600;
  font-size: 1.2rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.sidebar ul li a:hover {
  color: #fff;
}
.sidebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #ffd600;
  font-size: 2rem;
  cursor: pointer;
}
.album-open-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  background: #ffd600;
  color: #142850;
  box-shadow: 0 2px 8px rgba(46,139,192,0.08);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.album-open-btn:hover {
  background: #ffab00;
  color: #fff;
  transform: scale(1.05);
}
body.dark-mode .album-open-btn {
  background: #222;
  color: #ffd600;
}
.gallery-title {
  width: 100%;
  text-align: center;
  font-size: 2.2rem;
  font-weight: bold;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  z-index: 2;
  position: relative;
}
.gallery-title .peshika {
  color: #2e8bc0;
  font-weight: bold;
  letter-spacing: 2px;
}
.gallery-title .gallery {
  font-weight: bold;
  margin-left: 0.5rem;
}
.rainbow {
  background: linear-gradient(90deg, #ff0057, #fffa00, #00ff85, #00cfff, #a700ff, #ff0057);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowText 3s linear infinite;
}
@keyframes rainbowText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.social-bar {
  position: absolute;
  top: 10px;
  right: 24px;
  display: flex;
  gap: 10px;
  z-index: 3;
}
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #27496d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(46,139,192,0.2);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.social-btn i {
  pointer-events: none;
}
.social-btn.fb { background: #1877f2; }
.social-btn.wa { background: #25d366; }
.social-btn.tk { background: #010101; }
.social-btn:hover { transform: scale(1.1); }
.modal-tip {
  color: #fff;
  background: rgba(46,139,192,0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: center;
}
.hq-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #142850ee;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(46,139,192,0.4);
  z-index: 2000;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.hq-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.hq-img-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hq-nav-btn {
  background: #2e8bc0;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hq-nav-btn:hover {
  background: #145da0;
}
#hqImg {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 0.5rem;
  box-shadow: 0 2px 16px rgba(46,139,192,0.3);
  margin-bottom: 1rem;
}
body {
  background: #fff;
  color: #142850;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}
body.dark-mode {
  background: linear-gradient(135deg, #0a2342 60%, #2e8bc0 100%);
  color: #eaf6fb;
}
header {
  background: #142850;
  padding: 1rem 0 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
  min-height: 80px;
}
.header-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.1) 40%, rgba(20,40,80,0.0) 100%);
  z-index: 0;
  pointer-events: none;
}
.logo-bar {
  position: absolute;
  top: 8px;
  left: 16px;
  display: flex;
  gap: 12px;
  z-index: 2;
}
.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(46,139,192,0.2);
  object-fit: cover;
}
.animate-logo {
  animation: floatLogo 2.5s infinite ease-in-out;
}
.animate-logo2 {
  animation: floatLogo2 2.5s infinite ease-in-out;
}
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px) scale(1.08); }
}
@keyframes floatLogo2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px) scale(1.08); }
}
nav {
  display: flex;
  justify-content: center;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: #eaf6fb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #2e8bc0;
}
main {
  padding: 2rem;
  flex: 1 0 auto;
}
.albums {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.album-block {
  background: #f5f8fa;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(46,139,192,0.08);
  padding: 1rem;
  width: 260px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #142850;
}
body.dark-mode .album-block {
  background: #27496d;
  color: #eaf6fb;
  box-shadow: 0 4px 16px rgba(46,139,192,0.2);
}
.album-block:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(46,139,192,0.4);
}
.album-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #2e8bc0;
}
.album-preview {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(46,139,192,0.2);
}
footer {
  background: #142850;
  padding: 1rem 0;
  text-align: center;
  position: sticky;
  bottom: 0;
  width: 100%;
  left: 0;
  z-index: 100;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.footer-links a {
  color: #eaf6fb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #2e8bc0;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(10,35,66,0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.modal-content {
  position: relative;
  margin: 2rem auto;
  background: #27496d;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 32px rgba(46,139,192,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
  min-height: 320px;
}
.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  width: 80vw;
  max-width: 900px;
  margin-bottom: 1rem;
}
.modal-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(46,139,192,0.2);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.3s;
  filter: blur(12px) grayscale(0.3) brightness(0.7);
}
.modal-grid img.loaded {
  filter: none;
  transition: filter 0.3s;
}
.modal-grid img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(46,139,192,0.4);
}
.skeleton {
  background: linear-gradient(90deg, #eaf6fb 25%, #cfd8dc 50%, #eaf6fb 75%);
  border-radius: 0.5rem;
  width: 100%;
  height: 120px;
  animation: skeleton-loading 1.2s infinite linear;
}
@keyframes skeleton-loading {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.modal-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal-controls button {
  background: #2e8bc0;
  color: #eaf6fb;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-controls button:hover {
  background: #145da0;
}
.close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  color: #eaf6fb;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}
.modal-thumbnails {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.modal-thumbnails img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 0.3rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s;
}
.modal-thumbnails img.selected {
  border: 2px solid #2e8bc0;
}
@media (max-width: 700px) {
  .sidebar-toggle {
    top: 40%;
  }
  .sidebar {
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    box-shadow: -4px 0 24px rgba(46,139,192,0.18);
    background: linear-gradient(135deg, #142850 80%, #2e8bc0 100%);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    padding-top: 2.5rem;
  }
  .header-logo {
    border-radius: 0;
  }
  .sidebar {
    top: 10%;
  }
  .logo-bar {
    top: 18px;
    left: 8vw;
    gap: 8px;
  }
  .header-logo {
    width: 24px;
    height: 24px;
  }
  .social-bar {
    top: 4px;
    right: 4px;
    gap: 4px;
  }
  .social-btn {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
  .nav-links {
    display: none;
  }
  .sidebar-toggle {
    display: block;
  }
  .footer-links {
    gap: 1rem;
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }
  footer {
    padding: 0.5rem 0;
  }
  .gallery-title {
    font-size: 1.3rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
  }
  .social-bar {
    top: 6px;
    right: 8px;
    gap: 6px;
  }
  .social-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  .albums {
    gap: 1rem;
  }
  .album-block {
    width: 90vw;
    padding: 0.5rem;
    align-items: stretch;
  }
    .hq-modal {
      min-width: 90vw;
      max-width: 98vw;
      padding: 0.5rem;
    }
    .hq-img-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      position: relative;
    }
    #hqImg {
      max-width: 70vw;
      max-height: 60vh;
      margin: 0 8px;
      display: block;
    }
    .hq-nav-btn {
      width: 36px;
      height: 36px;
      font-size: 1.4rem;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: #ffd600;
      color: #222;
      z-index: 2;
      opacity: 0.85;
      box-shadow: 0 2px 8px rgba(46,139,192,0.08);
    }
    .hq-nav-btn:first-child {
      left: 0;
    }
    .hq-nav-btn:last-child {
      right: 0;
    }
    .modal-grid {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 0.7rem;
      width: 98vw;
      max-width: 98vw;
    }
  }
  .modal-content {
    min-width: 90vw;
    min-height: 320px;
  }
  .hq-modal {
    min-width: 90vw;
    max-width: 98vw;
    padding: 0.5rem;
  }
  #hqImg {
    max-width: 90vw;
    max-height: 60vh;
  }
  .hq-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}
