body {
    width: 100%;
    height: 100%;
    --s: 40px; /* size control */
    
    /* Soft gradient colors */
    --c: #000000, #111, #181818, #1a1a1a 90deg, #222 120deg;
    --g1: radial-gradient(circle at 50% 50%, #0d0d0d, #111111, #151515);
    --g2: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(30, 30, 30, 0.9));
    
    /* Enhanced background */
    background: var(--g1), var(--g2) var(--s) calc(1.5 * var(--s));
    background-size: cover; /* Ensures the gradient covers the entire viewport */
    background-attachment: fixed; /* Fixed background on scroll */
    
    margin: 0;
    padding: 0;
    color: #e0e0e0; /* Light text for better readability */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  
  
  
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Adds depth with a shadow */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.8)); 
  }
  
  
  h1 {
    margin: 0;
    font-size: 2.5em;
    color: white;
  }
  
  #search-input {
    width: 190px;
    background-color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 10px;
    outline: none;
    color: rgb(0, 0, 0);
  }
  
  #search-input:focus {
    animation: rotateShadow 2s infinite linear;
  }
  
  
  @keyframes rotateShadow {
    0% {
      box-shadow: -2px -2px 0px 0px #58eb3b, 2px 2px 0px 0px #3af3fd;
    }
    25% {
      box-shadow: -2px 2px 0px 0px #e81515, 2px -2px 0px 0px #3af3fd;
    }
    50% {
      box-shadow: 2px 2px 0px 0px #a8b628, -2px -2px 0px 0px #3af3fd;
    }
    75% {
      box-shadow: 2px -2px 0px 0px #24aae9, -2px 2px 0px 0px #3af3fd;
    }
    100% {
      box-shadow: -2px -2px 0px 0px #97ef4b, 2px 2px 0px 0px #3af3fd;
    }
  }
  
  
  
  
  
  
  
  #search-button {
    position: relative;
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1em 2.5em;
    display: inline-block;
    cursor: pointer;
    border-radius: 6em;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    font-weight: 500;
    color: black;
    background-color: rgba(26, 163, 194, 0.63);
  }
  
  #search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  #search-button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  }
  
  #search-button::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 100px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.4s;
  }
  
  #search-button::after {
    background-color: #fff;
  }
  
  #search-button:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
  }
  
  
  
  
  
  #toggle-suggestions {
    padding: 0.5em 2em;
    border: transparent;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    background-color: rgba(26, 163, 194, 0.63);
    color: white;
    border-radius: 10px;
    margin:0%; /* Consistent margin */
    margin-bottom: 10px;
    width: 90%;
  
  
  }
  
  
  
  
  #search-button:hover,
  #toggle-suggestions:hover {
    background: rgb(2,0,36);
    background: linear-gradient(90deg, rgba(30,144,255,1) 0%, rgba(0,212,255,1) 100%);
  }
  
  search-button:active, 
  #toggle-suggestions:active {
    transform: translate(0em, 0.2em);
  }
  
  #suggestions {
    position: relative;
    top: 0px;
    background-color: #211e1e64;
    color: #ffffff;
    width: 300px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Adds depth with a shadow */
  
  }
  
  #suggestions div {
    padding: 10px;
    cursor: pointer;
  }
  
  #suggestions div:hover {
    background-color: #000000;
  }
  
  
  .anime-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(12, 13, 13, 0.678);
    padding: 5px;
    border-radius: 100%;
    font-weight: bold;
    box-shadow: 0 4px 10px rgb(0, 0, 0); /* Adds depth with a shadow */
    font-size: 0.8rem;
  
  }
  
  
  
  
  
  
  /* General layout for category buttons */
  #category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 10px rgb(0, 0, 0); /* Adds depth with a shadow */
  
  }
  
  .genre-button, .category-button {
    font-size: 0.8em;
    margin-bottom: 10px;
    border: none;
    outline: none;
    border-radius: 0.4rem;
    cursor: pointer;
    text-transform: uppercase;
    flex: 1 1 auto;
    max-width: 200px;
    box-sizing:calc();
    background-color: #1eaad16f;
    color: white;
    font-family :'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    box-shadow: 0 4px 10px rgb(0, 0, 0); /* Adds depth with a shadow */
  }
  
  /* This will hide the menu toggle and the side menu on large screens (PCs) */
  @media (min-width: 768px) {
    /* Hide menu toggle and side menu on larger screens */
    #menu-toggle, .menu-label {
      display: none; /* Hide toggle checkbox and menu label on PC */
    }
    
    /* Show the buttons normally for larger screens */
    #category-container {
      position: static;
      display: flex; /* Side-by-side layout on PCs */
      flex-direction: row; /* Arrange buttons side by side */
      width: 100%;
      height: auto;
      background-color: transparent; /* No background for larger screens */
    }
  }
  
  /* Mobile: Show the side menu and toggle */
  @media (max-width: 768px) {
  
  
  
    .genre-button, .category-button {
      font-size: 0.8rem;
      padding: 0.6rem 1rem;
      margin-bottom: 10px;
      border: none;
      outline: none;
      border-radius: 0.4rem;
      cursor: pointer;
      text-transform: uppercase;
      flex: 1 1 auto;
      max-width: 200px;
      box-sizing:calc();
      background-color: #1e8fd140;
      color: white;
  
    }
  
    #category-container {
      display: block; /* Stack buttons vertically */
      position: fixed;
      left: -250px; /* Hidden off-screen initially */
      width: 210px;
      top: 0;
      height: 100vh;
      background-color: #111111ca; /* Dark background for side menu */
      transition: left 0.3s ease;
      z-index: 1000;
    }
  
    /* Display buttons as a block for mobile */
    .category-button {
      display: block;
      width: 100%;
      margin: 10px 0;
    }
  
    /* Show the menu toggle (hamburger icon) on mobile */
    .menu-label {
      cursor: pointer;
      position:fixed;
      top: 10px;
      left: 10px;
      font-size: 45px;
      z-index: 1001;
      color: rgba(21, 174, 209, 0.841);
      font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    }
    
  
    /* Open the side menu when the toggle is checked */
    #menu-toggle:checked ~ #category-container {
      left: 0; /* Slide the menu in from the left */
    }
  
  
    .anime-card {
      background-color: #0076d726;
      color: #fff;
      border-radius: 10px;
      width: 200px;
      text-align: center;
      transition: transform 0.2s;
      margin: 10px;
      box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
      overflow: hidden;
      position: relative;
    
      
    }
  
  
  
  
  }
  
  /* Hover and active styles for buttons */
  .genre-button:hover, .category-button:hover {
    background: rgb(2,29,78);
    background: linear-gradient(270deg, rgba(2, 29, 78, 0.681) 0%, rgba(31, 215, 232, 0.873) 60%);
    color: rgb(4, 4, 38);
  }
  
  .genre-button:active, .category-button:active {
    scale: 0.92;
  }
  
  
  
  
  
  main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.292); /* Adds depth with a shadow */
  
  }
  
  #anime-cards-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    width: 100%; 
  }
  
  section {
    width: 100%;
    margin-bottom: 20px;
    
    
  }
  
  section h2 {
    margin: 0;
    margin-bottom: 10px;
    font-size: 2em;
    color: white;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    margin-left : 10px;
    box-shadow : 0 4px 10px rgb(0, 0, 0); /* Adds depth with a shadow */
    background-color: rgba(26, 163, 194, 0.133);
    border-radius: 50px;
    text-align: center;
  }
  
  
  
  
  
  .anime-card {
    background-color: #1a538100;
    color: #fff;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s;
    margin: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.636); /* Adds depth with a shadow */
    overflow: hidden;
    position: relative;
    font-size: 15px;
    flex: 0 0 auto; /* Prevent shrinking or growing */
    width: 180px; /* Set a width for each card */
    margin: 0 10px;
    margin-top: 20px;
    height: 250px;
  }
  
  /* Overlay anime-basic-info on top of the image */
  .anime-basic-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.367); /* Dark background for better readability */
    color: rgb(255, 255, 255);
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.711); /* Subtle shadow for depth */
    opacity: 1; /* Always visible */
    font-weight: bold; /* Use 'bold' for better visibility */
    font-size: 0.8rem; /* Increased font size for better readability */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Text shadow for additional contrast */ 
  }
  
  .anime-card img {
    width: 100%;
    height: 100%; /* Ensures the image takes the full container height */
    border-radius: 10px;
    transition: transform 0.3s ease;
    object-fit: cover; /* Ensures the image fits without distortion */
  }
  
  .anime-card:hover {
    transform: scale(1.009);
    cursor: pointer;
    box-shadow: 0px 0px 30px 1px rgba(0, 255, 117, 0.30); /* Glowing effect on the edges */
    border-radius: 20px;
    border: 3px solid transparent; /* Transparent border */
    background-origin: border-box; 
    background-clip: padding-box, border-box;
    background-image: linear-gradient(#000000aa, #2a2f33aa), linear-gradient(163deg, hsl(0, 0%, 100%) 0%, #05d1ff 100%);
    transition: transform 0.2s, all 0.3s;
    font-weight: bold; /* Use 'bold' for better visibility */
    font-size: 0.8rem; /* Increased font size for better readability */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Text shadow for additional contrast */ 
  
    .anime-basic-info {
      display: none;
    }
  }
  
  /* Hide .anime-info until hover */
  .anime-info {
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.623); /* Dark background for better readability */
    color: white;
    padding: 10px;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Subtle shadow for depth */
    border-radius: 22px; /* Rounded corners for a softer look */
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  }
  
  /* Show anime-info on hover */
  .anime-card:hover .anime-info {
    display: block;
    opacity: 1;
  }
  
  .anime-card h3 {
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 5px;
  }
  
  .anime-card p {
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 5px;
  }
  
  .anime-card-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 10px;
    box-sizing: border-box;
    transition: opacity 0.3s;
    display: none;
  }
  
  .anime-card:hover .anime-card-details {
    display: block;
  }
  
  .anime-card-details h3 {
    margin: 0;
    font-size: 1.2em;
  }
  
  .anime-card-details p {
    margin: 5px 0;
    font-size: 0.9em;
  }
  
  .anime-card-details span {
    display: block;
    font-size: 0.8em;
    margin-top: 5px;
  }
  
  .anime-card-details .episodes {
    margin-top: 10px;
  }
  
  .anime-card-details .episodes p {
    margin: 0;
    font-size: 0.8em;
  }
  
  
  #pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Adds depth with a shadow */
  
  }
  
  #pagination button {
    width: 150px;
    padding: 0;
    border: none;
    transform: rotate(5deg);
    transform-origin: center;
    font-family: "Gochi Hand", 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; 
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    padding-bottom: 3px;
    border-radius: 5px;
    box-shadow: 0 2px 0 #494a4b;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #417ed4;
  }
  
  
  #pagination button span {
    background: #f1f5f8;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 2px solid #494a4b;
  }
  
  
  #pagination button:active {
    transform: translateY(5px);
    padding-bottom: 0px;
    outline: 0;
  }
  
  .error-container {
    text-align: center;
    padding: 20px;
  }
  
  .error-message {
    color: #ff0000;
  }
  
  
  
  .anime-section {
    margin: 20px 0;
  }
  
  .scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible; /* Ensure overflow is visible so cards aren't clipped */
  }
  
  .inline-scroll {
    display: inline-flex; /* Display cards inline */
    overflow-x: auto; /* Allow horizontal scrolling */
    scroll-behavior: smooth;
    flex-wrap: nowrap; /* Prevent items from wrapping */
    width: 100%; /* Full container width */
    padding-left: 10px; /* Add some padding to avoid clipping the first card */
    box-sizing: border-box; /* Ensure padding is included in the total width */
  }
  
  .anime-card-container {
    flex: 0 0 auto; /* Prevent shrinking or growing */
    margin: 0 10px; /* Provide space between the cards */
    height: 300px;
  }
  
  
  
  .scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2; /* Make sure the buttons are above the cards */
    transform: scale(2);
    font-weight: bolder;
    border-radius: 100%;
    background-color: rgba(20, 22, 21, 0.641);
    height: 15%;
    }
  
  
  .scroll-button.left {
    left: 0;
  }
  
  .scroll-button.right {
    right: 0;
  }
  
  .scroll-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
  }
  
  /* Custom scrollbar for WebKit browsers (Chrome, Safari, Edge) */
  .inline-scroll::-webkit-scrollbar {
    height: 8px; /* Scrollbar height */
  }
  
  .inline-scroll::-webkit-scrollbar-track {
    background: #2e2e2e; /* Track background */
    border-radius: 10px; /* Rounded track */
  }
  
  .inline-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #198292, #277997); /* Gradient color for thumb */
    border-radius: 10px; /* Rounded scrollbar thumb */
    border: 2px solid #2e2e2e; /* Adds padding between the thumb and the track */
  }
  
  .inline-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff4b4b, #f94d6f); /* Darker color on hover */
  }
  
  /* Styling for scrollbars in Firefox */
  .inline-scroll {
    scrollbar-width: thin; /* Makes the scrollbar thinner */
    scrollbar-color: #6be4ff #2e2e2e; /* Thumb color and track color */
  }
  
  /* Scroll container tweaks for smoother appearance */
  .inline-scroll {
    display: inline-flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex-wrap: nowrap;
    width: 100%;
    padding-left: 10px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* Enable smooth scrolling on touch devices */
  }
  
  
  
  /* For WebKit browsers like Chrome, Safari, and Edge */
::-webkit-scrollbar {
  width: 8px; /* Reduced width */
}

::-webkit-scrollbar {
  height: 8px; /* Reduced height for horizontal scrollbar */
}

::-webkit-scrollbar-track {
  background: #1a1a1a; /* Dark background for track */
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #2991b0, #e7e7e4); /* Gradient color for thumb */
  border-radius: 5px; /* Rounded edges for a cool look */
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #f6f6f6, #bc1818); /* Hover effect */
}
