@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&family=Raleway:wght@200;300;400;500;600;700&family=Roboto+Condensed:wght@400;700&family=Roboto:wght@300;400;500;700;900&family=Saira:wght@300;400;500;600;700;800;900&family=Tajawal:wght@400;500;700&display=swap');


* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html{
    scroll-behavior: smooth;
}

ul li{
    list-style: none;
    text-decoration: none;
    color: inherit;
}

ul li a{
    list-style: none;
    text-decoration: none;
    color: inherit;
}

a{
    -webkit-transition: .3s all ease;
    -o-transition: .3s all ease;
    transition: .3s all ease;
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
    color: inherit;
    text-decoration: none;  
}

body{
    background-image: url(https://www.sarmady.net/games/bg-image.png);
    background-color: #1f201f;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100%;
}

.carnival-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  padding: 30px 20px;
}

.carnival-card {
  display: block;
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.carnival-card img{
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carnival-card h2 {
  margin: 0;
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #dee2e6;
}

.carnival-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #111;
}

.carnival-card:active {
  transform: translateY(-4px) scale(0.98);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .carnival-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 20px 15px;
    }
    
    .carnival-card img {
        height: 200px;
    }
    
    .carnival-card h2 {
        font-size: 16px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .carnival-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 10px;
    }
    
    .carnival-card img {
        height: 180px;
    }
    
    .carnival-card h2 {
        font-size: 15px;
        padding: 12px;
    }
}

/* Add loading animation */
.carnival-card img {
    transition: opacity 0.3s ease;
}

.carnival-card img:not([src]) {
    opacity: 0.5;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Add subtle animation on page load */
.carnival-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.carnival-card:nth-child(1) { animation-delay: 0.1s; }
.carnival-card:nth-child(2) { animation-delay: 0.2s; }
.carnival-card:nth-child(3) { animation-delay: 0.3s; }
.carnival-card:nth-child(4) { animation-delay: 0.4s; }
.carnival-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 50%, #2c5aa0 100%);
    border-radius: 10px;
    border: 2px solid #2a2a2a;
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a;
}

/* For horizontal scrollbars if needed */
::-webkit-scrollbar:horizontal {
    height: 12px;
}

::-webkit-scrollbar-corner {
    background: #2a2a2a;
}