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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f0;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
}

/* Header / Logo */
header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}

.logo-text {
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    color: #333;
    font-weight: 700;
}

.logo-bold {
    font-size: 2.8rem;
}

.exclaim {
    color: #e74c3c;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.board-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.edit-icon {
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.6;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #e0e0e0;
}

.save-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #f0f0f0;
}

/* Soundboard Grid */
.soundboard {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* Sound Pad */
.sound-pad {
    aspect-ratio: 1;
    background: #e8e6e1;
    border: 1px solid #d0cec9;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sound-pad:hover {
    transform: scale(1.02);
}

.sound-pad:active {
    transform: scale(0.98);
}

.sound-pad.has-sound {
    background: #a8e6cf;
    border-color: #8ed1b5;
}

.sound-pad.playing {
    background: #7dd3ae;
    transform: scale(0.96);
}

/* Browse button inside pad */
.browse-btn {
    padding: 8px 16px;
    background: #4a4a4a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s;
}

.browse-btn:hover {
    background: #333;
}

/* Sound name label */
.sound-label {
    padding: 8px 16px;
    background: #4a4a4a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    max-width: 80%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Bottom indicator line */
.pad-indicator {
    position: absolute;
    bottom: 15px;
    width: 40px;
    height: 4px;
    background: #c0beb9;
    border-radius: 2px;
}

.sound-pad.has-sound .pad-indicator {
    background: #6bc49d;
}

/* Delete button */
.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-pad:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #e74c3c;
}

/* Hidden file input */
.file-input {
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    .soundboard {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .soundboard {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .sound-pad {
        border-radius: 14px;
    }
}
