/* Catppuccin Mocha Color Palette */
:root {
    --ctp-rosewater: #f5e0dc;
    --ctp-flamingo: #f2cdcd;
    --ctp-pink: #f5c2e7;
    --ctp-mauve: #cba6f7;
    --ctp-red: #f38ba8;
    --ctp-maroon: #eba0ac;
    --ctp-peach: #fab387;
    --ctp-yellow: #f9e2af;
    --ctp-green: #a6e3a1;
    --ctp-teal: #94e2d5;
    --ctp-sky: #89dceb;
    --ctp-sapphire: #74c7ec;
    --ctp-blue: #89b4fa;
    --ctp-lavender: #b4befe;
    --ctp-text: #cdd6f4;
    --ctp-subtext1: #bac2de;
    --ctp-subtext0: #a6adc8;
    --ctp-overlay2: #9399b2;
    --ctp-overlay1: #7f849c;
    --ctp-overlay0: #6c7086;
    --ctp-surface2: #585b70;
    --ctp-surface1: #45475a;
    --ctp-surface0: #313244;
    --ctp-base: #1e1e2e;
    --ctp-mantle: #181825;
    --ctp-crust: #11111b;
}

@font-face {
    font-family:Onest;
    src: url(fonts/main.ttf);
    
} 
@font-face {
    font-family:OnestBold;
    src: url(fonts/bold.ttf);
    
} 
 header {
    padding-bottom: 10px;
 }

h1 {
    color: var(--ctp-lavender);
    font-size: 48px;
    margin-bottom: 10px;
    margin-top: 0;
}

p {
    color: var(--ctp-subtext1);
}

#game-count {
  font-size:24px;
    margin: 10px 0;
}

hr {
    border-color: var(--ctp-surface2);
    opacity: 0.5;
}


#gsearchbar {
    outline: none;
    width: 355px;
    font-size: 16px;
    border: 2px solid var(--ctp-surface2);
    background-color: var(--ctp-surface0);
    color: var(--ctp-text);
    padding: 12px;
    margin-bottom: 10px;
    transition: 0.2s ease;
}

#gsearchbar:focus {
    background-color: var(--ctp-surface1);
    border-color: var(--ctp-mauve);
    box-shadow: 0 0 0 3px rgba(203, 166, 247, 0.2);
}

#gsearchbar::placeholder {
    color: var(--ctp-overlay0);
}

 .gradient-background {
    background: linear-gradient(300deg, var(--ctp-crust), var(--ctp-mantle), var(--ctp-base), var(--ctp-surface0), var(--ctp-surface1), var(--ctp-surface0), var(--ctp-base), var(--ctp-mantle));
    background-size: 480% 480%;
    animation: gradient-animation 80s ease infinite;
  }
  
  @keyframes gradient-animation {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
body {
    background-image: url("img/bg.jpg");
    background-repeat: no-repeat;
    background-position: absolute;
    font-family:Onest;
    color: var(--ctp-text); 
    text-align: center;
    cursor: url('comic.cur'), auto;
}
  
.logo {
    height:200px;
    width: 200px;
    margin-bottom: 0;
}

a {
    padding: 10px;
    font-size: 24px;
    text-decoration: none;
    color: var(--ctp-blue);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ctp-mauve);
}

.dot {
    font-size: 24px;
    display: inline;
    color: var(--ctp-overlay0);
}

.visit {
    font-family:OnestBold;
    display: inline;
}

.visit a {
    color: var(--ctp-lavender);
}

/* Games Grid Container */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Game Card */
.game-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--ctp-surface0);
    border: 2px solid var(--ctp-surface2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--ctp-mauve);
    box-shadow: 0 8px 20px rgba(203, 166, 247, 0.3);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

/* Custom fit for games with text that gets cut off */
.game-card.fit-contain img {
    object-fit: contain;
    background-color: var(--ctp-surface0);
}

/* Game Title Overlay */
.game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(17, 17, 27, 0.95), transparent);
    color: var(--ctp-text);
    padding: 40px 15px 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-title {
    opacity: 1;
}

/* Section headers - hide by default in grid view */
.section-divider {
    display: none;
}

/* Legacy support for old structure */
div.polaroid {
  display: none;
}

.game {  
    border-radius: 12px;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  
  @keyframes smooth-appear {
    to{
      bottom: 20px;
      opacity:1;
    }
  }
  .container {
    background-color: var(--ctp-surface0);
    border: 2px solid var(--ctp-surface2);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.25);
    color: var(--ctp-text);
    padding: 10px;
    position: fixed;
    bottom: -100%;
    opacity:0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    animation: smooth-appear 1s ease forwards;
    font-size: 16px;
  }

  /* Alphabet Navigation Sidebar */
  .alphabet-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--ctp-mantle);
    border: 2px solid var(--ctp-surface0);
    padding: 15px 10px;
    border-radius: 15px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.25);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: var(--ctp-mauve) transparent;
  }

  .alphabet-nav::-webkit-scrollbar {
    width: 6px;
  }

  .alphabet-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .alphabet-nav::-webkit-scrollbar-thumb {
    background-color: var(--ctp-mauve);
    border-radius: 3px;
  }

  .alphabet-nav a {
    color: var(--ctp-text);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 18px;
    font-family: OnestBold;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 35px;
  }

  .alphabet-nav a:hover {
    background-color: var(--ctp-mauve);
    transform: scale(1.1);
    color: var(--ctp-crust);
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .alphabet-nav {
      right: 5px;
      padding: 10px 6px;
      gap: 5px;
    }
    
    .alphabet-nav a {
      padding: 6px 8px;
      font-size: 14px;
      min-width: 28px;
    }
  }
