/* Custom utility classes */
.featured-banner {
    height: 280px;
    background-color: #6366f1;
}

@media (min-width: 640px) {
    .featured-banner {
        height: 320px;
    }
}

@media (min-width: 768px) {
    .featured-banner {
        height: 360px;
    }
}

@media (min-width: 1024px) {
    .featured-banner {
        height: 400px;
    }
}

/* Featured Carousel */
.featured-carousel {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-content {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: white;
}

.carousel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carousel-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.25);
}

/* Side Menu Styles */
.menu-category {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    color: #4b5563;
    text-decoration: none;
}

.menu-category:hover {
    background-color: #f3f4f6;
    color: #6366f1;
}

.menu-category i {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

.menu-category span {
    font-weight: 500;
}

/* Game cards */
.game-card {
    position: relative;
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.game-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.game-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(79, 70, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.game-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: auto;
}

.stars {
    color: #fbbf24;
    display: flex;
}

.play-now {
    background-color: #6366f1;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.game-card:hover .play-now {
    transform: translateY(0);
}

/* Search Results Styling */
#searchOverlay {
    overflow-y: auto;
}

#searchOverlay.active {
    display: flex;
}

#searchResultsGrid {
    width: 100%;
}

#searchResultsGrid .game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

@media (min-width: 768px) {
    #searchResultsGrid .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    #searchResultsGrid .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Category sections */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.category-title i {
    color: #6366f1;
    margin-right: 0.5rem;
}

.view-all {
    font-size: 0.875rem;
    color: #6366f1;
    font-weight: 500;
    transition: color 0.2s;
}

.view-all:hover {
    color: #4f46e5;
    text-decoration: underline;
}

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

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

@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .game-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Filter tabs */
.filter-tabs button {
    color: #6b7280;
    transition: all 0.2s ease;
}

.filter-tabs button:hover {
    color: #4f46e5;
    background-color: #f3f4f6;
}

.filter-tabs button.active {
    color: white;
    background-color: #6366f1;
}

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

#darkOverlay.active, 
#searchOverlay.active {
    display: flex;
}

/* Utilities */
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Game category tag */
.game-category-tag {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #6366f1;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Focus outline fixes */
button:focus, a:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Input styling enhancements */
#searchInput:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Game detail page enhancements */
.breadcrumb a:hover {
    text-decoration: underline;
}

/* How to Play section */
.bg-gray-50 {
    border-left: 3px solid #6366f1;
}

/* Responsive adjustments */
@media (max-width: 639px) {
    .carousel-content h2 {
        font-size: 1.25rem;
    }
    
    .carousel-content p {
        font-size: 0.875rem;
    }
    
    /* Better spacing on mobile */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Improve game card appearance on small screens */
    .game-title {
        font-size: 0.8125rem;
    }
    
    /* Make play button more prominent on mobile */
    #playButton {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Adjust breadcrumb on smaller screens */
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    /* Fix search overlay scrolling on mobile */
    #searchOverlay {
        overflow-y: auto;
        padding-bottom: 2rem;
    }
    
    /* Make search results more compact on mobile */
    #searchResultsGrid .game-grid {
        gap: 0.75rem;
    }
} 