:root {
    --bt-radius: 100px;
    --box-radius: 8px;
    --box-shadow: 0px 0px 5px 0px var(--color-3);
    --color-main: green;
    --color-1: #efefefef;
    --color-2: #e7e7e7;
    --color-3: #e4e4e4e4;
}
* {
    padding: 0;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-sizing: border-box;
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
}
h1 {
    font-size: 18px;
    color: black;
}
h2 {
    font-size: 16px;
    color: black;
}
h3 {
    font-size: 14px;
    color: black;
}
p, span, li, th, td, button, body {
    font-size: 14px;
    color: #3c3c3c;
}
a {
    text-decoration: none;
    font-size: 14px;
    color: #565555;
}
body {
    background: var(--color-1);
}
button {
    background: var(--color-main);
    color: white;
    border-radius: var(--bt-radius);
    border: 0;
    width: 100%;
    padding: 4px 10px;
    cursor: pointer;
}
input {
    font-size: 16px;
    border: solid 1px var(--color-1);
    outline: 0;
    padding: 3px 8px;
    width: 100%;
}
img {
    width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}
li {
    list-style: none;
}
li:hover {
    background: var(--color-2);
    cursor: pointer;
    border-radius: var(--box-radius);
}
hr {
    border-bottom: solid 1px var(--color-1);
    margin: 20px 0px;
    background-color: white;
    width: 100%;
}
.container {
    max-width: 1280px;
    margin: auto;
}
section {
    padding: 10px;
}
article, aside {
    contain: content; 
}
/* <------ Nav ------------- */
.top-bar {
    max-width: 1280px;
    margin: auto;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-bottom: solid 1px var(--color-3);
    margin-bottom: 5px;
    padding-bottom: 5px;
}
nav {
    padding: 10px 5px;
}
nav input {
    border-radius: 50px;
    padding: 6px 13px;
}
nav a {
    display: flex;
}
nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#logo {
    width: 140px;
    height: 47px;
    padding: 3px;
}
.menu {
    display: flex;
    justify-content: right;
    align-items: center;
    width: 100%;
    padding: 3px 8px;
}
.search {
    position: relative;
    max-width: 400px;
    flex-grow: 1;
}
.list-search {
    position: absolute;
    background-color: white;
    right: 0;
    top: 47px;
    border-radius: 10px;
    box-shadow: 0px 0px 9px 5px #acacac0f;
    width: -webkit-fill-available;
    display: none;
    z-index: 1;
}
#list-search li {
    line-height: 2;
    padding: 2px 10px;
}
/* <------ End Nav --------- */

