:root {
  --bg: #0a0a1a;
  --highlight: #c531ea; /* Using highlight from index */
  --text: #f0f0f5;
  --sidebar-bg: #111122;
  --card-bg: #1a1a33;
  --border: #2d2d55;
}

/* Force font loading */
@import url('https://fonts.googleapis.com/css2?family=Rokkitt:ital,wght@0,100..900;1,100..900&display=swap');

/* Custom Scrollbars for entire site */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 51, 0.5);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  border-radius: 6px;
  border: 2px solid rgba(26, 26, 51, 0.5);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #a028d0, var(--highlight));
  border: 2px solid rgba(26, 26, 51, 0.8);
  box-shadow: 0 0 10px rgba(197, 49, 234, 0.5);
}

::-webkit-scrollbar-corner {
  background: rgba(26, 26, 51, 0.5);
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--highlight) rgba(26, 26, 51, 0.5);
}

/* Smooth scrolling for entire site */
html {
  scroll-behavior: smooth;
}

/* Enhanced scroll experience */
* {
  scroll-padding-top: 20px;
}

/* Additional scrollbar styling for containers with scroll */
.sidebar-content,
.gallery,
.lightbox-info,
.rarity-modal-content {
  scroll-behavior: smooth;
}

/* Webkit scroll animation enhancement */
.sidebar-content::-webkit-scrollbar,
.gallery::-webkit-scrollbar,
.lightbox-info::-webkit-scrollbar,
.rarity-modal-content::-webkit-scrollbar {
  transition: opacity 0.3s ease;
}

/* Hide scrollbars when not needed but keep functionality */
.sidebar-content:not(:hover)::-webkit-scrollbar-thumb,
.gallery:not(:hover)::-webkit-scrollbar-thumb,
.lightbox-info:not(:hover)::-webkit-scrollbar-thumb {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.sidebar-content:hover::-webkit-scrollbar-thumb,
.gallery:hover::-webkit-scrollbar-thumb,
.lightbox-info:hover::-webkit-scrollbar-thumb,
.rarity-modal-content::-webkit-scrollbar-thumb {
  opacity: 1;
}

body {
  margin: 0;
  font-family: 'Rokkitt', 'Times New Roman', serif;
  font-weight: 400;
  background: var(--bg); /* Simplified background for consistency */
  color: var(--text);
  min-height: 100vh; /* Use min-height */
  display: flex;
  flex-direction: column;
}

/* Navbar Styles */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 17, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 32px;
  border-bottom: 1px solid rgba(197, 49, 234, 0.2);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
  position: relative;
}

.topbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.03) 0%, 
    rgba(197, 49, 234, 0.01) 50%,
    transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.topbar .logo {
  height: 64px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 10px rgba(197, 49, 234, 0.3));
}

.topbar .logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(197, 49, 234, 0.5));
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  background: rgba(26, 26, 51, 0.3);
  border: 1px solid rgba(197, 49, 234, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(197, 49, 234, 0.15) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
  z-index: 1;
}

.nav a:hover::before {
  left: 100%;
}

.nav a > * {
  position: relative;
  z-index: 2;
}

.nav a:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.2) 0%, 
    rgba(197, 49, 234, 0.1) 100%);
  color: var(--highlight);
  border-color: rgba(197, 49, 234, 0.4);
  font-weight: 600;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.2);
}

.nav a:active {
  transform: translateY(0);
}

/* Special styling for Buy button */
.nav a[href*="marketplace"],
.nav a[href*="magiceden"] {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.6) 100%);
  border: 1px solid rgba(197, 49, 234, 0.6);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(197, 49, 234, 0.2);
}

.nav a[href*="marketplace"]:hover,
.nav a[href*="magiceden"]:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 1) 0%, 
    rgba(197, 49, 234, 0.8) 100%);
  border-color: rgba(197, 49, 234, 0.8);
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(197, 49, 234, 0.4);
}

/* Home Page Styles */
.home {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('https://pythenians.xyz/bg.png') center center no-repeat;
  background-size: cover;
}

.home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Adjust transparency */
  z-index: 1;
}

.home > img {
  position: relative;
  z-index: 2;
  width: 800px;
  max-width: 80%;
  filter: drop-shadow(0 0 20px rgba(197, 49, 234, 0.5));
  margin-bottom: 40px;
  animation: logoEntrance 2.5s ease-out forwards, logoFloat 8s ease-in-out 2.5s infinite;
  opacity: 0;
  transform: scale(0.5) translateY(-50px);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  animation: buttonsEntrance 1.2s ease-out 1.8s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.top-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
 
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);width
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Rokkitt', serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
  position: relative;
  overflow: hidden;
  animation: buttonSlideIn 0.6s ease-out forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(197, 49, 234, 0.1) 50%, 
    transparent 100%);
  transition: left 0.5s ease;
  z-index: 1;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  background: rgba(26, 26, 51, 0.4);
  border-color: rgba(197, 49, 234, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(197, 49, 234, 0.15),
              inset 0 1px 0 rgba(197, 49, 234, 0.2);
}

.action-btn:active {
  transform: translateY(0);
}

.me-logo {
  height: 14px;
  width: 18px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.action-btn:hover .me-logo {
  transform: scale(1.05);
}

.disc-logo {
  height: 14px;
  width: 14px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.pikenians-logo {
  height: 14px;
  width: 14px;
  object-fit: contain;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.action-btn:hover .disc-logo {
  transform: scale(1.05);
}

.action-btn:hover .pikenians-logo {
  transform: scale(1.05);
}

/* Floating NFTs Animation */
.floating-nfts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-nft {
  position: absolute;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  animation: floatAndFade 15s infinite linear;
  border: 2px solid rgba(197, 49, 234, 0.3);
  box-shadow: 0 4px 20px rgba(197, 49, 234, 0.2);
}

.floating-nft:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.floating-nft:nth-child(2) {
  left: 80%;
  animation-delay: 2s;
  animation-duration: 16s;
}

.floating-nft:nth-child(3) {
  left: 20%;
  animation-delay: 4s;
  animation-duration: 14s;
}

.floating-nft:nth-child(4) {
  left: 70%;
  animation-delay: 6s;
  animation-duration: 18s;
}

.floating-nft:nth-child(5) {
  left: 40%;
  animation-delay: 8s;
  animation-duration: 13s;
}

.floating-nft:nth-child(6) {
  left: 60%;
  animation-delay: 10s;
  animation-duration: 15s;
}

@keyframes floatAndFade {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}

/* Logo entrance animation */
@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(-50px);
    filter: drop-shadow(0 0 0px rgba(197, 49, 234, 0));
  }
  60% {
    transform: scale(1.05) translateY(0);
    filter: drop-shadow(0 0 30px rgba(197, 49, 234, 0.8));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 20px rgba(197, 49, 234, 0.5));
  }
}

