* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body.fixed {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
body {
    background-color: #1a1a1a;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}
.rll, .logo-mob, .mob-info{display: none}
.hamburger {
  display:inline-block;
  vertical-align: top;
  cursor:pointer;
  transition-property:opacity,filter;
  transition-duration:.25s;
  transition-timing-function:linear;
  overflow:visible;
  opacity:1;
  z-index: 99999;
  margin:3px 0 0 20px;
}
.hamburger:hover {opacity:1;}
.hamburger-box {
  width:34px;
  height:30px;
  display:inline-block;
  position:relative;
}
.hamburger-inner {
  display:block;
  top:50%;
  margin-top:-2px;
}
.hamburger-inner,.hamburger-inner::before,.hamburger-inner::after {
  width:36px;
  height:5px;
  background-color:#fff;
  border-radius:4px;
  position:absolute;
  transition-property:transform;
  transition-duration:.25s;
  transition-timing-function:ease;
}
.hamburger-inner::before,.hamburger-inner::after {
  content:"";
  display:block;
}
.hamburger-inner::before {top:-12px;}
.hamburger-inner::after {bottom:-12px;}
.hamburger--3dxy .hamburger-box {perspective:80px;}
.hamburger--3dxy .hamburger-inner {transition:transform .25s cubic-bezier(0.645,0.045,0.355,1),background-color 0 .1s cubic-bezier(0.645,0.045,0.355,1);}
.hamburger--3dxy .hamburger-inner::before,.hamburger--3dxy .hamburger-inner::after {transition:transform 0 .1s cubic-bezier(0.645,0.045,0.355,1);}
.hamburger--3dxy.is-active .hamburger-inner {background-color:transparent;transform:rotateX(180deg) rotateY(180deg);}
.hamburger--3dxy.is-active .hamburger-inner::before {transform:translate3d(0,12px,0) rotate(45deg);}
.hamburger--3dxy.is-active .hamburger-inner::after {transform:translate3d(0,-12px,0) rotate(-45deg);}
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #333;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.filter-container {
    display: flex;
    gap: 10px;
}

.filter-container select {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #777;
}

.auth-buttons {
    display: flex;
    gap: 5px;
}

.vote-btn {
    position: fixed;
    top: calc(70px + 2px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4444;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s;
}

.vote-btn:hover {
    background-color: #cc3333;
}

.admin-section, .profile-section {
    display: none;
    padding: 70px 10px;
    text-align: center;
    min-height: 100vh;
    visibility: hidden;
}

.admin-section.active, .profile-section.active {
    display: block !important;
    visibility: visible !important;
    z-index: 100;
}

.admin-section table, .profile-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.admin-section th, .admin-section td, .profile-section th, .profile-section td {
    border: 1px solid #555;
    padding: 10px;
}

.sortable {
    cursor: pointer;
}

.sortable:hover {
    background-color: #444;
}

.pagination {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#image-search {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
}

.category-management, .category-settings, .duel-category-settings {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.category-management div, .category-settings select, .duel-category-settings select {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.duel-category-settings select[multiple] {
    height: 150px;
    width: 200px;
}

#voting-history-message {
    margin: 20px 0;
    font-size: 16px;
    color: #888;
}

.gallery-section {
    display: none;
    padding: 120px 0 10px 10px;
}

.gallery-section.active {
    display: block;
}

.gallery {
    display: block
}

.gallery-image-container {
    position: relative;
   width: 100%;
   margin-bottom: 5px;
}
.masonry-item {
  width: calc(100% / 4 - 10px); /* Adjust for responsive width */
}
.gallery-ad-container{
  position: relative;
  display: inline-block;
  width: 100%;
  padding-bottom: 74.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
  height: 0;
  overflow: hidden;
  border-radius: 5px;
}
.gallery-ad-container iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.gallery img {
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.7);
}

.image-tooltip {
    display: none;
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: pre;
    z-index: 100;
}

.gallery-image-container:hover .image-tooltip {
    display: block;
}

.vote-section {
    display: none;
    min-height: 100vh;
    padding: 70px 10px 10px;
}

.vote-section.active {
    display: block;
}

.duel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    gap: 10px;
    flex-wrap: wrap;
}

.image-container {
    position: relative;
    flex: 1;
    max-width: 45%;
    min-width: 250px;
    text-align: center;
    cursor: pointer;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.image-container:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.7);
}

.voted img {
    animation: votedAnimation 0.5s ease-in-out;
}

.voted-none {
    animation: noneVotedAnimation 0.5s ease-in-out;
}
.end-message{
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 10px;
  text-align: center;
  font-size: 24px;
  color: #fff;
  background: #f00;
  z-index: 999;
}

