/* ===== Games Listing Styles ===== */

/* Hero Section for Listing */
.listing-hero {
    background: linear-gradient(135deg, #6c5ce7 0%, #8a7dff 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.listing-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.listing-hero .hero-content {
    flex: 1;
}

.listing-hero .hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.listing-hero .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
}

.listing-hero .hero-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.listing-hero .stat h3 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 5px;
}

.listing-hero .stat p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.listing-hero .hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.platform-info {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.platform-icon {
    width: 70px;
    height: 70px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.platform-icon i {
    font-size: 2rem;
    color: #6c5ce7;
}

.platform-details h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.platform-details p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Listing Controls */
.listing-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 40px 0 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-options h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.filter-options h3 i {
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background-color: var(--bg-card);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}

.sort-select:focus {
    border-color: var(--primary-color);
}

/* Games Grid */
.games-listing {
    padding: 60px 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.game-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.game-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 1;
}

/* Genre badge colors */
.game-card[data-genre="action"] .game-badge { background-color: #e84118; }
.game-card[data-genre="sports"] .game-badge { background-color: #00b894; }
.game-card[data-genre="racing"] .game-badge { background-color: #0984e3; }
.game-card[data-genre="adventure"] .game-badge { background-color: #a29bfe; }
.game-card[data-genre="rpg"] .game-badge { background-color: #fd79a8; }
.game-card[data-genre="fighting"] .game-badge { background-color: #d63031; }
.game-card[data-genre="strategy"] .game-badge { background-color: #fdcb6e; color: #2d3436; }
.game-card[data-genre="puzzle"] .game-badge { background-color: #00cec9; }

.game-content {
    padding: 20px;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.game-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-info i {
    color: var(--primary-color);
}

.game-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    color: var(--text-light);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.no-results i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.no-results p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.page-btn.active,
.page-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-btn.prev,
.page-btn.next {
    width: auto;
    padding: 0 20px;
    border-radius: 50px;
    gap: 8px;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

/* Games Stats */
.games-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
}

.stat-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .listing-hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .listing-hero .hero-stats {
        justify-content: center;
    }
    
    .platform-info {
        margin: 0 auto;
    }
    
    .listing-controls {
        flex-direction: column;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .listing-hero {
        padding: 80px 0;
    }
    
    .listing-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .games-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .listing-hero .hero-title {
        font-size: 2rem;
    }
    
    .listing-hero .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .page-btn.prev,
    .page-btn.next {
        padding: 0 15px;
    }
}

/* ===== Enhanced Loading States ===== */

.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.loading-indicator.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-indicator p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Game card loading skeleton */
.game-card.loading {
    background: linear-gradient(90deg, 
        var(--bg-card) 25%, 
        var(--bg-secondary) 50%, 
        var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Last updated indicator */
.last-updated {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.last-updated i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Refresh button in controls */
.listing-controls .btn-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}

/* Error state */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    margin: 20px 0;
}

.error-state i {
    font-size: 3rem;
    color: #e84118;
    margin-bottom: 20px;
}

.error-state h3 {
    margin-bottom: 10px;
    color: #e84118;
}

.error-state p {
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Game image error handling */
.game-image img {
    transition: opacity 0.3s ease;
}

.game-image img[src*="default-game-thumb"] {
    opacity: 0.8;
}

/* No games state */
.no-games {
    text-align: center;
    padding: 80px 20px;
}

.no-games i {
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-games h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.no-games p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Responsive adjustments for loading */
@media (max-width: 768px) {
    .loading-indicator {
        padding: 40px 20px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.loading-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-results i {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.no-results p {
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-btn:hover {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

.page-btn.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

.page-btn.prev-btn,
.page-btn.next-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

.filter-btn.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

/* Sort Select */
.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

/* Games Stats */
.games-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card i {
    font-size: 2rem;
    color: #6c5ce7;
}

.stat-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .games-stats {
        grid-template-columns: 1fr;
    }
}
/* APK Hero Specific */
.apk-hero {
    background: linear-gradient(135deg, #3DDC84 0%, #34A853 100%);
}

.apk-hero .hero-title .highlight {
    color: #0F9D58;
}

.apk-hero .platform-info.android {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.apk-hero .platform-info.android .platform-icon {
    background: #0F9D58;
}

.hero-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.hero-requirements p {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0;
}

.hero-requirements i {
    color: #3DDC84;
}

/* APK Game Card Specific */
.game-card .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.android-version {
    font-size: 0.75rem;
    background: #3DDC84;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.obb-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF6B6B;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

.game-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.obb-note {
    font-size: 0.8rem;
    color: #FF6B6B;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Android Requirements Section */
.android-requirements {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.android-requirements h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #0F9D58;
}

.android-requirements h3 i {
    color: #3DDC84;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.requirement-card {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.requirement-card i {
    font-size: 2rem;
    color: #3DDC84;
    margin-bottom: 10px;
}

.requirement-card h4 {
    margin-bottom: 5px;
    color: #333;
}

.requirement-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Footer Android Note */
.android-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.9rem;
}

.android-note i {
    color: #3DDC84;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-requirements {
        flex-direction: column;
        gap: 10px;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .game-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .obb-note {
        justify-content: center;
    }
}