/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #4CAF50;
}

nav a.active {
    color: #4CAF50;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-icon {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* Games Section */
.projects-section {
    padding: 120px 0 60px;
}

.section-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* Game Filters */
.game-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #ffffff;
    color: #2c3e50;
    border: 2px solid #e9ecef;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #4CAF50;
    color: #ffffff;
    border-color: #4CAF50;
}

/* Games Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.project-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

/* Game Category Colors */
.project-card[data-category="action"] {
    border-top: 4px solid #ff6b6b;
}

.project-card[data-category="puzzle"] {
    border-top: 4px solid #4ecdc4;
}

.project-card[data-category="adventure"] {
    border-top: 4px solid #ffd93d;
}

.project-card[data-category="strategy"] {
    border-top: 4px solid #6c5ce7;
}

/* Project Images */
.project-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.img-bottom {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .img-bottom {
    opacity: 1;
}

/* Project Content */
.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #4CAF50;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: #45a049;
}

.project-link svg {
    width: 16px;
    height: 16px;
}

/* Footer */
footer {
    background-color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.copy {
    text-align: center;
    color: #6c757d;
}

.copy a {
    color: #4CAF50;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .game-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 80%;
        text-align: center;
    }
}

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

.projects-grid {
    animation: fadeIn 0.5s ease;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        padding: 0.5rem 2rem;
    }
}

/* Accessibility */
.filter-btn:focus,
.project-link:focus,
.logo:focus,
nav a:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}