* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
    flex: 1;
    align-content: start;
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.game-card:active {
    transform: translateY(-5px);
}

/* Game Icon */
.game-icon {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.game-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Game Info */
.game-info {
    padding: 25px;
    text-align: center;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.game-description {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 15px;
    }

    .game-title {
        font-size: 1.3rem;
    }

    .game-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .title {
        font-size: 1.8rem;
    }

    .header {
        padding: 25px 10px;
        margin-bottom: 20px;
    }

    .game-grid {
        gap: 20px;
        padding: 10px;
    }

    .game-info {
        padding: 20px;
    }

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

/* Touch devices optimization */
@media (hover: none) and (pointer: coarse) {
    .game-card:hover {
        transform: none;
    }

    .game-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow);
    }
}

/* Landscape mode for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
}
