:root {
    --bg: #071022;
    --panel: #0f1724;
    --muted: #94a3b8;
    --accent: #ff7a59;
    --white: #ffffff;
    --active: #facc15;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, Arial, sans-serif;
    background: linear-gradient(180deg, #071022 0%, #07182a 100%);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
}

.app {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 18px;
}

@media (max-width: 980px) {
    .app {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header h1 {
    margin: 0;
    font-size: 20px;
}

.header .muted {
    color: var(--muted);
    font-size: 13px;
}

.kit {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.pad {
    width: 160px;
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}

.pad:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.pad .name {
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    color: var(--muted);
}

.pad .keyLabel {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
    font-weight: 700;
    color: var(--muted);
}

.pad .editBtn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
}

.pad.active {
    transform: translateY(0);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.12);
    outline: 2px solid rgba(255, 180, 100, 0.12);
}

.pad.active .keyLabel {
    background: linear-gradient(90deg, var(--accent), #ff9f6b);
    color: #111;
    box-shadow: 0 8px 30px rgba(255, 130, 80, 0.12);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.controls label {
    color: var(--muted);
    font-size: 13px;
}

.sequence {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sequence input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--white);
    outline: none;
}

.sequence input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.playBtn {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent);
    border: none;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.playBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.editOverlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #071428;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    border-radius: 10px;
    z-index: 1200;
    display: flex;
    gap: 8px;
    align-items: center;
}

.editOverlay input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--white);
    width: 64px;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1440px) and (min-width: 768px) {
    .pad {
        width: 140px;
        height: 110px;
    }
}

@media (max-width: 768px) {
    .app {
        padding: 12px;
        grid-template-columns: 1fr;
    }

    .pad {
        width: 48%;
        min-width: 120px;
        height: 100px;
    }

    .header h1 {
        font-size: 18px;
    }

    .controls {
        width: 100%;
    }

    .sequence input {
        width: 140px;
    }
}
