:root {
  /* Colors */
  --bg-color: #1b1525;
  --navbar-bg: #1e1a2e;
  --card-bg: #2e294e;
  --card-hover-shadow: rgba(0, 0, 0, 0.3);
  --accent-color: #ff4da6;
  --footer-bg: #161324;
  --footer-text: #ccc;
  --footer-link-hover: #ff4da6;
  --text-color: white;
  --text-muted: #bbb;
  --text-muted-dark: #999;
  --overlay-dark: rgba(0, 0, 0, 0.6);
  --gradient-fade-start: #1b1525;

      /* Existing variables */
    --primary-bg-color: #1a1a1a; /* Dark background */
    --secondary-bg-color: #2a2a2a; /* Slightly lighter dark background for cards/sections */
    --text-color: #f0f0f0; /* Light text */
    --gray-light: #b0b0b0; /* Lighter gray for secondary text */
    --pink-color: #ff007f; /* Your vibrant pink accent */
    --dark-pink-color: #cc0066; /* Darker pink for hover */

    /* NEW ANIME-STYLE VARIABLES */
    --neon-blue: #00eaff; /* Bright blue for highlights/glows */
    --neon-purple: #9d00ff; /* Bright purple */
    --glitch-red: #ff0000; /* For glitch effect */
    --glitch-blue: #0000ff; /* For glitch effect */
    --glitch-green: #00ff00; /* For glitch effect */

    --overlay-dark: rgba(0, 0, 0, 0.7); /* Existing overlay */
    --overlay-light: rgba(255, 255, 255, 0.05); /* Very subtle light overlay */

  /* Font sizes */
  --font-base: 1rem; /* 16px */
  --font-lg: 1.5rem; /* 24px */
  --font-xl: 2rem; /* 32px */
  --font-xxl: 2.4rem; /* 38.4px */

  /* Spacing */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 15px;
  --space-lg: 20px;
  --space-xl: 40px;

  /* Border radius */
  --border-radius: 10px;

  /* Shadows */
  --box-shadow-hover: 0 4px 15px var(--card-hover-shadow);
}

/* Global Reset & Box Sizing */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Includes padding & border in element's total size */
}