/* Logo floating animation (infinite loop after entrance) */
@keyframes logoFloat {
  0% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 20px rgba(197, 49, 234, 0.5));
  }
  50% {
    transform: scale(1.01) translateY(-5px);
    filter: drop-shadow(0 0 23px rgba(197, 49, 234, 0.6));
  }
  100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 20px rgba(197, 49, 234, 0.5));
  }
}

/* Buttons entrance animation */
@keyframes buttonsEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Individual button slide-in animation */
@keyframes buttonSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Staggered button animation delays */
.btn-1 {
  animation-delay: 2.0s;
}

.btn-2 {
  animation-delay: 2.2s;
}

.btn-3 {
  animation-delay: 2.4s;
}

/* ================================
   MEMES & NEWS PAGE STYLES
   ================================ */

/* Page Container */
.page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
  min-height: calc(100vh - 80px);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, rgba(197, 49, 234, 0.1) 0%, rgba(26, 26, 51, 0.3) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(197, 49, 234, 0.2);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://pythenians.xyz/bg.png') center center;
  background-size: cover;
  opacity: 0.1;
  z-index: -1;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.page-title {
  font-family: 'Rokkitt', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(197, 49, 234, 0.5);
  animation: titleAppear 1s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(240, 240, 245, 0.8);
  margin-bottom: 30px;
  animation: subtitleAppear 1s ease-out 0.3s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.header-decoration {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--highlight), #a028d0);
  margin: 0 auto;
  border-radius: 2px;
  animation: decorationAppear 1s ease-out 0.6s forwards;
  opacity: 0;
  transform: scaleX(0);
}

/* Animations for header */
@keyframes titleAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtitleAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes decorationAppear {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Memes Container */
.memes-container {
  flex: 1;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(197, 49, 234, 0.2);
  border-top: 4px solid var(--highlight);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-state p {
  color: rgba(240, 240, 245, 0.8);
  font-size: 1.1rem;
  font-weight: 500;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: 'Rokkitt', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 10px;
}

.empty-state p {
  color: rgba(240, 240, 245, 0.6);
  font-size: 1.1rem;
}

/* Memes Grid */
.memes-grid {
  position: relative;
  animation: gridFadeIn 0.8s ease-out;
}

.memes-grid .meme-item {
  position: absolute;
  width: calc(25% - 18px);
}

@media (max-width: 1200px) {
  .memes-grid .meme-item {
    width: calc(33.333% - 16px);
  }
}

@keyframes gridFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Meme Item */
.meme-item {
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: memeItemAppear 0.6s ease-out backwards;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.meme-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(197, 49, 234, 0.3);
  border-color: rgba(197, 49, 234, 0.5);
}

@keyframes memeItemAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Meme Image Container */
.meme-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.meme-image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 16px 16px 0 0;
}

.meme-image-container {
  cursor: pointer;
}

.meme-item:hover .meme-image-container img {
  transform: scale(1.15);
}

/* Meme Lightbox */
.meme-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lightboxFadeIn 0.3s ease-out;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

.lightbox-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  animation: lightboxSlideIn 0.4s ease-out;
}

@keyframes lightboxSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lightbox-close {
  position: fixed;
  top: 50px;
  right: 50px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(197, 49, 234, 0.8);
  transform: scale(1.1);
}

.lightbox-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 400px;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* This CSS was for memes lightbox - removed to avoid conflict with gallery lightbox */

