:root {
    /* Color Variables */
    --primary-color: #4caf50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --background-color: #FFFFFF;
    --card-background: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    
    /* Spacing Variables */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Animation Variables */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* Base Styles */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #f5f5f5;
    padding-top: 60px;
}

/* Header */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.16), 0 2px 10px rgba(0,0,0,0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    color: white !important;
}

.navbar .btn {
    color: white;
    padding: 0.5rem;
}

/* Category Section */
.category-section {
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-md);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    margin: 0;
}

.category-title i {
    margin-right: var(--spacing-sm);
    color: var(--primary-color);
}

.see-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.see-more:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.see-more i {
    font-size: 0.8rem;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: var(--spacing-xl);
}

/* Game Card */
.game-card {
    position: relative;
    background: var(--card-background);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.game-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.game-image-container {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

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

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-rating {
    display: flex;
    align-items: center;
}

.stars {
    display: flex;
    color: var(--accent-color);
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.rating-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.game-plays {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.game-plays span {
    font-weight: 500;
}

/* Side Menu */
#sideMenu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: white;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding-top: 56px;
}

#sideMenu.open {
    transform: translateX(0) !important;
}

#menuCategories {
    padding: 1rem 0;
}

#menuCategories a.menu-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

#menuCategories a.menu-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.95);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding-top: 80px;
}

.search-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.search-container {
    width: 90%;
    max-width: 900px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1.25rem;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    outline: none;
    background: transparent;
}

.search-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    cursor: pointer;
}

.search-results-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Game Info Page */
.game-info-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.game-preview img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.game-details h1 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.game-stats {
    margin-bottom: 1.5rem;
}

.plays {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--secondary-color);
}

#gameCategory {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

#gameDescription {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#playButton {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

#playButton:hover {
    background-color: #f57c00;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* How to Play Section */
.how-to-play {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.how-to-play h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.how-to-play h2 i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.control-card {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 1.25rem;
}

.control-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.control-card h3 i {
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.key-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.key-badge {
    background-color: #e0e0e0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.75rem;
    font-family: monospace;
    font-size: 0.875rem;
}

/* Similar Games Section */
.similar-games {
    margin-bottom: 2rem;
}

.similar-games h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Footer */
footer {
    background-color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.foot-agreement {
    margin-bottom: 1rem;
}

.foot-agreement a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 0.75rem;
    transition: color 0.2s;
}

.foot-agreement a:hover {
    color: var(--primary-color);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-normal) ease-out forwards;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .game-info-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .how-to-play .control-container {
        display: grid;
        /* grid-template-columns: 1fr 1fr; */
        gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .game-preview {
        margin-bottom: 1.5rem;
    }
    
    .control-card:not(:last-child) {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-title {
        font-size: 0.9rem;
    }
    
    .stars, .rating-value, .game-plays {
        font-size: 0.8rem;
    }
    
    .category-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 360px) {
    .game-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
} 