/* Base HTML & Body Styles */
html {
  font-size: 16px; /* Base font size for rem units */
  scroll-behavior: smooth; /* Smooth scrolling for anchor links */
  -webkit-font-smoothing: antialiased; /* Better font rendering on WebKit browsers */
  -moz-osx-font-smoothing: grayscale; /* Better font rendering on Firefox for macOS */
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5; /* Standard line height */
  background-color: var(--bg-color, #1b1525); /* fallback if var not defined */
  color: var(--text-color, #fff);
  min-height: 100vh; /* Ensure body takes full viewport height */
  text-transform: capitalize;
  -webkit-text-size-adjust: 100%; /* Prevent text size adjustment on mobile browsers */
}

/* Responsive Images & Media */
img,
picture,
video,
canvas,
svg {
  display: block; /* Removes extra space below inline images */
  max-width: 100%; /* Ensures image scales down within its container */
  height: auto; /* Maintains aspect ratio when scaling */
}

/* Form Elements & Buttons */
input,
button,
textarea,
select {
  font: inherit; /* Inherit font styles from parent */
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Links */
a {
  color: inherit; /* Inherit color from parent */
  text-decoration: none; /* Remove underline */
}

/* Lists */
ul,
ol {
  list-style: none; /* Remove bullet points/numbers */
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Blockquotes & Quotes */
blockquote,
q {
  quotes: none; /* Remove default quote marks */
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* Accessibility: Focus Outline */
:focus-visible {
  outline: 2px solid var(--accent-color, #ff4da6);
  outline-offset: 2px; /* Adds space between outline and element */
}

/* Scrollbar Styling (Optional) */
/* Global scrollbar (for the entire page) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent-color, #ff4da6);
  border-radius: 4px;
  border: 2px solid transparent; /* Creates a thinner accent color line */
  background-clip: content-box; /* Ensures border is not filled by background */
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100; /* Ensure navbar stays on top */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--navbar-bg, #1e1a2e);
  padding: var(--space-lg, 20px) 40px;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.logo {
  font-size: var(--font-xl, 2rem);
  font-weight: bold;
}

.logo span {
  color: var(--accent-color, #ff4da6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md, 15px);
}

.nav-links a {
  color: var(--text-color, white);
  text-decoration: none;
  font-weight: bold;
  padding: var(--space-xs, 5px) var(--space-sm, 10px); /* Add padding for clickable area */
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color, #ff4da6);
}

nav input[type="text"] {
  padding: 8px;
  border: none;
  border-radius: 5px;
  max-width: 300px;
  width: 100%; /* Ensure it takes full width up to max-width */
}

.login-btn {
  background-color: var(--accent-color, #ff4da6);
  color: var(--text-color, white);
  border: none;
  padding: 8px 16px;
  margin-left: var(--space-xs, 5px);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-btn:hover {
  background-color: color-mix(in srgb, var(--accent-color, #ff4da6) 90%, black); /* Darken accent color */
  opacity: 0.9;
}

/* Hero Section */
.hero {
  padding: 2rem 4rem;
}

.spotlight {
  position: relative;
  overflow: hidden;
  background: none; /* Background set by ::before pseudo-element */
  padding: 1.5rem;
  display: flex; /* Use flex to align content within spotlight */
}
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--overlay-dark, rgba(0, 0, 0, 0.7));
  z-index: 1;

}


.spotlight-text {
  position: relative;
  z-index: 2; /* Ensure text is above overlay */
}

.spotlight-text h1 {
  font-size: var(--font-xxl, 2rem);
  margin-bottom: var(--space-xs, 5px);
}

.spotlight-text h2 {
  font-size: var(--font-lg, 1rem);
  color: var(--text-muted, #bbb);
  margin-bottom: var(--space-md, 10px);
}

.spotlight-text p {
    font-size: var(--font-base, 0.5rem);
    text-align: justify;
    width: auto; 
    display: -webkit-box;       
    -webkit-line-clamp: 2;      
    -webkit-box-orient: vertical; 
    overflow: hidden;           
    text-overflow: ellipsis;
}

.download-link,
.telegram-link {
  display: inline-block; /* Changed to inline-block for side-by-side if needed */
  margin: var(--space-xs, 5px) var(--space-sm, 10px); /* Add some horizontal margin */
  color: var(--accent-color, #ff4da6);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.2s ease;
}

.download-link:hover,
.telegram-link:hover {
  color: var(--text-color, white);
  transform: translateY(-2px);
}

.flex-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* Allow items to wrap */
  gap: 1rem; 
}

/* Trending & New Sections */
.trending,
.New {
  margin-top: var(--space-xl, 40px);
}

.trending-list-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 2rem;
  flex-wrap: wrap;
  overflow-x: hidden; /* Prevent horizontal scroll for this list if items are too big */
  padding: 0;
}

.card-small {
   height: auto;
   max-width: 160px;
   cursor: pointer;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
   margin-bottom: 1rem;
   background-color: var(--card-bg, #2e294e); /* Match card background */
   overflow: hidden; /* Clip image corners */
}

.card-small img {
  width: 100%;
  aspect-ratio: 3/4; /* Maintain aspect ratio for images */
  object-fit: cover; /* Cover the area, cropping if necessary */
}

.card-small span {
    display: -webkit-box; /* Required for -webkit-line-clamp */
    -webkit-line-clamp: 2; /* Limit to 3 lines */
    -webkit-box-orient: vertical; /* Required for -webkit-line-clamp */
    overflow: hidden; /* Hide overflowing content */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
    margin: 0.3rem 4px var(--space-sm, 10px);
    font-size: 0.8rem;
    color: var(--text-color, white);
}

.card-small:hover {
  transform: scale(1.03); /* Slightly enlarge on hover */
  box-shadow: var(--box-shadow-hover, 0 4px 15px rgba(0, 0, 0, 0.3));
}

.card {
  background-color: var(--card-bg, #2e294e);
  width: 240px; /* Fixed width for initial layout */
  text-align: center;
  color: var(--text-color, white);
  flex-shrink: 0; /* Prevent shrinking below this width */
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden; 
  margin-bottom: var(--space-lg, 20px); 
}

.card:hover {
  transform: scale(1.01);
  box-shadow: var(--box-shadow-hover, 0 4px 15px rgba(0, 0, 0, 0.3));
}

.card img {
  width: 100%;
  aspect-ratio: 3/4; 
  object-fit: cover;
}

.card span {
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.3rem;
    text-align: start;
    font-size: 13px;
}

/* Category Section */
.category {
  margin-top: var(--space-xl, 40px);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md, 15px);
  margin-top: var(--space-lg, 20px);
}

.category-list > div {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.7); /* Dim background image */
  color: var(--text-color, white);
  background-color: #634786; /* Fallback/solid color if no image */
  font-weight: bold;
  font-size: 15px;
  padding: var(--space-md, 15px);
  border-radius: var(--border-radius, 10px);
  flex: 1 0 160px; /* Allow items to grow/shrink, but maintain min width */
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  user-select: none; /* Prevent text selection */
  transition: filter 0.3s ease, transform 0.3s ease;
  min-height: 100px; /* Ensure visibility even without text */
}

.category-list > div:hover {
  filter: brightness(1.1); /* Brighten on hover */
  transform: scale(1.03); /* Slight enlargement on hover */
}

/* Specific category images */
.category-list .e,
.category-list .r,
.category-list .t,
.category-list .y {
  background-image: url('assets/img/on.jpg'); /* Example image for categories */
}

.category-list .see-more {
  background-color: var(--accent-color, #cc4488); /* Use accent color */
  color: var(--text-color, white);
  text-shadow: none; /* Remove text shadow for this specific div */
  filter: none; /* Remove brightness filter */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}



/* Section Headings */
section h1 {
  padding-bottom: var(--space-lg, 20px);
  padding-top: var(--space-xl, 40px);
}

/* Genre & Blog Section */
.genre-blog {
  display: grid;
  grid-template-columns: 400px 1fr; /* Fixed width for genre, remaining for blog */
  gap: 2rem;
  margin-top: var(--space-xl, 40px);
}

.genre-list,
.blog-list {
  padding: var(--space-lg, 20px);
  color: #ddd; /* Slightly lighter text */
}

.genre-list h1,
.blog-list h1 {
  color: var(--accent-color, #ff4da6);
  margin-bottom: 2rem;
}

.genre-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md, 15px);
  justify-content: space-between; /* Push 'see all' to bottom */
}

.genre-list .tag-list {
  display: flex;
  align-items: center;


  /* Hide scrollbar for WebKit browsers */
  &::-webkit-scrollbar {
    display: none;
  }
  /* Hide scrollbar for Firefox */
  scrollbar-width: none;
}


.genre-list span {
  padding: 0.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.3rem;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05); /* Subtle background */
  transition: filter 0.3s ease, transform 0.3s ease;
}

.genre-list .see{
  text-align: center;
  cursor: pointer;
  color: var(--text-muted, #bbb);
  background-color: var(--card-bg, #2e294e); /* Consistent background */
  height: 3rem;
  width: 100%;
  display: grid;
  place-items: center;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.1cm;
  margin-top: 2rem;
  border-radius: 8px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.genre-list span:hover,
.genre-list .see:hover {
  filter: brightness(1.2);
  transform: scale(1.03);
}

/* Blog items */
.blog-list {
  /* Hide scrollbar for WebKit browsers */
  &::-webkit-scrollbar {
    display: none;
  }
  /* Hide scrollbar for Firefox */
  scrollbar-width: none;
  /* If blog-list itself is meant to scroll, add overflow-y: auto; */
  /* overflow-y: auto; */
}

.blog-list > div {
  background-color: var(--card-bg, #2e294e);
  padding: var(--space-md, 15px);
  margin-top: var(--space-lg, 20px);
  border-left: 4px solid var(--accent-color, #ff4da6);
  border-radius: 0 var(--border-radius, 10px) var(--border-radius, 10px) 0; /* Rounded right corners */
  transition: background-color 0.3s ease;
}

.blog-list > div:first-child {
  margin-top: 0; /* Remove top margin for the first blog item if it directly follows h1 */
}

.blog-list > div:hover {
  background-color: color-mix(in srgb, var(--card-bg, #2e294e) 95%, white); /* Slightly lighter on hover */
}

.blog-list > div h3 {
  margin-bottom: var(--space-xs, 5px);
  color: var(--text-color, white);
}


.description-text a {
  display: inline-block;
  overflow: hidden;      
  text-overflow: ellipsis; 
  vertical-align: bottom; 
  color: #ca5eff;
  text-decoration: underline;
  width: 300px;
}

.blog-list > div > p {
  display: -webkit-box; /* For WebKit browsers */
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted, #bbb);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background-color: var(--footer-bg, #161324);
  color: var(--footer-text, #ccc);
  padding: 1rem 2rem;
  font-family: 'Segoe UI', sans-serif;
  margin-top: var(--space-xl, 40px); /* Add margin from content above */
  text-align: center; /* Center content by default for single line */
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: var(--space-md, 15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo h1 {
  color: white;
  font-size: var(--font-xl, 2rem);
}

.footer-logo .pink {
  color: var(--accent-color, #ff4da6);
}

.footer-social {
  margin-top: var(--space-sm, 10px);
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--footer-text, #ccc);
  font-size: 1.5rem;
  margin-left: var(--space-md, 15px);
  transition: color 0.3s;
}

.footer-social a:first-child {
  margin-left: 0; /* No left margin for the first icon */
}

.footer-social a:hover {
  color: var(--footer-link-hover, #ff4da6);
}

.footer-links {
  gap: var(--space-sm, 10px);
  margin: var(--space-sm, 10px) 0 var(--space-lg, 20px);
}

.footer-links a {
  color: var(--text-muted, #bbb);
  text-decoration: none;
  font-size: 0.9rem;
  transition: text-decoration 0.3s;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy p {
  font-size: 0.8rem;
  color: var(--text-muted-dark, #999);
  margin-top: var(--space-sm, 10px);
}

/* Suggest Box for Search (Assuming JavaScript populates this) */
#suggestBox {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  max-height: 150px;
  overflow-y: auto;
  background-color: var(--navbar-bg, #1e1a2e); /* Match navbar background */
  border-radius: var(--border-radius, 10px);
}

.suggest-item {
  padding: var(--space-sm, 10px);
  cursor: pointer;
  color: var(--text-color, white);
}

.suggest-item:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Lighter hover for suggestion items */
}


.genre-full-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 30px 20px;
}

.genre-tag-large {
  background-color: #1a1a1a;
  border-radius: 25px;
  padding: 12px 25px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
}

.genre-tag-large:hover {
  transform: translateY(-3px);
  background-color: #2a2a2a;
  color: #f7a0c0;
}





.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.category-item {
  background-color: #1a1a1a;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  font-size: 0.6em;
  transition: transform 0.3s ease;
}

.category-item:hover,
.category-list .see-more:hover {
  transform: scale(1.2);
  filter: brightness(1.2)
}

.category-item h2 {
  font-size: 1.5em;
  margin: 0;
  color: #f7a0c0;
}

.category-item p {
  font-size: 0.9em;
  color: #aaa;
  margin-top: 10px;
}




.anime-detail-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px 20px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: flex-start;
  color: #ccc;
}

.anime-detail-image {
  flex-shrink: 0;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.anime-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.anime-detail-info {
  flex-grow: 1;
  color: #eee;
}

.anime-detail-info h1 {
  font-size: 2.8em;
  color: #f7a0c0;
  margin-bottom: 10px;
}

.anime-detail-info p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 15px;
}

.anime-detail-info .meta-info {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 20px;
}

.anime-detail-info .meta-info span {
  display: block;
  margin-bottom: 5px;
}

.anime-detail-info .meta-info strong {
  color: #fff;
}

.download-button-container {
  margin-top: 20px;
  text-align: center;
}

.download-button {
  display: inline-flex;
  align-items: center;
  background-color: #f7a0c0;
  color: #111;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.download-button:hover {
  background-color: #ff5e9a;
}

.download-button i {
  margin-right: 8px;
}

.return-link {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex; /* Use flexbox for horizontal alignment */
  justify-content: center; /* Center the links */
  flex-wrap: wrap; /* Allow links to wrap on smaller screens */
  gap: 15px; /* Space between links */
}

.return-link a {
  display: inline-flex;
  align-items: center;
  background-color: #f7a0c0;
  color: #111;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.return-link a:hover {
  background-color: #ff5e9a;
}

.return-link a i {
  margin-right: 8px;
}

@media (min-width: 768px) {
  .anime-detail-container {
      align-items: flex-start;
  }
}


   /* Basic styling for recommended posts section */
   .recommended-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #333; /* A subtle separator */
}

.recommended-posts h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
    color: #f7a0c0; /* Match your pink accent */
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

.recommended-post-card {
    background-color: #1a1a1a; /* Darker background for cards */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.recommended-post-card:hover {
    transform: translateY(-5px);
}

.recommended-post-card .card-content {
    padding: 20px;
    flex-grow: 1;
}

.recommended-post-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #fff;
}

.recommended-post-card .post-meta {
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 15px;
}

.recommended-post-card p {
    font-size: 0.9em;
    color: #bbb;
    line-height: 1.5;
    margin-bottom: 15px;
    /* Truncate text if it's too long in the card */
    /* These CSS properties are for visual truncation, but PHP mb_strimwidth is more robust for content */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Show up to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-post-card .read-more-link {
    display: inline-block;
    margin-top: 10px;
    color: #f7a0c0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

.recommended-post-card .read-more-link:hover {
    color: #ff5e9a; /* Darker pink on hover */
}

@media (max-width: 768px) {
    .recommended-grid {
        grid-template-columns: 1fr;
    }
}


/* --- Recommended Section Styling --- */
.recommended-section {
    margin-top: 40px;
    padding: 20px;
    border-radius: 8px;
}

.recommended-section h2 {
    color: #ff2d55; /* Pink heading */
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 700;
}

.recommended-grid {
    display: grid;
    /* Adjust grid template columns for responsiveness */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px; /* Space between grid items */
    justify-content: center;
    padding: 0 10px; /* Some padding to prevent items from touching edges */
}

.recommended-item {
    background-color: #2e294e;
    overflow: hidden; /* Ensures image corners are rounded */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center; /* Center align title */
    display: flex;
    flex-direction: column;
    text-decoration: none; /* Remove underline from link */
}

.recommended-item:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.recommended-item a {
    text-decoration: none; /* Ensure link within item has no underline */
    color: inherit; /* Inherit color from parent for text */
    display: flex; /* Make the whole item a flexible column for image and text */
    flex-direction: column;
    height: 100%; /* Ensure link covers the whole item */
}

.recommended-item img {
    width: 100%;
    height: 170px; /* Fixed height for consistency */
    transition: transform 0.3s ease;
    object-fit: fill;
}

.recommended-item:hover img {
    transform: scale(1.03); /* Slightly zoom image on hover */
}

.recommended-item h3 {
    color: #e0e0e0; /* Light text for titles */
    font-size: 1.1em;
    margin: 15px 10px; /* Spacing for title */
    flex-grow: 1; /* Allows title to take up available space */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit title to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .recommended-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }

    .recommended-item img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .recommended-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    .recommended-section h2 {
        font-size: 1.8em;
    }

    .recommended-item img {
        height: 180px;
    }

    .recommended-item h3 {
        font-size: 1em;
        margin: 10px 8px;
    }
}







/* Hamburger Styles */
.hamburger {
  display: none; /* Hidden by default on larger screens */
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-color, white);
  cursor: pointer;
  order: 2; /* Order it to appear after logo if needed */
}




/* Responsive Styles */
@media (max-width: 990px) {
  .navbar {
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start; /* Align items to the left */
    padding: 15px 20px;
  }

  .hamburger {
    display: block; /* Show hamburger icon */
    position: absolute; /* Position absolutely to break flow */
    right: 20px;
    top: 15px;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    display: none; /* Hidden by default, toggled by JS */
    margin-top: var(--space-md, 15px);
  }

  .nav-links.show {
    display: flex; /* Show when 'show' class is added */
  }

  .nav-links a,
  .nav-links input[type="text"] {
    width: 100%; /* Full width for links and input */
    margin-top: 10px;
  }

  .login-btn {
    width: 100%;
    margin-left: 0; /* Remove left margin when stacked */
    margin-top: var(--space-sm, 10px);
  }

  .category-list {
    gap: 10px;
  }

  .category-list > div {
    flex: 1 0 45%; /* Two columns, allowing some flexibility */
    min-height: 100px;
    font-size: 14px;
    padding: var(--space-md, 15px);
  }

  .card {
    width: 150px; 
  }
}

@media (max-width: 870px) {
  .genre-blog {
    grid-template-columns: 1fr; /* Stack genre and blog vertically */
  }

  .hero {
    padding: 1rem;
  }

  .spotlight-text h1,
  .spotlight-text h2 {
    font-size: var(--font-lg, 1.5rem); /* Smaller font sizes */
  }

  .spotlight-text p {
    font-size: 0.6rem;
  }

  .site-footer {
    padding: 1rem 1rem; /* Reduce footer padding */
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 20px 10px;
  }

  .spotlight {
    padding: 30px 15px;
  }

  .spotlight-text {
    max-width: 100%;
  }

  .category-list {
    gap: var(--space-sm, 10px); /* Reduced gap */
  }

  .category-list > div {
    width: 100%; /* Full width for categories */
    min-height: 80px;
    font-size: 14px;
    padding: var(--space-md, 15px);
  }

  .trending-list-small,
  .New-list {
    justify-content: center;
  }

  .genre-list .tag-list {
    grid-template-columns: repeat(2, 1fr); /* Two columns for tags */
    height: auto; /* Auto height for tag list */
  }

  .footer-top {
    gap: var(--space-md, 15px);
  }

  .footer-social {
    margin-top: var(--space-md, 15px);
    margin-left: 0; /* Remove left margin for social icons */
  }

  .footer-social a {
    margin-left: var(--space-sm, 10px); /* Adjust social icon spacing */
  }

  .card-small {
    width: 100px; /* Adjust small card width for very small screens */
  }
  
  .card-small span {
    padding:  2px var(--space-sm, 5px);
    font-size: 0.6rem;
  }

}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 15px;
  }

  .hero {
    padding: 15px 5px;
  }

  .spotlight {
    padding: 20px 10px;
  }

  .spotlight-text h1 {
    font-size: 1.2rem;
  }

  .spotlight-text h2 {
    font-size: 1rem;
  }

  .site-footer {
    padding: 0.5rem 0.5rem;
  }

  .footer-links a {
    margin: 5px 0;
  }

  .genre-list .tag-list {
    grid-template-columns: 1fr; /* Single column for tags on tiny screens */
  }
}

.card-views {
    display: flex;
    align-items: center;
    margin: 0rem 0.5rem;
}


.ads-center, .ads{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    overflow: hidden;
} 

.ads-center {
    width: 100%;
    height: auto;
    margin: 2rem 0;
    padding: 1rem;
}

.ads {
    background: var(--gray-300);
    width: 100%;
    height: auto;
    border-radius: 5px;
    padding: 0.5rem 0;
}
