* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-touch-callout: none;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #121212, #1a1a2e);
    color: #f4f4f4;
    min-height: 100vh;
}

h1,
h2 {
    color: #4a9eff;
    margin: 1.5em 0 0.8em;
    text-shadow: 0 2px 4px rgba(74, 158, 255, 0.3);
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 0.5em;
    letter-spacing: -1px;
}

p {
    margin-bottom: 1.2em;
    text-align: justify;
}

/* Ð£Ð»ÑƒÑ‡ÑˆÐµÐ½Ð½Ñ‹Ðµ ÑÑ‚Ð¸Ð»Ð¸ Ð¼ÐµÐ½ÑŽ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ */
.selection-menu {
    position: fixed;
    background: rgba(45, 45, 45, 0.9);
    border-radius: 16px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 1000;
    padding: 8px;
    user-select: none;
    touch-action: none;
    backdrop-filter: blur(15px);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    max-width: 500px;
    animation: menu-appear 0.2s ease-out;
    transform-origin: center;
}

@keyframes menu-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-button {
    background: none;
    border: none;
    color: #e0e0e0;
    padding: 6px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.8em;
    min-width: 70px;
    text-align: center;
    flex-direction: column;
    align-content: center;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4a9eff;
}

.menu-button:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.menu-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.menu-button:hover svg {
    opacity: 1;
}

/* ÐÐ´Ð°Ð¿Ñ‚Ð¸Ð²Ð½Ð¾ÑÑ‚ÑŒ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .selection-menu {
        width: calc(100% - 20px);
        max-width: none;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu-button {
        flex: 1 1 calc(33.333% - 8px);
        margin: 4px;
        padding: 8px 10px;
        font-size: 0.7em;
    }

    .menu-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Ð£Ð»ÑƒÑ‡ÑˆÐµÐ½Ð¸Ñ Ð´Ð¾ÑÑ‚ÑƒÐ¿Ð½Ð¾ÑÑ‚Ð¸ Ð¸ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸ */
@media (prefers-reduced-motion: no-preference) {
    .selection-menu {
        transition: all 0.2s ease;
    }
}

/* Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ ÑÑ…ÐµÐ¼Ð° Ð´Ð»Ñ Ñ‚ÐµÐ¼Ð½Ð¾Ð¹ Ñ‚ÐµÐ¼Ñ‹ */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #121212, #1a1a2e);
    }
}