body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: auto;
    padding: 15px;

    background: #fafafa;
    touch-action: manipulation;
}

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

.header {
    transition: all 0.3s ease;
}

.header.compact .logo {

    width: 48px;

    transition: width 0.3s ease;
}

.header.compact h1 {

    font-size: 1.1rem;

    margin: 4px 0;
}


.logo {
    width: 120px;
    max-width: 40vw;
    height: auto;
}

h1 {
    margin-top: 10px;
}

button {
    padding: 14px;
    margin: 5px;

    font-size: 1rem;
    cursor: pointer;

    border-radius: 8px;
}

#song-list button {
    width: 100%;
    margin-bottom: 10px;
}

#player {
    background: white;

    padding: 24px;

    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(0,0,0,.08);

    border: 1px solid rgba(0,0,0,.05);
}

.transport {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.transport-row {

    display: flex;

    gap: 12px;

    align-items: center;

    margin-bottom: 24px;
}

.transport button {
    flex: 1;
}

.instrument-help {

    text-align: center;

    margin-bottom: 18px;

    color: #666;

    font-size: .9rem;
}

.instruments {

    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.instrument {

    flex: 1;
    text-align: center;
}

.instrument img {
    width: 100%;
    max-width: 90px;

    transition:
        transform .15s,
        box-shadow .15s,
        opacity .15s;
}

.instrument img:hover {
    transform: scale(1.05);
}

.instrument:active img {
    transform: scale(0.95);
}

.instrument img.unmuted {
    opacity: 1;
}

.instrument img.muted {

    filter: grayscale(100%);
    opacity: 0.3;
}

.instrument-name {

    margin-top: 8px;
    font-weight: bold;
}

@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    .logo {
        width: 100px;
    }

    h1 {
        font-size: 1.8rem;
    }

    button {
        font-size: 1.1rem;
    }

    .instrument img {
        max-width: 30vw;
    }
}

.instrument img.unmuted {
    opacity: 1;
    box-shadow: 0 0 12px rgba(0, 180, 0, 0.4);
}

.song-selector {

    display: flex;
    gap: 10px;

    margin-bottom: 20px;
}

.song-selector select {

    flex: 1;

    padding: 14px;

    font-size: 1rem;

    border-radius: 8px;
}

.footer {

    margin-top: 40px;
    padding-top: 20px;

    border-top: 1px solid #ddd;

    text-align: center;

    font-size: 0.9rem;
    color: #666;
}

#song-title {
    text-align: center;
    font-size: 1.45rem;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.3;
}

.loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);

    display: flex;
    flex-direction: column;
    gap: 15px;

    align-items: center;
    justify-content: center;

    color: white;
    font-size: 1.2rem;

    z-index: 9999;
}

.hidden {
    display: none;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;

    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;

    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.speed-control {
    width: 200px;
    margin: 10px auto;
}


.speed-label {

    white-space: nowrap;
    font-size: 0.9rem;
}

#speedSlider {

    flex: 1;
}

#speedValue {

    width: 50px;
    text-align: right;
}

.progress-container {

    width: 100%;
    height: 12px;

    background: #ddd;

    border-radius: 6px;

    overflow: hidden;

    margin-bottom: 20px;
}

.progress-bar {

    width: 0%;

    height: 100%;

    background: #4caf50;

    transition: width 0.05s linear;
}

.progress-label {

    text-align: center;

    font-size: 1rem;

    font-weight: 600;

    color: #555;

    margin-bottom: 14px;
}
.playhead {

    position: absolute;

    top: 50%;

    left: 0%;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: #00b050;

    border: 3px solid white;

    box-shadow:
        0 2px 8px rgba(0,0,0,.25);

    transform: translate(-50%, -50%);

    z-index: 10;
}

#playBtn {

    flex: 1;

    min-height: 60px;

    border: none;

    background: #ff9800;

    color: white;

    font-size: 30px;

    border-radius: 14px;

    box-shadow:
        0 4px 12px rgba(255,152,0,.30);

    transition:
        transform .15s,
        box-shadow .15s;
}

#playBtn:hover {

    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(255,152,0,.45);
}

#playBtn:active {

    transform: scale(.97);
}
.intro-box {
    background: white;
    padding: 16px 20px;
    margin-bottom: 20px;

    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);

    line-height: 1.5;
    color: #444;
}

.intro-box p:first-child {
    margin-top: 0;
}

.intro-box p:last-child {
    margin-bottom: 0;
}


.switch {
    position: relative;
    width: 56px;
    height: 30px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: #555;
    transition: 0.25s;
    cursor: pointer;
}

.slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    transition: 0.25s;
}

.switch input:checked + .slider {
    background: #ff9800;
}

.switch input:checked + .slider::before {
    transform: translateX(26px);
}
.timeline {

    position: relative;

    height: 12px;

    background: #d3d3d3;

    border-radius: 6px;

    margin-bottom: 24px;

    overflow: visible;
}

.timeline-markers {

    position: absolute;

    inset: 0;

    overflow: visible;

    z-index: 2;
}


.timeline-marker {

    position: absolute;

    left: 0;

    top: -3px;

    height: 18px;

    width: 4px;

    transform: translateX(-50%);

    background: rgba(0, 0, 0, 0.35);

    border-radius: 2px;

    cursor: pointer;

    transition:
        width 0.15s ease,
        background 0.15s ease;
}

.timeline-marker:hover {

    width: 10px;

    background: rgba(
        255,
        255,
        255,
        0.8
    );
}

.timeline-marker.active {

    width: 10px;

    background: orange;
}

.intro-box {

    max-height: 200px;

    overflow: hidden;

    transition:
        max-height 0.4s ease,
        opacity 0.4s ease,
        margin-bottom 0.4s ease;
}

.intro-box.hidden {

    max-height: 0;

    opacity: 0;

    margin-bottom: 0;

    padding-top: 0;
    padding-bottom: 0;
}

.loop-control {

    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 90px;

    justify-content: center;

    font-size: 1.3rem;

    font-weight: bold;
}