*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #F9F9F9;
    color: #000;
    text-align: center;
    overflow-x: hidden;
}

/* Main layout */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

/* Chord prompt */
#chord {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    line-height: 1.1;
}

/* Inversion prompt */
#inversion {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 600;
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Timer */
#timer {
    font-size: clamp(1rem, 3vw, 1.4rem);
    margin-bottom: 1rem;
}

/* Image wrapper */
.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

/* Chord image */
#chordImage {
    width: 100%;
    max-width: 90vw;      /* phone friendly */
    max-height: 30vh;     /* responsive height */
    object-fit: contain;
}

/* Controls */
.controls {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
button {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* Checkbox */
label {
    font-size: 0.95rem;
}

.interval-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.interval-controls input {
    width: 70px;
    font-size: 1rem;
    padding: 0.4rem;
    text-align: center;
}

.interval-controls button {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
}

body.paused {
    opacity: 0.85;
}

/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;

    width: 260px;
    height: 100vh;

    background: #ffffff;
    border-right: 1px solid #ddd;
    padding: 1rem;

    transform: translateX(-100%);
    transition: transform 0.3s ease;

    z-index: 1000;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;

    font-size: 1.4rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
}