@keyframes votedAnimation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes noneVotedAnimation {
    0% { background-color: #555; box-shadow: 0 0 0 rgba(255, 68, 68, 0); }
    50% { background-color: #777; box-shadow: 0 0 10px rgba(255, 68, 68, 0.7); }
    100% { background-color: #555; box-shadow: 0 0 0 rgba(255, 68, 68, 0); }
}

.none-btn {
    position: absolute;
    top: calc(70px + 2px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #555;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s;
}

.none-btn:hover {
    background-color: #777;
}

.loader {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #888;
    display: none;
}

.gallery-section .loader {
    position: relative;
}
.vote-section .loader{
    position: fixed;
    width: 100%;
    bottom: 10px
}
.gallery-section .loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0,0,0,.8);
    display: block;
}
.gallery-section .loader2{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(0,0,0,.8);
  display: block;
  padding: 15px;
  text-align: center;
  font-size: 18px;
  color: #fff;
}
.gallery-section .loader:before{
    display: inline-block;
    vertical-align: middle;
    width: 0;
    height: 100%;
    content: '';
}
.load-inner{
    display: inline-block;
    vertical-align: middle;
    background: rgba(0,0,0,.8);
    width: 60px;
    height: 60px;
    padding-top: 6px;
    border-radius: 100%;
}
.load-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #FFF #FFF transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
.load-icon::after {
  content: '';  
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent #FF3D00 #FF3D00;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
} 
    
@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}
.keywords-popup{
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 14px;
    color: #fff;
    padding: 10px;
    text-align: center;
    background: rgba(0,0,0,.5);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.modal-content p {
    white-space: normal;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.5;
}

.modal-content input, .modal-content textarea {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.modal-btn {
    background-color: #ff4444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
}

.modal-btn:hover {
    background-color: #cc3333;
}

.celebration, .milestone {
    animation: celebrate 0.5s ease-in-out;
}

.about {
    max-width: 800px;
    text-align: left;
    animation: celebrate 0.5s ease-in-out;
}

@keyframes celebrate {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.image-popup span{
    position: relative;
    display: inline-block;
}
.image-popup img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

#ads-code-display a,
#ads-code-display a:visited,
#ads-code-display a:active {
    color: #FFFA99 !important;
    font-weight: bold !important;
}

.popup-prev, .popup-next {
  position: absolute;
  /* transform: rotate(-90deg); */
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  top:calc(50% - 24px);
  z-index: 999;
}
.popup-prev { left: 20px; }
.popup-next { right: 20px; }
.close-btn{
  position: absolute;
  top: 15px;
  right: 15px;
  opacity: .7;
  cursor: pointer;
  z-index: 999
}
.close-btn:hover{opacity: .9}
.close-btn svg{
  width: 32px;
  height: auto;
}
.cls-1 {
  fill: #fff;
  fill-rule: evenodd;
}

@media (max-width: 1199px) {
  .masonry-item { width: calc(100% / 3 - 10px); }
}
@media (max-width: 899px) {
  .masonry-item { width: calc(100% / 2 - 10px); }
}


@media (max-width: 680px) {
html, body {
  overscroll-behavior-x: none; /* Prevent horizontal swipe navigation/back-forward */
  touch-action: pan-y;         /* Allow vertical scroll, block horizontal */
}
.mob-nav{position: fixed;top: 0;left: 0;width: 100%;z-index: 999;background: #333;}
.rll{display: inline-block;z-index: 99;}
.logo-mob{display: inline-block;padding: 5px;z-index: 99;position: relative;}  
.logo-mob img{width: 146px;height: auto;}
.rll{position: absolute;top: 8px;right: 15px;}  
.navbar {
    position:absolute;
    flex-direction: inherit;
    gap: inherit;
    top: 0;
    padding: 50px 15px 15px;
    display: none;
    z-index: 88;
}
.navbar.active{display: block}
.filter-container, .nav-buttons, .auth-buttons{display: block;gap: inherit;}
.filter-container select, .nav-btn{
  width: 100%;
  display: block;
  margin: 15px 0;
}
.auth-buttons .nav-btn{margin:0 0 15px;}
  
    .duel-container {
      align-items: flex-start;
        padding: 50px 10px 0;
    }

    
   .image-container {
     display: inline-block;
     width: 50%;
       max-width: 50%;
       margin-bottom: 20px;
       min-width: inherit;
   }
   
   .image-container img {
       max-height: 40vh;
   }
   
   .image-container:hover img {
       transform: scale(1.03);
   }

    .category-management, .category-settings, .duel-category-settings {
        flex-direction: column;
    }


    .vote-btn{top: 9px;font-size: 18px;padding: 8px 20px;border-radius: 5px;left: auto;right: 15%}
    .nav-btn:nth-child(2){background-color: #f00}
    .none-btn{top: 70px;font-size: 4vw;padding: 8px 25px;z-index: 88;}
    .modal-content.about{height: 70vh;overflow: auto;}
    .modal-content.about::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
      border-radius: 10px;
      background-color: #eee;
    }
    .modal-content.about::-webkit-scrollbar {
      width: 8px;
      background-color: rgba(0, 0, 0, 0.5);
    }
    .modal-content.about::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
      background-color: #999;
    }
    .modal-content.about h2{font-size: 6vw;}
    .modal-content.about p{font-size: 4vw;}
    .profile-section.active, .gallery-section{padding-top: 68px!important;}
    .duel-category-settings select[multiple]{width: 100%;}
    /* .popup-prev, .popup-next {
      transform: translateX(-50%) rotate(90deg);
      top:auto;
    }
    .popup-prev { left: 50%; top: 10px; }
    .popup-next { right: auto;left: 50%;bottom: 10px } */
    .popup-prev { left: 0; }
    .popup-next { right: 0; }
    .image-popup img {max-height: 70vh;}
    .mob-info{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,.5);
      z-index: 888;
      text-align: center;
      color: #fff;
      display: block;
      padding-top: 25%;
      font-weight: 700;
    }
    .mob-info img{opacity: .7}
    .mob-info.hidden {
      opacity: 0;
      pointer-events: none;
    }
}
@media (max-width: 680px) {
  .vote-btn{right: 7%}
}

