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

body {
    background: #101014;
    color: #ffffff;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    padding: 30px 20px;
}

header {
    text-align: center;
    margin-bottom: 35px;
}

header h1 {
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

header p {
    color: #92929e;
    font-size: 15px;
}

main {
    max-width: 1100px;
    margin: auto;
}

.random-button {
    display: block;
    width: 100%;
    padding: 22px;
    margin-bottom: 25px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7547ed, #a33bea);
    color: white;
    font-size: 21px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.random-button:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 160px));
    justify-content: center;
    gap: 14px;
}

.sound-button {
    aspect-ratio: 1 / 1;
    min-width: 0;
    padding: 0;
    border: 1px solid #30303b;
    border-radius: 12px;
    background: #1c1c24;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    overflow: hidden;
    overflow-wrap: anywhere;
    transition: background 0.15s, border 0.15s, transform 0.15s;
}

.sound-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sound-button:hover {
    background: #292936;
    border-color: #8054e8;
    transform: translateY(-2px);
}

.sound-button:active {
    transform: scale(0.96);
}

.sound-button.playing {
    background: transparent;
    border-color: #a276ff;
}

footer {
    text-align: center;
    margin-top: 45px;
    color: #666672;
    font-size: 12px;
}

@media (max-width: 800px) {
    .sound-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    body {
        padding: 22px 12px;
    }

    .sound-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sound-button {
        font-size: 14px;
    }

    .random-button {
        padding: 19px;
    }
}
