@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

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

body {
    font-family: 'Noto Sans SC', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.game-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.game-card-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.game-card-content {
    padding: 20px;
}

.game-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.game-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
}

.game-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.game-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.game-canvas-container {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.game-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    font-size: 1.1rem;
}

.info-item {
    text-align: center;
}

.info-label {
    color: #888;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 24px;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 1rem;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background: white;
    color: #764ba2;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
}
