/* Базовая палитра — мягкие японские оттенки */
:root {
    --bg: #e0d0da; /* спокойный, нейтральный */
    --text: #3a3a3a;            /* мягкий тёмно-серый */
    --accent: #e8dfe8;          /* нежный серо-розовый */
    --accent-strong: #d8c8d8;   /* чуть насыщеннее */
    --border: #e6e2e4;          /* тонкая граница */
    --shadow: rgba(0, 0, 0, 0.05);
    --radius: 14px;
    --transition: 0.25s ease;
}

/* Общий фон и шрифт */
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: "Inter", "Noto Sans JP", sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

/* Центрирование основного контейнера */
.container {
    position: relative;
    z-index: 2; /* выше лепестков */
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* Заголовки */
h1 {
    font-size: clamp(26px, 5vw, 40px);
    margin-bottom: 10px;
    font-weight: 600;
}

p {
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 20px;
}

/* Кнопки */
button {
    background: var(--accent);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px var(--shadow);
}

button:hover {
    background: var(--accent-strong);
}

/* Скрытые элементы */
.hidden {
    display: none;
}

/* Контейнер игры */
.game-container {
    margin-top: 30px;
}

#gameCanvas {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
    margin: 0 auto;
    display: block;
}

/* Game Over */
#gameOver {
    margin-top: 20px;
}

/* Таблица рекордов */
.scores {
    margin-top: 40px;
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
}

.scores table {
    width: 100%;
    border-collapse: collapse;
}

.scores th, .scores td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.scores th {
    font-weight: 600;
}

/* Canvas для лепестков */
.petals-canvas {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#petals-left {
    left: 0;
}

#petals-right {
    right: 0;
}

/* Адаптивность */
@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }

    #gameCanvas {
        height: 300px;
    }

    button {
        width: 100%;
        font-size: 16px;
    }
}
