/* =======================
   Global Styles
   ======================= */
   :root {
    --primary: #6ead02; 
    --primary-hover: #a6c570;
    --secondary: white;
    --bg: #f3f4f6;
    --text: #f3f4f6;
}

body {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    padding: 20px;
    background-color: #3e610061;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.05;
    pointer-events: none;
}

h1 {
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* =======================
   Sequencer Grid
   ======================= */
#sequencer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto;
    align-items: center;            /* center the entire sequencer horizontally */
    border: 1px solid black;      /* white border around the sequencer */
    border-radius: 12px;            /* rounded corners */
    padding: 20px;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;    /* vertical centering */
    align-items: center;        /* horizontal centering */
    min-height: 100vh;          /* full height */
    margin: 0;                  /* remove default body margin */
}

.row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.row-label {
    width: 87px;       /* fixed width for all labels */
    margin-right: 8px;
    color: white;      /* adjust to match your theme */
}

.step {
    width: 30px;
    height: 30px;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step.active {
    background-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.step.current {
    border-color: var(--secondary);
}

.step:hover {
    transform: scale(1.05);
}

h1 {
    color: white;
}

label {
    color: white;
}

/* =======================
   Buttons
   ======================= */
button {
    background-color: var(--primary);
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    display: inline-block;
    margin-top: 20px;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* =======================
   Range Slider (BPM)
   ======================= */
input[type=range] {
    -webkit-appearance: none;
    width: 400px;
    height: 8px;
    background: #111;
    border-radius: 4px;
    
    outline: none;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: 0.2s ease;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: 0.2s ease, transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-top: 20px;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: block;
  }