:root {
  --void-theme-bg: url('https://gitlab.com/arcade_v/arcade_v_images/-/raw/main/backgrounds/void_theme.png');
  --text-color: #ffffff;
  --selected-text-color: #7F00FF;
  --border-color: #ffffff;
  --primary-color: #7F00FF;
  --primary-color-rgb: 127, 0, 255;
  --background-overlay: rgba(0, 0, 0, 0.7);
  --dropdown-bg: rgba(0, 0, 0, 0.85);
  --hover-scale: 1.05;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-height: 60px;
  --game-button-width: 200px;
  --game-button-height: 250px;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body styles */
body {
  background-image: var(--void-theme-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  font-family: "Pixelify Sans", sans-serif;
  text-align: center;
  color: var(--text-color);
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

/* Pixelated Spinner Container */
#spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}
.game-button button, .game-button-no-rounding button {
  border: none;
  background: none;
  padding: 0;
  outline: none;
}
/* Pixel block spinner */
.spinner-icon {
  width: 16px;
  height: 16px;
  background: #ffffff;
  image-rendering: pixelated;
  box-shadow:
    32px 0 #ffffff,
    0 32px #ffffff,
    32px 32px #ffffff;
  animation: pixel-spin 1s steps(1) infinite;
}

@keyframes pixel-spin {
  0% {
    box-shadow:
      32px 0 #ffffff,
      0 32px #ffffff,
      32px 32px #ffffff;
  }
  25% {
    box-shadow:
      0 0 #ffffff,
      32px 0 #ffffff,
      0 32px #ffffff;
  }
  50% {
    box-shadow:
      0 0 #ffffff,
      32px 32px #ffffff,
      0 32px #ffffff;
  }
  75% {
    box-shadow:
      0 0 #ffffff,
      0 32px #ffffff,
      32px 0 #ffffff;
  }
  100% {
    box-shadow:
      32px 0 #ffffff,
      0 32px #ffffff,
      32px 32px #ffffff;
  }
}

                   /* Navbar styles */                   
                   .navbar {                
                        display: flex;
                        justify-content: space-around;
                        width: 100%;
                        text-align: left;
                        list-style-type: none;
                        margin: 0;
                        padding: 0;
                        position: fixed;
                        top: 0;
                        left: 0;
                        background-size: cover;
                        z-index: 1000;
                        border-bottom: none;
                        background-image: url('https://gitlab.com/arcade_v/arcade_v_images/-/raw/main/backgrounds/void_theme.png');

                    }



.navbar ul,
.dropdown-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar ul {
  display: flex;
  width: 100%;
  justify-content: space-around;
}

.navbar li {
  position: relative;
}

.navbar a {
  display: block;
  text-align: center;
  padding: 18px 16px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1rem;
  transition: all 0.3s var(--transition-timing);
  position: relative;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s var(--transition-timing);
  transform: translateX(-50%);
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 80%;
}

.navbar a:hover {
  color: var(--primary-color);
}

.navbar a.active {
  color: var(--primary-color);
  font-weight: bold;
}

/* Dropdown */
.dropdown-content {
  background-color: var(--dropdown-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  position: absolute;
  min-width: 180px;
  z-index: 1001;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  animation: dropdownFade 0.3s var(--transition-timing);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
  transform: translateY(0);
  }
}

.dropdown-content a {
  color: var(--text-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: rgba(var(--primary-color-rgb, 127, 0, 255), 0.25);
  color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Game buttons container */
.game-buttons-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--game-button-width), 1fr));
  gap: 25px;
  padding: 30px 20px;
  max-width: 1400px;
  margin: 0 auto;
  margin-top: 40px;
}




/* Game button styling */
.game-button, .game-button-no-rounding {
    width: 200px;
    height: 250px; /* image + title */
    padding: 15px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.5s ease;
    transform-origin: center center; /* Important */
}

.game-button:hover, .game-button-no-rounding:hover {
    transform: scale(1.1); /* smaller scale to reduce overlap */
    z-index: 10; /* bring hovered button above others */
    transition-timing-function: cubic-bezier(0.47, 2.02, 0.31, -0.36);
}



.game-button img,
.game-button-no-rounding img {
  background-color: transparent; 
  border: none;
  outline: none; 
  cursor: pointer;
    width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 25px;
  transition: transform 0.4s var(--transition-timing);
  box-shadow 0.6s ease-in-out; 
}

.game-button:hover img,
.game-button-no-rounding:hover img {
    box-shadow:
        0 0 20px rgba(var(--primary-color-rgb), 0.5),
        0 0 40px rgba(var(--primary-color-rgb), 0.25);
}

.game-title {
  color: var(--text-color);
  font-size: 1.1rem;
  margin-top: 12px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease, transform 0.3s ease;
}

.game-button:hover .game-title,
.game-button-no-rounding:hover .game-title {
  color: var(--primary-color);
  transform: translateY(-2px);
}


/* Iframe Styling */
iframe {
  width: 100%;
  height: calc(100vh - var(--navbar-height));
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  border: none;
  background: transparent;
}

/* Form controls */
#searchBar,
select,
#resetButton {
  font-family: "Pixelify Sans", sans-serif;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  outline: none;
  transition: all 0.3s var(--transition-timing);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#searchBar {
  padding: 12px 20px;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
}

