:root {
    /* Color Variables */
    --primary-color: #ff6b00;
    --secondary-color: #ffa726;
    --accent-color: #2dc6ff;
    --background-color: #f5f7fa;
    --dark-bg-color: #1a202c;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #616161;
    --text-light: #f5f5f5;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #ff6b00;
    --gradient-end: #ffa726;
    
    /* 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.15s;
    --transition-normal: 0.25s;
    --transition-slow: 0.4s;

    /* Game Card Variables */
    --card-width: 160px;
    --card-height: 180px;
    --card-radius: 16px;
    --card-scale: 1.05;
    
    /* Font Variables */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Rubik', sans-serif;
}

/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Rubik:wght@400;500&display=swap');

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Header styles */
header {
    background: var(--dark-bg-color);
    color: white;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 60px;
    display: flex;
    align-items: center;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    width: 100%;
}

header h1 {
    font-family: var(--heading-font);
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

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

header button:hover, header button:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Category Section */
.category-section {
    margin: 1.5rem 0 2.5rem 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    position: relative;
}

.category-title {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.category-title i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.category-header a {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

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

/* Game Card */
.game-card {
    background: var(--card-background);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: all var(--transition-normal);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

.game-card:hover, .game-card:active {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

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

.game-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: var(--heading-font);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.stars {
    display: flex;
    color: var(--primary-color);
}

.stars i {
    font-size: 0.8rem;
}

.rating-value {
    color: var(--text-secondary);
    font-weight: 600;
}

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

.game-plays span {
    font-weight: 600;
    color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Side Menu */
#sideMenu {
    background-color: var(--dark-bg-color);
    color: white;
    z-index: 100;
    width: 280px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

#menuCategories {
    padding-top: 1rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

#menuCategories a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

#menuCategories a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

#menuCategories a i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.search-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.search-container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
}

.search-input-wrapper {
    background-color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    font-family: var(--body-font);
    color: var(--text-primary);
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.search-close-btn:hover {
    color: var(--primary-color);
}

.search-results {
    color: white;
}

.search-results-title {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.search-results .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.search-results .game-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-results .game-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.search-results .game-image-container {
    padding-top: 100%;
}

.search-results .game-badge {
    background: var(--primary-color);
}

.search-results .game-info {
    padding: 0.75rem;
}

.search-results .game-title {
    color: white;
}

.search-results .game-plays,
.search-results .rating-value {
    color: rgba(255, 255, 255, 0.8);
}

.search-results .stars {
    color: var(--primary-color);
}

.search-results .game-plays span {
    color: var(--accent-color);
}

/* Game Info Page Styles */
.game-info-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.game-preview {
    flex: 1;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.game-details {
    flex: 1;
}

.game-details h1 {
    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#gameCategory {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

#playButton {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

#playButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

#playButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
}

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

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

.plays {
    display: flex;
    align-items: center;
}

.plays span {
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 0.3rem;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--card-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
}

.hero-content h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.hero-pattern {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40%;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Game Controls Section */
.game-controls-section {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.game-controls-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--heading-font);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.game-controls-section .section-title i {
    color: var(--primary-color);
}

.controls-grid {
    display: grid;
    /* grid-template-columns: 1fr; */
    gap: 1.5rem;
}

.control-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid #eee;
}

.control-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.control-card h3 i {
    color: var(--primary-color);
}

.control-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.control-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.key-command {
    font-family: monospace;
    background: var(--dark-bg-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-block;
}

.key-action {
    color: var(--text-secondary);
}

.control-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.mobile-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.2rem;
    padding: 1rem;
    background: rgba(45, 198, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.mobile-tip i {
    color: var(--accent-color);
    margin-top: 2px;
}

.mobile-tip p {
    margin: 0;
    font-size: 0.9rem;
}

/* Related Games Section */
.related-games-section {
    margin-top: 2.5rem;
}

.section-heading {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading i {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-bg-color);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.foot-agreement {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.foot-agreement a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    position: relative;
}

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

footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

.friend-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.friend-links h3 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 500;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.links-grid a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: all var(--transition-fast);
}

.links-grid a:hover {
    color: var(--primary-color);
}

.game-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 10;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.play-now {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    transform: translateY(10px);
    transition: transform var(--transition-normal);
}

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

.no-results {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.no-results p {
    color: rgba(255, 255, 255, 0.8);
}

.tech-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.tech-badge:hover {
    background: #f0f0f0;
}

.tech-badge i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.tech-badge span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.contact-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-button i {
    font-size: 1rem;
}

/* Breadcrumb styles */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .game-info-container {
        flex-direction: row;
    }

    .game-preview {
        flex: 5;
    }

    .game-details {
        flex: 6;
        padding-left: 2rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    /* .controls-grid {
        grid-template-columns: 1fr 1fr;
    } */
}

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

@media (max-width: 640px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    .category-header a {
        font-size: 0.8rem;
    }

    .game-details h1 {
        font-size: 1.5rem;
    }

    #playButton {
        width: 100%;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
} 