.download-btn {
  background: none;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background: rgba(197, 49, 234, 0.3);
  transform: translateY(-2px) scale(1.05);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .memes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
  }
  
  
  .memes-container {
    padding: 30px 8px;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .lightbox-content {
    margin: 10px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  
  .lightbox-image-container {
    padding: 10px;
    min-height: auto;
  }
  
  .lightbox-image-container img {
    max-height: 60vh;
  }
  
  .lightbox-info {
    padding: 15px;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    align-items: center;
  }
  
  .download-btn {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .memes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
  }
  
  
  .page-header {
    padding: 40px 0 30px;
  }
  
  .memes-container {
    padding: 30px 6px;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .lightbox-image-container img {
    max-height: 50vh;
  }
}

/* ================================
   NEWS PAGE SPECIFIC STYLES
   ================================ */

/* News Container */
.news-container {
  flex: 1;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 30px;
  animation: gridFadeIn 0.8s ease-out;
}

/* News Card */
.news-card {
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: newsCardAppear 0.6s ease-out backwards;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(197, 49, 234, 0.3);
  border-color: rgba(197, 49, 234, 0.5);
}

@keyframes newsCardAppear {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* News Image Container */
.news-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: 20px 20px 0 0;
}

.news-card:hover .news-image-container img {
  transform: scale(1.1);
}

/* News Overlay */
.news-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px 20px 0 0;
}

.news-card:hover .news-overlay {
  opacity: 1;
}

/* Read More Button in Overlay */
.read-more-btn {
  background: rgba(197, 49, 234, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(197, 49, 234, 0.4);
}

.read-more-btn:hover {
  transform: scale(1.05);
  background: var(--highlight);
  box-shadow: 0 6px 25px rgba(197, 49, 234, 0.6);
}

/* News Content */
.news-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-meta {
  margin-bottom: 12px;
}

.news-date {
  color: rgba(197, 49, 234, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-title {
  font-family: 'Rokkitt', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-preview {
  color: rgba(240, 240, 245, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-link {
  background: none;
  border: none;
  color: var(--highlight);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
  transition: all 0.3s ease;
  text-decoration: none;
}

.read-more-link:hover {
  color: #a028d0;
  transform: translateX(5px);
}

/* Article Modal */
.article-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lightboxFadeIn 0.3s ease-out;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: rgba(26, 26, 51, 0.95);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 24px;
  overflow: hidden;
  animation: lightboxSlideIn 0.4s ease-out;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
  background: rgba(197, 49, 234, 0.8);
  transform: scale(1.1);
}

/* Article Container */
.article-container {
  overflow-y: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.article-header {
  position: relative;
}

.article-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 24px 24px 0 0;
}

.article-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 40px 30px 25px;
  color: white;
}

.article-title {
  font-family: 'Rokkitt', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.article-date {
  color: rgba(197, 49, 234, 0.9);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content {
  flex: 1;
  padding: 30px;
}

.article-text {
  color: rgba(240, 240, 245, 0.9);
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

.article-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(197, 49, 234, 0.2);
  background: rgba(26, 26, 51, 0.5);
}

.article-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.share-btn, .copy-btn {
  background: rgba(26, 26, 51, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 10px;
  padding: 12px 20px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.share-btn:hover, .copy-btn:hover {
  background: rgba(197, 49, 234, 0.2);
  border-color: rgba(197, 49, 234, 0.5);
  transform: translateY(-2px);
}

.share-btn {
  background: rgba(29, 161, 242, 0.2);
  border-color: rgba(29, 161, 242, 0.4);
  color: #1da1f2;
}

.share-btn:hover {
  background: rgba(29, 161, 242, 0.3);
  border-color: rgba(29, 161, 242, 0.6);
}

/* News without image styles */
.news-no-image {
  border: 2px solid rgba(197, 49, 234, 0.3);
}

.news-content-full {
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-preview-large {
  color: rgba(240, 240, 245, 0.8);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 15px 0 20px 0;
  flex-grow: 1;
}

.news-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.read-more-btn-large {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.read-more-btn-large:hover {
  background: linear-gradient(45deg, #a028d0, var(--highlight));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.4);
}

/* Modal without image styles */
.article-header.no-image {
  padding: 190px 30px 30px 30px;
  text-align: center;
  border-bottom: 1px solid rgba(197, 49, 234, 0.2);
}

.article-header.no-image .article-meta {
  padding: 30px;
  margin: 0;
}

.article-header.no-image .article-title {
  color: var(--text);
  margin-bottom: 15px;
  font-size: 2rem;
  line-height: 1.2;
}

.article-header.no-image .article-date {
  color: rgba(240, 240, 245, 0.7);
  font-size: 1rem;
}

/* Mobile Responsiveness for News */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .news-container {
    padding: 30px 10px;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .page-container {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .news-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .news-content-full {
    padding: 20px;
  }
  
  .modal-content {
    margin: 10px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  
  .article-title {
    font-size: 1.8rem;
  }
  
  .article-meta {
    padding: 30px 20px 20px;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-text {
    font-size: 1rem;
  }
  
  .article-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .news-grid {
    gap: 15px;
  }
  
  .news-content {
    padding: 18px;
  }
  
  .news-title {
    font-size: 1.2rem;
  }
  
  .news-preview {
    font-size: 0.95rem;
  }
  
  .article-title {
    font-size: 1.5rem;
  }
  
  .article-content {
    padding: 15px;
  }
}

/* ================================
   ADMIN PANEL STYLES
   ================================ */

/* Login Container */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(26, 26, 51, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: loginCardAppear 0.6s ease-out;
}

@keyframes loginCardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  margin-bottom: 30px;
}

.login-logo {
  width: 80px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(197, 49, 234, 0.5));
}

.login-header h1 {
  font-family: 'Rokkitt', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.login-header p {
  color: rgba(240, 240, 245, 0.7);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(26, 26, 51, 0.6);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(197, 49, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

.login-btn {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.4);
}

.login-error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 12px;
  padding: 12px;
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 15px;
}

/* Admin Dashboard */
.admin-dashboard {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: rgba(26, 26, 51, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(197, 49, 234, 0.2);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-logo {
  width: 40px;
  height: auto;
  margin-right: 15px;
}

.admin-nav h1 {
  font-family: 'Rokkitt', serif;
  font-size: 1.8rem;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

.admin-btn {
  background: rgba(26, 26, 51, 0.6);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.admin-btn:hover {
  background: rgba(197, 49, 234, 0.2);
  border-color: rgba(197, 49, 234, 0.5);
  transform: translateY(-1px);
}

.admin-btn.primary {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  border-color: transparent;
  color: white;
}

.admin-btn.primary:hover {
  background: linear-gradient(45deg, #a028d0, var(--highlight));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(197, 49, 234, 0.4);
}

.admin-btn.danger {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  color: #ff6b6b;
}

.admin-btn.danger:hover {
  background: rgba(220, 53, 69, 0.3);
  border-color: rgba(220, 53, 69, 0.7);
}

.admin-btn.secondary {
  background: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.5);
  color: #adb5bd;
}

.admin-btn.secondary:hover {
  background: rgba(108, 117, 125, 0.3);
  border-color: rgba(108, 117, 125, 0.7);
}

/* Admin Content */
.admin-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 30px;
  background: rgba(26, 26, 51, 0.5);
  border-radius: 12px;
  padding: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  color: rgba(240, 240, 245, 0.7);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(197, 49, 234, 0.1);
}

.tab-btn.active {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  color: white;
  box-shadow: 0 2px 10px rgba(197, 49, 234, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: tabFadeIn 0.4s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(26, 26, 51, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(197, 49, 234, 0.2);
  border-color: rgba(197, 49, 234, 0.4);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info h3 {
  font-family: 'Rokkitt', serif;
  font-size: 2rem;
  color: var(--text);
  margin: 0 0 4px 0;
}

.stat-info p {
  color: rgba(240, 240, 245, 0.7);
  font-size: 0.9rem;
  margin: 0;
}

/* Recent Activity */
.recent-activity h2 {
  font-family: 'Rokkitt', serif;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 20px;
}

.activity-list {
  background: rgba(26, 26, 51, 0.4);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 16px;
  overflow: hidden;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(197, 49, 234, 0.1);
  transition: background 0.3s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: rgba(197, 49, 234, 0.05);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(197, 49, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.activity-info p {
  color: var(--text);
  font-weight: 500;
  margin: 0 0 4px 0;
}

.activity-info span {
  color: rgba(240, 240, 245, 0.6);
  font-size: 0.85rem;
}

/* Content Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.content-header h2 {
  font-family: 'Rokkitt', serif;
  font-size: 1.8rem;
  color: var(--text);
  margin: 0;
}

/* Content Grid (for memes) */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.content-card {
  background: rgba(26, 26, 51, 0.6);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(197, 49, 234, 0.2);
}

.content-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-card:hover .card-actions {
  opacity: 1;
}

.action-btn {

  border: none;
  border-radius: 6px;

  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.action-btn.danger {
  color: #ff6b6b;
}

.action-btn.danger:hover {
  background: rgba(220, 53, 69, 0.8);
  color: white;
}

.action-btn.secondary {
  color: #adb5bd;
}

.action-btn.secondary:hover {
  background: rgba(108, 117, 125, 0.8);
  color: white;
}

.card-info {
  padding: 12px;
}

.card-info p {
  color: var(--text);
  font-weight: 500;
  margin: 0 0 4px 0;
  font-size: 0.9rem;
}

.card-info span {
  color: rgba(240, 240, 245, 0.6);
  font-size: 0.8rem;
}

/* Content List (for news) */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  background: rgba(26, 26, 51, 0.6);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s ease;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(197, 49, 234, 0.2);
}

.news-item img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.news-item-content {
  flex: 1;
}

.news-item-content h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 0 0 8px 0;
}

.news-item-content p {
  color: rgba(240, 240, 245, 0.7);
  font-size: 0.9rem;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.news-item-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.published {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.status.draft {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.news-item-meta span:last-child {
  color: rgba(240, 240, 245, 0.6);
  font-size: 0.85rem;
}

.news-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Empty Content */
.empty-content {
  text-align: center;
  padding: 60px 20px;
  color: rgba(240, 240, 245, 0.6);
  font-size: 1.1rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

.modal-dialog {
  background: rgba(26, 26, 51, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalSlideIn 0.4s ease-out;
}

.modal-dialog.large {
  max-width: 700px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: 'Rokkitt', serif;
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(240, 240, 245, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Image Upload */
.image-upload {
  position: relative;
  border: 2px dashed rgba(197, 49, 234, 0.3);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

.image-upload:hover {
  border-color: rgba(197, 49, 234, 0.5);
  background: rgba(197, 49, 234, 0.05);
}

.image-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: rgba(240, 240, 245, 0.6);
}

.upload-placeholder span {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.upload-placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

.image-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Checkbox Custom */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(197, 49, 234, 0.5);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: linear-gradient(45deg, var(--highlight), #a028d0);
  border-color: var(--highlight);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Mobile Responsiveness for Admin */
@media (max-width: 768px) {
  .admin-nav {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .admin-nav h1 {
    font-size: 1.5rem;
  }
  
  .admin-tabs {
    flex-direction: column;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .news-item {
    flex-direction: column;
    text-align: center;
  }
  
  .news-item img {
    width: 100%;
    height: 120px;
  }
  
  .modal-dialog {
    margin: 10px;
    max-width: calc(100vw - 20px);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.action-btn span {
  position: relative;
  z-index: 2;
}

/* Gallery Page Styles */
.main {
  display: flex;
  flex: 1; /* Allow main content to grow */
  overflow: hidden; /* Prevent body scrollbars when sidebar/gallery scroll */
  background: var(--bg) url('https://pythenians.xyz/bg.png') no-repeat center center fixed;
  background-size: cover;
}

.sidebar {
  width: 300px;
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  display: flex; /* Use flex for easier layout */
  flex-direction: column;
  position: relative;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar-toggle {
  position: absolute;
  top: 20px;
  right: 15px;
  background: var(--highlight);
  border: none;
  color: var(--sidebar-bg);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
  background: #a028d0;
  transform: scale(1.1);
}

.sidebar-content {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Sidebar custom scrollbar */
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(197, 49, 234, 0.7) 0%, 
    rgba(197, 49, 234, 0.4) 50%,
    rgba(197, 49, 234, 0.7) 100%);
  border-radius: 3px;
  border: none;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, 
    rgba(197, 49, 234, 0.9) 0%, 
    rgba(197, 49, 234, 0.6) 50%,
    rgba(197, 49, 234, 0.9) 100%);
}

.sidebar.collapsed .sidebar-content {
  opacity: 0;
  pointer-events: none;
}

.sidebar.collapsed .sidebar-toggle {
  right: 15px;
}

.sidebar h2 {
  margin: 0 0 20px 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--highlight);
  text-align: center;
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 10px;
  flex-shrink: 0; /* Prevent shrinking */
}

.search-box {
  margin-bottom: 20px;
  flex-shrink: 0;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Rokkitt', 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 400;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.search-box input:focus {
  outline: none;
  border-color: rgba(197, 49, 234, 0.5);
  background: rgba(26, 26, 51, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(197, 49, 234, 0.15),
              inset 0 1px 0 rgba(197, 49, 234, 0.2);
  transform: translateY(-2px);
}

.search-box input:hover:not(:focus) {
  border-color: rgba(197, 49, 234, 0.3);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25),
              0 0 15px rgba(197, 49, 234, 0.1),
              inset 0 1px 0 rgba(197, 49, 234, 0.15);
}

.clear-filters {
  width: 100%;
  padding: 10px 16px;
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  color: var(--highlight);
  font-family: 'Rokkitt', serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 20px;
  border-radius: 12px;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
}

.clear-filters::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(197, 49, 234, 0.2) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
  z-index: 1;
}

.clear-filters:hover::before {
  left: 100%;
}

.clear-filters:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.6) 100%);
  color: var(--sidebar-bg);
  border-color: rgba(197, 49, 234, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(197, 49, 234, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.clear-filters:active {
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
              0 0 10px rgba(197, 49, 234, 0.2);
}

/* Active Filters Display */
.active-filters {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(26, 26, 51, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.active-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(197, 49, 234, 0.2);
}

.active-filters h4 {
  margin: 0;
  color: var(--highlight);
  font-size: 1rem;
  font-weight: 600;
}

.active-count {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.6) 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(197, 49, 234, 0.3);
  animation: bounce 0.3s ease;
}

@keyframes bounce {
  0%, 20%, 60%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  80% { transform: translateY(-2px); }
}

.active-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.2) 0%, 
    rgba(197, 49, 234, 0.1) 100%);
  border: 1px solid rgba(197, 49, 234, 0.4);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
  animation: tagSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.filter-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(197, 49, 234, 0.15) 50%, 
    transparent 100%);
  transition: left 0.4s ease;
}

.filter-tag:hover::before {
  left: 100%;
}

.filter-tag:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.3) 0%, 
    rgba(197, 49, 234, 0.2) 100%);
  border-color: rgba(197, 49, 234, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 49, 234, 0.2);
}

.filter-tag-category {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 400;
}

.filter-tag-value {
  color: var(--highlight);
  font-weight: 600;
}

.filter-tag-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-tag-remove:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ff6b6b;
  transform: scale(1.2);
}

.search-filter-tag {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.2) 0%, 
    rgba(59, 130, 246, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.4);
}

.search-filter-tag .filter-tag-value {
  color: #3b82f6;
}

.search-filter-tag:hover {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.3) 0%, 
    rgba(59, 130, 246, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.6);
}

/* Rarity Legend */
.rarity-legend {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rarity-legend h4 {
  margin: 0;
  color: var(--highlight);
  font-size: 1rem;
  font-weight: 600;
}

.learn-more-btn {
  background: transparent;
  border: 1px solid var(--highlight);
  color: var(--highlight);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Rokkitt', 'Times New Roman', serif;
  font-weight: 500;
}

.learn-more-btn:hover {
  background: var(--highlight);
  color: var(--sidebar-bg);
  transform: scale(1.05);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.rarity-indicator.mini {
  width: 8px;
  height: 8px;
  position: static;
  flex-shrink: 0;
}

.rarity-indicator.mini.mythical {
  animation: none; /* Remove animation from legend */
}

#filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 5px; /* Space for scrollbar */
}

.filter-group {
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(197, 49, 234, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.filter-group:hover {
  border-color: rgba(197, 49, 234, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(197, 49, 234, 0.15),
              inset 0 1px 0 rgba(197, 49, 234, 0.2);
  transform: translateY(-2px);
}

.filter-group summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--highlight);
  font-size: 1.1rem;
  padding: 15px 18px;
  margin: 0;
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.08) 0%, 
    rgba(197, 49, 234, 0.03) 100%);
  border-bottom: 1px solid rgba(197, 49, 234, 0.15);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-group summary::after {
  content: '▼';
  font-size: 0.8rem;
  opacity: 0.7;
  transition: all 0.3s ease;
  color: var(--highlight);
}

.filter-group[open] summary::after {
  transform: rotate(180deg);
  opacity: 1;
}

.filter-group summary:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.15) 0%, 
    rgba(197, 49, 234, 0.08) 100%);
  color: var(--text);
  text-shadow: 0 0 10px rgba(197, 49, 234, 0.3);
}

.filter-group[open] summary {
  border-bottom-color: rgba(197, 49, 234, 0.3);
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.12) 0%, 
    rgba(197, 49, 234, 0.05) 100%);
}

.filter-options {
  padding: 8px 16px 12px 16px;
  background: rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 49, 234, 0.5) transparent;
}

.filter-options::-webkit-scrollbar {
  width: 4px;
}

.filter-options::-webkit-scrollbar-track {
  background: transparent;
}

.filter-options::-webkit-scrollbar-thumb {
  background: rgba(197, 49, 234, 0.5);
  border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 49, 234, 0.7);
}

.filter-group label {
  display: flex;
  align-items: center;
  margin: 4px 0;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  position: relative;
  overflow: hidden;
}

.filter-group label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(197, 49, 234, 0.1) 50%, 
    transparent 100%);
  transition: left 0.5s ease;
  z-index: 1;
}

.filter-group label:hover::before {
  left: 100%;
}

.filter-group label:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.15) 0%, 
    rgba(197, 49, 234, 0.08) 100%);
  border-color: rgba(197, 49, 234, 0.3);
  color: var(--text);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(197, 49, 234, 0.1);
}

.filter-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 12px;
  accent-color: var(--highlight);
  cursor: pointer;
  position: relative;
  z-index: 2;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.filter-group input[type="checkbox"]:checked {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px rgba(197, 49, 234, 0.6));
}

.filter-group label:has(input:checked) {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.25) 0%, 
    rgba(197, 49, 234, 0.12) 100%);
  border-color: rgba(197, 49, 234, 0.5);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 0 15px rgba(197, 49, 234, 0.2);
}

/* Custom label text styling */
.filter-group label span {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

/* Container for gallery + pagination */
.gallery-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Hide overflow */
}

/* Gallery Header */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(26, 26, 51, 0.95);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.gallery-info {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.header-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.mobile-filter-btn {
  display: none; /* Hidden by default, shown on mobile */
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.6) 100%);
  border: 1px solid rgba(197, 49, 234, 0.4);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  font-family: 'Rokkitt', serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  align-items: center;
  gap: 6px;
}

.mobile-filter-btn:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 1) 0%, 
    rgba(197, 49, 234, 0.8) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(197, 49, 234, 0.3);
}

.filter-icon {
  font-size: 1rem;
}

.filter-text {
  font-weight: 600;
}

.active-filter-count {
  background: rgba(255, 255, 255, 0.9);
  color: var(--highlight);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  position: absolute;
  top: -8px;
  right: -8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-controls label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.sort-controls select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 12px;
  font-family: 'Rokkitt', 'Times New Roman', serif;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sort-controls select:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 5px rgba(197, 49, 234, 0.3);
}

.sort-controls select option {
  background: var(--card-bg);
  color: var(--text);
}

.gallery {
  flex: 1; /* Allow gallery to take up available space */
  padding: 20px;
  overflow-y: auto; /* Enable scrolling for the gallery */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  align-content: start;
  /* Consider removing backdrop-filter if performance is an issue */
  /* backdrop-filter: blur(6px); */
}

/* Gallery custom scrollbar */
.gallery::-webkit-scrollbar {
  width: 10px;
}

.gallery::-webkit-scrollbar-track {
  background: rgba(26, 26, 51, 0.3);
  border-radius: 5px;
  margin: 10px 0;
}

.gallery::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.5) 50%,
    rgba(197, 49, 234, 0.8) 100%);
  border-radius: 5px;
  border: 1px solid rgba(26, 26, 51, 0.5);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
}

.gallery::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, 
    rgba(197, 49, 234, 1) 0%, 
    rgba(197, 49, 234, 0.7) 50%,
    rgba(197, 49, 234, 1) 100%);
  border: 1px solid rgba(197, 49, 234, 0.3);
  box-shadow: 
    inset 0 0 4px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(197, 49, 234, 0.4);
}

