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

body {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    background: linear-gradient(135deg, #2c3e50, #3498db, #2980b9);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: white;
}

.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-home a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-home a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.game-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
}

.game-header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    gap: 10px;
}

.info-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 10px;
    flex: 1;
}

.info-label {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f39c12;
}

.game-board {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#gameCanvas {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #2c3e50;
}

.game-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #f39c12;
}

.instructions p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.key-hints {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.key-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
}

kbd {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

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

    .game-header h1 {
        font-size: 2rem;
    }

    .game-info {
        flex-wrap: wrap;
    }

    .info-item {
        flex: 1 1 45%;
    }

    .game-controls {
        grid-template-columns: repeat(2, 1fr);
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }

    .key-hints {
        grid-template-columns: 1fr;
    }
}
