body {
    font-family: sans-serif;
    text-align: center;
}

#fretboard {
    display: grid;
    grid-template-columns: repeat(18, 50px); /* 18 frets */
    /* 6 strings, each fret is 30px high */
    grid-template-rows: repeat(6, 30px);
    margin: 0 auto;
    width: 900px; /* 18 frets * 50px/fret */
    position: relative; /* For absolute positioning of string lines */
    background-image:
        linear-gradient(#888, #888), /* String 1 (high E) */
        linear-gradient(#888, #888), /* String 2 (B) */
        linear-gradient(#888, #888), /* String 3 (G) */
        linear-gradient(#888, #888), /* String 4 (D) */
        linear-gradient(#888, #888), /* String 5 (A) */
        linear-gradient(#888, #888); /* String 6 (low E) */
    background-repeat: no-repeat;
    background-size:
        100% 1px,    /* String 1 */
        100% 1.5px,  /* String 2 */
        100% 2px,    /* String 3 */
        100% 2.5px,  /* String 4 */
        100% 3px,    /* String 5 */
        100% 3.5px;  /* String 6 */
    background-position:
        0 15px,      /* String 1 */
        0 45px,      /* String 2 */
        0 75px,      /* String 3 */
        0 105px,     /* String 4 */
        0 135px,     /* String 5 */
        0 165px;     /* String 6 */
}

#fret-numbers {
    display: flex;
    justify-content: space-between;
    width: 900px;
    margin: 0 auto 10px;
    padding-left: 50px;
    box-sizing: border-box;
}

.fret-number {
    width: 50px;
    text-align: center;
}

.string {
    display: contents;
}

.fret {
    height: 30px;
    border-left: 2px solid #ccc;
    box-sizing: border-box;
    position: relative;
}

.fret[data-fret="0"] {
    border-left: none;
}

.fret[data-fret="1"] {
    border-left: 3px solid #000;
}

.fret[data-string="0"]:not([data-fret="0"]) {
    border-top: 1px solid #ccc;
}

.fret[data-string="5"]:not([data-fret="0"]) {
    border-bottom: 1px solid #ccc;
}







.note {
    width: 20px;
    height: 20px;
    background-color: #f00;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: none; /* Initially hidden */
}

.fret.active .note {
    display: block;
}


.fret.correct .note {
    background-color: #0f0; /* Green */
    display: block;
}

.fret.incorrect .note {
    background-color: #f00; /* Red */
    display: block;
}

#challenge {
    margin-bottom: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.fret-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%); /* Center the dot */
    z-index: 10; /* Ensure it's above other elements if necessary */
}

.active-mode {
    background-color: #000;
    color: #fff;
}