.nft-card {
    background: rgba(26, 26, 51, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.nft-card img { /* Ensure images don't overflow card */
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
    object-fit: cover; /* Cover the area without distortion */
}

.nft-card p {
    padding: 10px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis */
}


.nft-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(197, 49, 234, 0.4), 
                0 0 20px rgba(197, 49, 234, 0.2);
    border: 1px solid rgba(197, 49, 234, 0.5);
    background: rgba(26, 26, 51, 0.4);
}

.nft-card img {
    transition: transform 0.4s ease;
}

.nft-card:hover img {
    transform: scale(1.05);
}

/* Rarity Indicators */
.rarity-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.rarity-indicator.mythical {
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    box-shadow: 0 0 20px rgba(255, 20, 147, 1);
    animation: mythical-pulse 2s infinite;
}

.rarity-indicator.legendary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.rarity-indicator.rare {
    background: linear-gradient(45deg, #c531ea, #e879f9);
    box-shadow: 0 0 15px rgba(197, 49, 234, 0.8);
}

.rarity-indicator.uncommon {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
}

.rarity-indicator.common {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.8);
}

@keyframes mythical-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 20, 147, 1);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 20, 147, 1);
        transform: scale(1.1);
    }
}

/* Rarity Score Badge */
.rarity-score-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 49, 234, 0.5);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--highlight);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    z-index: 5;
    min-width: 45px;
}

