/* Game Card Animations & Styles */
.game-card {
    @apply bg-gray-900 rounded-lg overflow-hidden shadow-md transition duration-300 transform hover:-translate-y-1 hover:shadow-lg;
}

.game-card img {
    @apply w-full h-44 object-cover transition duration-300;
}

.game-card:hover img {
    @apply transform scale-105;
}

.game-card .game-overlay {
    @apply absolute inset-0 bg-gradient-to-t from-black/70 to-transparent opacity-0 transition duration-300 flex items-center justify-center;
}

.game-card:hover .game-overlay {
    @apply opacity-100;
}

.game-card .play-button {
    @apply px-4 py-2 bg-amber-500 text-amber-900 font-bold rounded-full transform scale-75 opacity-0 transition duration-300;
}

.game-card:hover .play-button {
    @apply scale-100 opacity-100;
}

.game-card .category-tag {
    @apply absolute top-2 right-2 text-xs font-bold px-2 py-1 rounded-full bg-amber-600 text-white z-10;
}

/* Category Card Animation */
.category-card {
    @apply flex flex-col items-center justify-center p-4 bg-gray-800 rounded-lg shadow transition duration-300 transform hover:-translate-y-1 hover:shadow-lg text-center;
}

.category-card .category-icon {
    @apply w-12 h-12 rounded-full flex items-center justify-center text-xl mb-2 transition duration-300;
}

.category-card:hover .category-icon {
    @apply transform scale-110;
}

/* Featured Carousel */
.featured-carousel {
    @apply relative overflow-hidden rounded-xl shadow-lg;
    height: 320px;
}

.carousel-slide {
    @apply absolute top-0 left-0 w-full h-full opacity-0 transition-opacity duration-500 ease-in-out;
}

.carousel-slide.active {
    @apply opacity-100;
}

.carousel-slide img {
    @apply w-full h-full object-cover;
}

.carousel-content {
    @apply absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-black/80 to-transparent text-white;
}

.carousel-indicator {
    @apply w-3 h-3 rounded-full bg-white/30 mx-1 transition-all duration-300 cursor-pointer;
}

.carousel-indicator.active {
    @apply bg-white w-6;
}

/* Side Menu Transition */
#sideMenu.active {
    transform: translateX(0);
}

#darkOverlay.active {
    @apply opacity-50 pointer-events-auto;
}

/* Search Overlay Transition */
#searchOverlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .featured-carousel {
        height: 240px;
    }
    
    .carousel-content h2 {
        @apply text-xl;
    }
    
    .carousel-content p {
        @apply text-sm;
    }
    
    .game-card img {
        @apply h-32;
    }
}

/* Keyframe Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    @apply bg-gray-800;
}

::-webkit-scrollbar-thumb {
    @apply bg-amber-500 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-amber-600;
}

/* Star Rating Colors */
.text-star {
    color: #FFC107;
}

/* Play Button Hover Effect */
.play-now-button {
    @apply transition-all duration-300 transform;
}

.play-now-button:hover {
    @apply shadow-lg scale-105;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #FFC107;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add subtle hover animation to all interactive elements */
.hover-float {
    @apply transition-transform duration-300;
}

.hover-float:hover {
    @apply transform -translate-y-1;
}

/* Swiper Customization */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background-color: rgba(146, 106, 55, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(146, 106, 55, 0.8);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #FFC107;
}

/* Add text truncation styles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search Overlay Styling */
#searchOverlay {
    backdrop-filter: blur(5px);
}

#searchOverlay .w-full.max-w-2xl {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#searchOverlay .overflow-y-auto {
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(146, 106, 55, 0.2) transparent;
}

#searchOverlay .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#searchOverlay .overflow-y-auto::-webkit-scrollbar-track {
    background-color: transparent;
}

#searchOverlay .overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: rgba(146, 106, 55, 0.2);
    border-radius: 3px;
}

#searchOverlay .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background-color: rgba(146, 106, 55, 0.4);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}

.search-game-card {
    background-color: #272727;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.search-game-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.search-game-card:hover img {
    transform: scale(1.08);
}

.search-game-card h3 {
    color: #F5F5F5;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.25rem;
}

.search-game-card .flex {
    margin-top: auto;
}

#searchInput {
    @apply focus:ring-amber-500 focus:border-amber-500;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button styling */
a.bg-yellow-500, a.bg-white.bg-opacity-20, #challengeBtn {
    @apply bg-amber-500 hover:bg-amber-400 text-amber-900 transition-all duration-300;
    box-shadow: 0 4px 0 #8B5A2B;
}

a.bg-yellow-500:hover, a.bg-white.bg-opacity-20:hover, #challengeBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #8B5A2B;
}

a.bg-yellow-500:active, a.bg-white.bg-opacity-20:active, #challengeBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 #8B5A2B;
}

a.bg-yellow-500::after, #challengeBtn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 70%);
    background-size: 200% 100%;
    background-position: 100% 0;
    border-radius: 9999px;
    transition: all 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

a.bg-yellow-500:hover::after, #challengeBtn:hover::after {
    background-position: -100% 0;
}

.scale-95 {
    transform: scale(0.95);
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    }
}

#challengeBtn {
    animation: buttonGlow 2s infinite;
}

.hover-effect {
    @apply transition-all duration-300;
}

.hover-effect:hover {
    @apply transform -translate-y-1;
}

/* Custom background color and text colors for the new theme */
.bg-theme-primary {
    background-color: #302010;
}

.bg-theme-secondary {
    background-color: #201810;
}

.bg-theme-accent {
    background-color: #8B5A2B;
}

.text-theme-primary {
    color: #FFC107;
}

.text-theme-secondary {
    color: #E6C78F;
}

.border-theme {
    border-color: #8B5A2B;
}

/* Header gradient replacement */
.header-gradient {
    background: linear-gradient(to right, #2E1500, #4B2600);
}

/* Customize default styling for body */
body {
    @apply bg-gray-900 text-gray-300;
}

/* Card styling */
.game-card p, .category-card p {
    @apply text-gray-400;
}

.game-card h3 {
    @apply text-amber-100 font-semibold truncate;
}

/* Footer styling */
footer {
    @apply bg-gray-950;
}

/* Button styling */
.btn-primary {
    @apply bg-amber-600 hover:bg-amber-500 text-white;
}

.btn-secondary {
    @apply bg-gray-700 hover:bg-gray-600 text-white;
}

/* Section styling */
.section-alt {
    @apply bg-gray-800;
} 