/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Loader animation */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 8px solid #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.search-container {
    flex: 0 0 40%;
}

.search-container form {
    display: flex;
}

.search-container input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
}

.search-container button {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background-color: #2980b9;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #3498db;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #555;
}

/* Tags section */
.tags {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.tags h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tag {
    padding: 0.5rem 1.5rem;
    background-color: #3498db;
    color: white;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Game list section */
.game-list {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease 1s forwards;
    opacity: 0;
}

.game-list h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.game-image {
    height: 180px;
    background-color: #3498db;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-card h3 {
    padding: 1rem 1rem 0.5rem;
    color: #2c3e50;
}

.game-card p {
    padding: 0 1rem 1rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    animation: fadeIn 1s ease 1.5s forwards;
    opacity: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .search-container {
        width: 100%;
        margin: 1rem 0;
    }

    nav ul {
        justify-content: center;
        margin-top: 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}