.rarity-score {
    font-size: 0.75rem;
    font-weight: 700;
}

.rarity-score.mythical { color: #ff1493; }
.rarity-score.legendary { color: #ffd700; }
.rarity-score.rare { color: #c531ea; }
.rarity-score.uncommon { color: #3b82f6; }
.rarity-score.common { color: #9ca3af; }

.rarity-rank {
    font-size: 0.65rem;
    color: var(--highlight);
    opacity: 0.9;
}

/* Fade-in animation for cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    background: rgba(17, 17, 34, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 49, 234, 0.4);
    border-radius: 15px;
    padding: 15px 20px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 280px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 
                0 0 20px rgba(197, 49, 234, 0.3),
                inset 0 1px 0 rgba(197, 49, 234, 0.2);
}

.preview-modal.active {
    opacity: 1;
    transform: translateY(-5px);
}

.preview-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(197, 49, 234, 0.15) 0%, 
        rgba(197, 49, 234, 0.08) 50%, 
        rgba(17, 17, 34, 0.1) 100%);
    border-radius: 15px;
    pointer-events: none;
}

/* Removed image from hover preview - keeping only traits */

.preview-modal h3 {
    color: var(--highlight);
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.preview-rarity-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}

.preview-rarity-score {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
}

.preview-rarity-score.mythical { color: #ff1493; }
.preview-rarity-score.legendary { color: #ffd700; }
.preview-rarity-score.rare { color: #c531ea; }
.preview-rarity-score.uncommon { color: #3b82f6; }
.preview-rarity-score.common { color: #9ca3af; }

.preview-rarity-rank {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.preview-traits {
    display: grid;
    gap: 8px;
}

.preview-trait {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(197, 49, 234, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 49, 234, 0.25);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.preview-trait::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(197, 49, 234, 0.2) 0%, 
        rgba(197, 49, 234, 0.05) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.preview-trait > * {
    position: relative;
    z-index: 2;
}

.trait-rarity {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.trait-rarity.legendary {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.trait-rarity.rare {
    background: rgba(197, 49, 234, 0.2);
    color: #c531ea;
}

.trait-rarity.uncommon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.trait-rarity.common {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* Rarity Explanation Modal */
.rarity-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.rarity-modal.active {
    display: flex;
}

.rarity-modal-content {
    background: rgba(26, 26, 51, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 49, 234, 0.3);
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    
    /* Custom scrollbar for modal content */
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 49, 234, 0.8) rgba(255, 255, 255, 0.1);
}

/* Enhanced modal scrollbar */
.rarity-modal-content::-webkit-scrollbar {
    width: 8px;
}

.rarity-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 10px 0;
}

.rarity-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(197, 49, 234, 0.9) 0%, 
        rgba(197, 49, 234, 0.6) 50%,
        rgba(197, 49, 234, 0.9) 100%);
    border-radius: 4px;
    border: none;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.rarity-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(197, 49, 234, 1) 0%, 
        rgba(197, 49, 234, 0.8) 50%,
        rgba(197, 49, 234, 1) 100%);
    box-shadow: 
        inset 0 0 6px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(197, 49, 234, 0.6);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--highlight);
}

.rarity-modal-content h2 {
    color: var(--highlight);
    margin: 0 0 25px 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--highlight);
    padding-bottom: 15px;
}

.explanation-section {
    margin-bottom: 25px;
}

.explanation-section h3 {
    color: var(--highlight);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.explanation-section p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.calculation-example {
    background: rgba(197, 49, 234, 0.1);
    border: 1px solid rgba(197, 49, 234, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.calculation-example h4 {
    color: var(--highlight);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.explanation-section ol {
    padding-left: 20px;
}

.explanation-section ol li {
    margin-bottom: 10px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.explanation-section ul {
    padding-left: 20px;
}

.explanation-section ul li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.tier-explanations {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tier-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-item div:last-child {
    display: flex;
    flex-direction: column;
}

.tier-item strong {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 4px;
}

.tier-item span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .rarity-modal-content {
        padding: 20px;
        margin: 10px;
        max-height: 85vh;
    }
    
    .rarity-modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .explanation-section h3 {
        font-size: 1.1rem;
    }
    
    .tier-item {
        padding: 10px;
        gap: 10px;
    }
    
    .tier-item strong {
        font-size: 0.9rem;
    }
    
    .tier-item span {
        font-size: 0.8rem;
    }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  gap: 10px;
  background-color: var(--sidebar-bg); /* Match sidebar */
  border-top: 1px solid var(--border); /* Add separator */
  flex-shrink: 0; /* Prevent shrinking */
}

.pagination button {
  background-color: var(--card-bg);
  color: var(--text);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Rokkitt', serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pagination button:hover:not(:disabled) {
  background-color: var(--highlight);
  color: var(--sidebar-bg);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination span {
  font-size: 0.9rem;
  font-weight: 400;
}

/* Loading Skeleton Styles */
.skeleton-card {
    background: rgba(26, 26, 51, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite;
}

.skeleton-text {
    padding: 10px;
    height: 20px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite;
    border-radius: 4px;
    margin: 0 10px 10px 10px;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Gallery Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: row;
    gap: 30px;
    max-width: 95vw;
    max-height: 90vh;
    align-items: flex-start;
    background: rgba(26, 26, 51, 0.95);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 49, 234, 0.2);
}

.lightbox-image-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 500px;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(197, 49, 234, 0.4), 
                0 0 80px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(197, 49, 234, 0.3);
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    width: 350px;
    max-height: 70vh;
    overflow-y: auto;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Lightbox info custom scrollbar */
.lightbox-info::-webkit-scrollbar {
    width: 6px;
}

.lightbox-info::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 5px 0;
}

.lightbox-info::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(197, 49, 234, 0.8) 0%, 
        rgba(197, 49, 234, 0.5) 50%,
        rgba(197, 49, 234, 0.8) 100%);
    border-radius: 3px;
    border: none;
}

.lightbox-info::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(197, 49, 234, 1) 0%, 
        rgba(197, 49, 234, 0.7) 50%,
        rgba(197, 49, 234, 1) 100%);
    box-shadow: 0 0 8px rgba(197, 49, 234, 0.4);
}

.lightbox-title {
    color: var(--highlight);
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.lightbox-rarity-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
}

.lightbox-rarity-score {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
}

.lightbox-rarity-score.mythical { color: #ff1493; }
.lightbox-rarity-score.legendary { color: #ffd700; }
.lightbox-rarity-score.rare { color: #c531ea; }
.lightbox-rarity-score.uncommon { color: #3b82f6; }
.lightbox-rarity-score.common { color: #9ca3af; }

.lightbox-rarity-rank {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.lightbox-traits {
    display: grid;
    gap: 8px;
}

.lightbox-trait {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.lightbox-trait strong {
    font-weight: 600;
}

/* Mobile gallery header adjustments */
@media (max-width: 768px) {
    .gallery-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
        align-items: stretch;
    }
    
    .gallery-info {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .sort-controls {
        justify-content: center;
        gap: 8px;
    }
    
    .sort-controls label {
        font-size: 0.85rem;
    }
    
    .sort-controls select {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        flex-direction: column;
        gap: 20px;
        max-height: 85vh;
        max-width: 90vw;
        padding: 20px;
        margin: 0 auto;
    }
    
    .lightbox-image-container {
        align-self: center;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .lightbox img {
        max-width: 100%;
        max-height: 40vh;
        width: auto;
        height: auto;
    }
    
    .lightbox-info {
        max-width: 100%;
        max-height: 35vh;
        min-width: unset;
        padding: 20px;
        align-self: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .lightbox-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .lightbox-trait {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .lightbox-rarity-info {
        margin-bottom: 15px;
    }
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1001;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(197, 49, 234, 0.8);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}


/* Admin Modal Form Spacing Improvements - FORCE OVERRIDE */
#addNewsModal .form-group {
    margin-bottom: 20px !important;
}

#addNewsModal .form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

#addNewsModal .checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    color: var(--text) !important;
    line-height: 1.4 !important;
    flex-direction: row !important;
}

#addNewsModal .checkbox-custom {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    border: 2px solid rgba(197, 49, 234, 0.6) !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    margin-top: 0 !important;
}

/* Adjust modal height and scrolling */
#addNewsModal .admin-modal {
    max-height: 85vh !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 25px !important;
}

#addNewsModal .admin-modal form {
    max-height: none !important;
    overflow: visible !important;
}

/* Fix Quill editor height in modal */
#addNewsModal #newsContent {
    height: 250px !important;
}

/* Custom scrollbar for modal */
#addNewsModal .admin-modal::-webkit-scrollbar {
    width: 8px !important;
}

#addNewsModal .admin-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
}

#addNewsModal .admin-modal::-webkit-scrollbar-thumb {
    background: rgba(197, 49, 234, 0.6) !important;
    border-radius: 4px !important;
}

#addNewsModal .admin-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 49, 234, 0.8) !important;
}

#addNewsModal input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--highlight) !important;
    border-color: var(--highlight) !important;
}

#addNewsModal input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓' !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Custom Quill Editor Styles */
.ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(197, 49, 234, 0.3) !important;
    border-bottom: 1px solid rgba(197, 49, 234, 0.3) !important;
    border-radius: 8px 8px 0 0 !important;
}

.ql-container.ql-snow {
    border: 2px solid rgba(197, 49, 234, 0.3) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    background: white !important;
}

.ql-toolbar .ql-stroke {
    fill: none !important;
    stroke: #444 !important;
}

.ql-toolbar .ql-fill {
    fill: #444 !important;
    stroke: none !important;
}

.ql-toolbar .ql-picker {
    color: #444 !important;
}

.ql-toolbar button:hover {
    background: rgba(197, 49, 234, 0.1) !important;
    border-radius: 4px !important;
}

.ql-toolbar button.ql-active {
    background: rgba(197, 49, 234, 0.2) !important;
    border-radius: 4px !important;
}

.ql-editor {
    color: #000 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-family: 'Arial', sans-serif !important;
}

.ql-editor * {
    color: #000 !important;
}

.ql-editor p {
    color: #000 !important;
}

.ql-editor h1, .ql-editor h2, .ql-editor h3 {
    color: #000 !important;
    font-weight: bold !important;
}

.ql-editor strong {
    color: #000 !important;
    font-weight: bold !important;
}

.ql-editor.ql-blank::before {
    color: #666 !important;
    font-style: italic !important;
}

/* Media Query for smaller screens */
/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: linear-gradient(45deg, var(--highlight), #ff00ff);
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(197, 49, 234, 0.5);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  width: 90%;
  max-width: 400px;
  transform: translateY(50px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu {
  transform: translateY(0) scale(1);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(197, 49, 234, 0.3);
}

.mobile-menu-logo {
  height: 50px;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(197, 49, 234, 0.2);
  color: var(--highlight);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 16px;
  background: rgba(26, 26, 51, 0.5);
  border: 1px solid rgba(197, 49, 234, 0.2);
  transition: all 0.3s ease;
  transform: translateX(-20px);
  opacity: 0;
}

.mobile-menu-overlay.active .mobile-nav a {
  transform: translateX(0);
  opacity: 1;
}

.mobile-nav a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav a:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav a:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav a:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav a:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav a:hover {
  background: rgba(197, 49, 234, 0.2);
  border-color: rgba(197, 49, 234, 0.5);
  transform: translateX(8px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.3);
}

.nav-text {
  text-align: center;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  body {
    height: auto;
    overflow-x: hidden;
  }

  .mobile-filter-btn {
    display: flex !important;
  }

  .topbar {
    justify-content: space-between;
    padding: 15px 20px;
  }
  
  .topbar .logo {
    height: 45px;
  }
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .nav a {
    font-size: 0.9rem;
    padding: 6px 10px;
    width: 80%;
    text-align: center;
  }

  /* Home page adjustments */
  .home > img {
    width: 90%;
    max-width: 400px;
    margin-bottom: 30px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .top-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .action-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
    justify-content: center;
  }

  /* Smaller floating NFTs on mobile */
  .floating-nft {
    width: 80px;
    height: 80px;
    border-radius: 8px;
  }

  .me-logo {
    height: 14px;
  }

  .disc-logo {
    height: 14px;
    width: 14px;
  }

  /* Gallery page adjustments */
  .main {
    flex-direction: column; /* Stack sidebar and gallery */
    height: auto; /* Allow content to determine height */
    overflow: visible; /* Reset overflow */
  }

  /* Disable hover effects on mobile/touch devices */
  .nft-card:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    background: var(--card-bg);
  }

  .nft-card:hover img {
    transform: none;
  }


  .sidebar {
    display: none; /* Hide sidebar completely on mobile */
  }

  .gallery-container {
    height: auto; /* Adjust height */
    overflow: visible;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); /* Smaller cards */
    gap: 10px;
    padding: 15px; /* Adjust padding */
    height: auto;
    overflow: visible;
  }

   .nft-card p {
     font-size: 0.8rem;
     padding: 8px;
   }

   .pagination {
     padding: 10px;
     gap: 8px;
   }

   .pagination button {
     padding: 6px 10px;
     font-size: 0.9rem;
   }

   .pagination span {
     font-size: 0.8rem;
   }

   .lightbox img {
     max-width: 95%;
     max-height: 85vh;
   }
}

/* Further adjustments for very small screens */
@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* Even smaller cards */
        gap: 8px;
        padding: 10px;
    }

    .nft-card p {
        font-size: 0.75rem;
        padding: 6px;
    }

    .sidebar {
        max-height: 40vh; /* Slightly less height for filters */
    }

    .topbar .logo {
        height: 45px;
    }

    .nav a {
        width: 90%; /* Make nav links wider */
    }
}




/* Admin Login/Dashboard Styles */
.admin-login-container,
.admin-dashboard-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--sidebar-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.admin-login-container h2,
.admin-dashboard-container h2,
.admin-dashboard-container h3 {
    color: var(--highlight);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="file"] {
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Rokkitt', serif;
    font-size: 1rem;
    font-weight: 400;
}

.admin-form input[type="file"] {
    cursor: pointer;
}

.admin-form button[type="submit"] {
    padding: 10px 15px;
    background-color: var(--highlight);
    color: var(--sidebar-bg);
    border: none;
    border-radius: 6px;
    font-family: 'Rokkitt', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-form button[type="submit"]:hover {
    background-color: #a028d0; /* Darker highlight */
}

.admin-memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.admin-meme-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    text-align: center;
    padding-bottom: 10px;
}

.admin-meme-item img {
    width: 100%;
    height: 120px; /* Fixed height for admin preview */
    object-fit: cover;
    display: block;
}

.admin-meme-item button {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #dc3545; /* Red for delete */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.admin-meme-item button:hover {
    background-color: #c82333; /* Darker red */
}

/* Mobile Filter Drawer */
.mobile-filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  display: flex;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-filter-overlay.active {
  opacity: 1;
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.mobile-filter-drawer {
  width: 85%;
  max-width: 400px;
  height: 100%;
  background: rgba(17, 17, 34, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(197, 49, 234, 0.3);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8),
              0 0 100px rgba(197, 49, 234, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-filter-overlay.active .mobile-filter-drawer {
  transform: translateX(0);
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.15) 0%, 
    rgba(197, 49, 234, 0.08) 100%);
  border-bottom: 1px solid rgba(197, 49, 234, 0.3);
  flex-shrink: 0;
}

.mobile-filter-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--highlight);
}

.mobile-filter-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-filter-close:hover {
  color: var(--highlight);
  background: rgba(197, 49, 234, 0.1);
  transform: scale(1.1);
}

.mobile-filter-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 100px; /* Space for action buttons */
}

.mobile-active-filters {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(26, 26, 51, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 12px;
}

.mobile-search-box {
  margin-bottom: 20px;
}

.mobile-search-box input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(26, 26, 51, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 49, 234, 0.2);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Rokkitt', serif;
  font-size: 1rem;
  font-weight: 400;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.mobile-search-box input:focus {
  outline: none;
  border-color: rgba(197, 49, 234, 0.5);
  box-shadow: 0 0 20px rgba(197, 49, 234, 0.2);
}

.mobile-filter-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top,
    rgba(17, 17, 34, 1) 0%,
    rgba(17, 17, 34, 0.95) 50%,
    rgba(17, 17, 34, 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(197, 49, 234, 0.2);
  display: flex;
  gap: 12px;
}

.mobile-apply-btn,
.mobile-clear-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Rokkitt', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-apply-btn {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 0.8) 0%, 
    rgba(197, 49, 234, 0.6) 100%);
  color: white;
  border: 1px solid rgba(197, 49, 234, 0.4);
}

.mobile-apply-btn:hover {
  background: linear-gradient(135deg, 
    rgba(197, 49, 234, 1) 0%, 
    rgba(197, 49, 234, 0.8) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.3);
}

.mobile-clear-btn {
  background: rgba(26, 26, 51, 0.6);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-clear-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Mobile Filter Spacing Fixes */
#mobileFilters {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Space between filter groups */
}

#mobileFilters .filter-group {
  margin-bottom: 0; /* Remove any default margins */
}

#mobileFilters .filter-options {
  padding: 12px 16px 16px 16px; /* More breathing room */
}