#searchBar:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 127, 0, 255), 0.2);
}

select {
  padding: 12px 40px 12px 20px;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 127, 0, 255), 0.2);
}

option {
  background-color: #000;
  color: var(--text-color);
  padding: 12px;
}

option:disabled {
  color: #666;
}

#resetButton {
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#resetButton:hover {
  background-color: rgba(var(--primary-color-rgb, 127, 0, 255), 0.2);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

#resetButton:active {
  transform: scale(0.95);
}

/* Content container */
.content-container {
  width: 100%;
  height: calc(100vh - var(--navbar-height));
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  border: none;
  color: var(--text-color);
}

/* Favorite icon */
.favorite-icon {
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 8px;
  transition: all 0.3s var(--transition-timing);
  color: var(--secondary-color, #ffd700);
}

.favorite-icon:hover {
  transform: scale(1.2);
}

/* Pagination */
.pagination {
  margin: 40px 0 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--text-color);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s var(--transition-timing);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.pagination button:hover:not(.active-page) {
  background-color: rgba(var(--primary-color-rgb, 127, 0, 255), 0.2);
  border-color: rgba(var(--primary-color-rgb, 127, 0, 255), 0.5);
}

.pagination button.active-page {
  background-color: rgba(var(--primary-color-rgb, 127, 0, 255), 0.3);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Labels and text */
label {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

p {
  color: var(--text-color);
  line-height: 1.6;
  margin: 1em 0;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
  :root {
    --game-button-width: 160px;
    --game-button-height: 220px;
  }
  
  .navbar {
    justify-content: space-between;
    padding: 0 20px;
  }
  
  .navbar ul {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .navbar a {
    padding: 18px 12px;
    font-size: 1rem;
    white-space: nowrap;
  }
  
  .game-buttons-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 15px;
  }
  
  .game-button img,
  .game-button-no-rounding img {
    height: 160px;
  }
  
  .game-title {
    font-size: 0.95rem;
  }
  
  #searchBar,
  select {
    max-width: 100%;
    margin: 0 15px;
  }
  
  .dropdown-content {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  :root {
    --game-button-width: 140px;
    --game-button-height: 200px;
  }
  
  .game-buttons-container {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
  }
  
  .pagination button {
    min-width: 35px;
    height: 35px;
    padding: 0 8px;
    font-size: 0.9rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .game-button:hover,
  iframe {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #9d00ff;
    --text-color: #ffffff;
    --border-color: #ffffff;
  }
  
  .navbar {
    background-color: #000;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .game-button:hover,
  .game-button-no-rounding:hover {
    transform: none;
  }
}