/* <------ Home Page --------- */
.home {
    grid-template-columns: 1fr !important;
}
.home ul li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--box-radius);
    margin-right: 10px;
}
.home ul li {
    border-bottom: solid 1px var(--color-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.home ul li a {
    display: flex;
    align-items: center;
    padding: 5px;
    width: 100%;
}
ul.pagination {
    display: flex;
    gap: 5px;
}
ul.pagination li {
    padding: 1px 5px;
    border-radius: var(--bt-radius);
    margin-top: 10px;
    background: var(--color-1);
}
li.currentpage {
    background: var(--color-main) !important;
}
li.currentpage a {
    color: white !important;
}
.num-list {
    cursor: pointer;
}
.num-list a {
    width: 100%;
}
.top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.top-new, .top-artist {
    background: white;
    padding: 10px;
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
}
.top-new h1, .top-artist h1 {
    padding: 5px;
    border-bottom: solid 1px var(--color-1);
}
.top-artist span {
    padding: 5px;
    background-color: var(--color-main);
    color: white;
    border-radius: var(--bt-radius);
}
/* <------ End Home Page --------- */

/* <------ Header --------- */
header .container {
    display: flex;
}
section.controller {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.con-key, .con-text {
    display: flex;
    font-size: 16px;
    gap: 5px;
    touch-action: manipulation;
    align-items: center;
    justify-content: center;
}
.simple-chord {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    gap: 4px;
}
.controller button {
    user-select: none;
    border-radius: 50px;
    width: 100px;
  }
input#transpose {
    text-align: center;
    background: transparent;
    border: 0;
    padding: 0;
    width: 18px;
}
.sub-title {
    align-items: center;
    flex-grow: 1;
}
.sub-title span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.artist {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 100% !important;
}
.artist-img {
    display: flex;
    gap: 5px;
    padding-bottom: 5px;
}
.sub-title {
    display: flex;
    gap: 10px;
}
.title span {
    color: var(--color-main);
    background-color: white;
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0px 0px 9px 5px #acacac0f;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.sub-title img {
    width: 15px;
    height: 15px;
}
/* <------ End Header --------- */

/* <------ main --------- */
main {
    display: grid;
    grid-template-columns: 73% 27%;
    gap: 10px;
    max-width: 1280px;
    margin: auto;
    /* padding: 8px; */
    transition: all 0.5s ease-in-out;
}
article {
    background-color: white;
    border-radius: var(--box-radius);
    position: relative;
}
.screen {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}
aside {
    border-radius: var(--box-radius);
    box-sizing: var(--box-shadow);
}
#content {
    margin: auto;
    display: block;
    column-width: 25em;
    font-size: 14px;
    letter-spacing: -0.7px;
    column-rule: solid 1px var(--color-3);
    padding: 25px 5px;
    column-gap: 5px;
}
#content * {
    font-size: inherit;
}
.fit-content {
    width: fit-content;
    margin: auto;
}
.col-sub {
    border-bottom: solid 1px var(--color-2);
    padding: 0.6em 0px;
}
.col-sub:last-child {
    border-bottom: 0;
}
.col-sub.hilight1 .text:nth-child(n+2) {
    padding-left: 0.5em;
}
.col-sub.hilight2 .text:nth-child(n+2) {
    padding-left: 1em;
}
.col-sub.hilight3 .text:nth-child(n+2) {
    padding-left: 1.3em;
}
.col-sub.hilight4 .text:nth-child(n+2) {
    padding-left: 1.6em;
}
blockquote span, blockquote span {
    margin: 0px !important;
    top: 0 !important;
    width: auto !important;
    padding: 3px;
}
blockquote {
    font-weight: bold;
    width: 100%;
    padding: 0.4em 0 !important;
}
blockquote .text {
    padding: 10px;
}
.text {
    padding-top: 1em;
}
.chord {
    color: var(--color-main);
    position: relative;
    display: inline-block;
    width: 25px;
    top: -1.3em;
    margin-right: -25px;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
}
#chord {
    color: var(--color-main);
    position: relative;
    display: inline-block;
    width: 25px;
    top: -1.35em;
    margin-left: -25px;
    font-weight: bold;
    cursor: pointer;
}
.double {
    font-weight: bold;
}
.re p.text {
    padding-top: 0;
}
/* .col-sub.re {
    border: 0;
} */
/* .col-sub.in {
    border: 0;
} */
.chord:hover, #chord:hover, .other li a:hover {
    color: #ff8100;
}
.chord-popup {
    position: absolute;
    width: 120px;
    background-color: white;
    box-shadow: 0 2px 8px #efefefef;
    z-index: 9999;
    display: none;
    border-radius: 6px;
    height: 130px;
  }
.control-scroll {
    position: fixed;
    right: 5px; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 40px; 
    min-height: 150px;
    transition: opacity 0.4s ease; /* ใช้ opacity แทน right */
    opacity: 1;
}

.control-scroll.is-hidden {
    opacity: 0;
    pointer-events: none; /* ป้องกันการคลิกโดนตอนซ่อน */
}
div#speed-levels-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: solid 1px var(--color-3);
    border-radius: 3px;
    margin: 3px 0px;
    background-color: var(--color-2);
    opacity: 0.6;
}
.level-item:first-child {
    border: 0px;
}
.level-item {
    text-align: center;
    padding: 2px 6px;
    border-top: solid 1px white;
}
span.stop-symbol {
    padding: 8px;
    border-radius: 3px;
}
.two-line-ellipsis {
    margin-top: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-indent: 2em;
}
.allchords {
    padding-top: 13px;
    display: inline-table;
    text-align: center;
    width: 100%;
}
.allchords img {
    width: 110px;
}
/* <------ End main --------- */

/* <------ other --------- */
.other h2 {
    display: flex;
    align-items: center;
}
.other li {
display: inline-block;
    margin: 3px 3px;
    background: var(--color-2);
    padding: 0px 10px;
    border-radius: var(--bt-radius);
}
.artist-block {
    margin-bottom: 15px;
}
/* <------ End other --------- */
/* <------ footer --------- */
footer {
    background-color: var(--color-2);
    padding: 50px 10px 80px 10px;
    margin-top: 10px;
}
.tag {
    text-align: center;
    padding: 20px 10px;
}
.tag h3 {
    display: inline-block;
    margin: 3px 3px;
    background: var(--color-2);
    padding: 0px 10px;
    border-radius: var(--bt-radius);
}
/* <------ End footer --------- */


@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
    .screen {
        display: none;
    }
}
@media (min-width: 600px) {
    .control-scroll {
        display: none;
    }
}
@media (max-width: 600px) {
    .top-bar {
        justify-content: center;
    }
    .top {
        grid-template-columns: 1fr;
    }
    .con-text {
        display: none;
    }
    nav .container {
        flex-direction: column;
        gap: 10px;
    }
}
