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

body {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    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 {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.main-panel {
    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);
}

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

.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);
    cursor: pointer;
}

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

.btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.side-panel {
    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);
    min-width: 250px;
}

.stats {
    margin-bottom: 30px;
}

.stats h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #f9ca24;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 10px;
}

.stat-label {
    color: #ccc;
    font-size: 0.95rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #f9ca24;
}

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

.instructions h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #f9ca24;
}

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

.instructions ul {
    color: #ccc;
    line-height: 1.8;
    padding-left: 20px;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
    }

    .main-panel {
        padding: 15px;
    }

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

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