body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.game-area {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
    align-items: flex-start;
}

.game-area.graph-visible {
    justify-content: space-between;
}

canvas {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#graph {
    display: none;
}

.game-area.graph-visible #graph {
    display: block;
}

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

button {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

footer a {
    color: #74b9ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .game-area {
        flex-direction: column;
        gap: 10px;
    }

    .game-area.graph-visible {
        flex-direction: column;
        justify-content: center;
    }

    button {
        font-size: 14px;
        padding: 10px 20px;
    }
}