#mobileFilters .filter-group label {
  margin: 6px 0; /* Space between individual filter items */
  padding: 8px 12px; /* Comfortable touch targets */
}

#mobileFilters .filter-group label:first-child {
  margin-top: 8px; /* Extra space from header */
}

#mobileFilters .filter-group label:last-child {
  margin-bottom: 8px; /* Extra space to bottom */
}

/* Footer Styles */
.footer {
  background: rgba(26, 26, 51, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(197, 49, 234, 0.2);
  padding: 30px 0;

}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.footer-socials {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(26, 26, 51, 0.6);
  border: 1px solid rgba(197, 49, 234, 0.3);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(197, 49, 234, 0.2);
  border-color: rgba(197, 49, 234, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 49, 234, 0.3);
}

.social-link span {
  color: inherit;
}

.social-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-text {
  color: rgba(240, 240, 245, 0.6);
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}

@media (max-width: 768px) {
  .footer {
    padding: 20px 0;
    margin-top: 40px;
  }
  
  .footer-content {
    padding: 0 15px;
    gap: 15px;
  }
  
  .footer-socials {
    gap: 15px;
  }
  
  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* Remove current image button */
.remove-current-image {
  margin-top: 10px !important;
  font-size: 0.9rem !important;
  padding: 8px 16px !important;
}