/* Games Hub Styles */
:root {
    --primary-color: #ff6f61;
    --secondary-color: #4a6fa5;
    --accent-color: #ffd166;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Hero Section */
.games-hero {
    background: linear-gradient(135deg, #4a6fa5 0%, #ff6f61 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.games-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Pattern image removed to avoid 404s; keep subtle overlay */
    background-image: none;
    background-size: 200px;
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: var(--border-radius);
    min-width: 120px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.3);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Games Hub Section */
.games-hub-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Game Filters */
.game-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--dark-color);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    background-color: white;
}

.search-container {
    display: flex;
    position: relative;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    min-height: 400px;
}

.game-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.game-thumbnail {
    height: 180px;
    overflow: hidden;
    position: relative;
}

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

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

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

.game-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.game-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.game-category {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.game-difficulty {
    font-size: 0.8rem;
    color: #666;
}

.game-difficulty.easy {
    color: var(--success-color);
}

.game-difficulty.medium {
    color: var(--warning-color);
}

.game-difficulty.hard {
    color: var(--danger-color);
}

.best-score {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.best-score i {
    color: #ffd700;
}

.game-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.play-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex-grow: 1;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.play-button:hover {
    background-color: #e55a4d;
    transform: translateY(-2px);
}

/* High scores feature removed: .high-scores-button styles deleted */

/* High scores feature removed: .high-scores-button:hover styles deleted */

/* Recently Played Games Section */
.recent-games-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.recent-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.recent-games-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
    grid-column: 1 / -1;
}

.recent-games-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Featured Games Section */
.featured-games-section {
    padding: 3rem 2rem;
    background-color: var(--light-color);
}

.featured-games-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    /* Removed -webkit-overflow-scrolling as it's deprecated */
}

.featured-games-carousel::-webkit-scrollbar {
    height: 8px;
}

.featured-games-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.featured-games-carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.featured-games-carousel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.featured-game-card {
    flex: 0 0 350px;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.featured-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    height: 90%;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--dark-color);
    color: white;
}

.modal-controls {
    display: flex;
    gap: 0.5rem;
}

.modal-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex-grow: 1;
    position: relative;
}

#gameFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

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

/* High scores feature removed: list and item styles deleted */

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-card {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .game-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group select,
    .filter-group input,
    .search-container {
        width: 100%;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
    }
}
