.soundboard-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.sound-category {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 15px 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    position: relative;
}

.category-title {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    font-size: 14px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    grid-column: 1 / -1;
}

.sound-button {
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    height: 60px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sound-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.sound-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sound-button.playing {
    animation: subtle-pulse 2s infinite;
}

.sound-button .icon-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.sound-button .icon {
    font-size: 20px;
    transition: opacity 0.3s;
}

.sound-button .play-icon,
.sound-button .pause-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.7;
}

.sound-button .pause-icon {
    opacity: 0;
}

.sound-button.playing .play-icon {
    opacity: 0;
}

.sound-button.playing .pause-icon {
    opacity: 0.7;
}

.sound-button span.label {
    font-size: 12px;
    display: block;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 4px;
    opacity: 0.9;
}

/* Progress bar colors based on button background */
.sound-button[style*="background-color: rgb(119, 221, 119)"] .progress { /* Green */
    background: rgba(221, 119, 119, 0.8); /* Complementary red */
}

.sound-button[style*="background-color: rgb(255, 179, 71)"] .progress { /* Orange */
    background: rgba(71, 147, 255, 0.8); /* Complementary blue */
}

.sound-button[style*="background-color: rgb(255, 153, 153)"] .progress { /* Light red */
    background: rgba(153, 255, 255, 0.8); /* Complementary cyan */
}

.sound-button[style*="background-color: rgb(255, 107, 107)"] .progress { /* Red */
    background: rgba(107, 255, 255, 0.8); /* Complementary cyan */
}

.sound-button[style*="background-color: rgb(72, 149, 239)"] .progress { /* Blue */
    background: rgba(239, 162, 72, 0.8); /* Complementary orange */
}

.sound-button[style*="background-color: rgb(155, 89, 182)"] .progress { /* Purple */
    background: rgba(116, 182, 89, 0.8); /* Complementary green */
}

.sound-button .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 6px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transition: width 0.1s linear;
}

@keyframes subtle-pulse {
    0% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
    100% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
}
