body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f0f0f0;
    /* Light gray background */
}

h1 {
    text-align: center;
    color: #333;
}

#btn ul {
    list-style-type: none;
    /* Remove default list bullets */
    padding: 0;
    display: flex;
    /* Arrange items in a row */
    flex-wrap: wrap;
    /* Allow items to wrap to the next line */
    justify-content: center;
    /* Center items on the page */
    gap: 20px;
    /* Space between circles */
}

#btn li a {
    display: flex;
    /* Use flexbox for centering text inside the circle */
    justify-content: center;
    /* Center text horizontally */
    align-items: center;
    /* Center text vertically */
    width: 250px;
    /* Default size for large screens */
    height: 250px;
    /* Default size for large screens */
    border-radius: 50%;
    /* Make it a circle */
    background-color: #acf;
    /* Light blue background */
    border: 10px solid #57a;
    /* Default border size */
    color: black;
    text-decoration: none;
    font-size: 36px;
    /* Default font size */
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
    touch-action: manipulation;
    /* Disable double tap to zoom */
    transition: background-color 0.2s ease, transform 0.1s ease;
    /* Smooth transitions */
}

#btn li a:hover {
    background-color: #9be;
    /* Lighter blue on hover */
}

#btn li a:active {
    background-color: #79c;
    /* Even lighter blue when clicked */
    transform: scale(0.95);
    /* Slightly shrink on click */
}

#player-status {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    color: #555;
}

/* CSS-only Hamburger Menu */
.menu-toggle-checkbox {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    opacity: 0;
    z-index: 1002;
    cursor: pointer;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    outline: none;
}

.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #57a;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hamburger:hover {
    background: #468;
    transform: scale(1.05);
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.menu-toggle-checkbox:checked+.hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle-checkbox:checked+.hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-checkbox:checked+.hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Menu overlay and content */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.menu-toggle-checkbox:checked~.menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #57a;
    padding: 80px 30px 30px;
    /* Top padding to avoid hamburger button overlap */
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
}

.menu-toggle-checkbox:checked~.menu-overlay .menu-content {
    transform: translateX(0);
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.toggle {
    display: flex;
    align-items: center;
    background-color: #acf;
    /* Match the button background */
    padding: 12px 18px;
    border-radius: 30px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
    width: calc(100% - 80px);
    /* Leave space for hamburger button (50px + 20px margin + 10px gap) */
    justify-content: flex-start;
}

.toggle:hover {
    background-color: #9be;
    /* Match button hover state */
    transform: translateX(5px);
}

.toggle input {
    margin-right: 12px;
    transform: scale(1.3);
}

.toggle span {
    font-weight: bold;
}

/* Dark mode styles (optional, based on blah.css) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #003;
        color: #eee;
    }

    h1 {
        color: #eee;
    }

    #btn li a {
        background-color: #acf;
        /* Changed from #357 to match blah.css default */
        border-color: #57a;
        /* Changed from #135 to match blah.css default */
        color: black;
        /* Changed from #eee to match blah.css default */
    }

    #btn li a:hover {
        background-color: #9be;
        /* Changed from #468 to match blah.css hover */
    }

    #btn li a:active {
        background-color: #79c;
        /* Changed from #579 to match blah.css active */
    }

    #player-status {
        color: #ccc;
    }
}

/* Responsive styles for different screen sizes */
/* Large tablets and small desktops */
@media screen and (max-width: 1200px) {
    #btn li a {
        width: 200px;
        height: 200px;
        font-size: 28px;
        border-width: 8px;
    }

    #btn ul {
        gap: 15px;
    }
}

/* Tablets and small laptops */
@media screen and (max-width: 992px) {
    #btn li a {
        width: 170px;
        height: 170px;
        font-size: 24px;
        border-width: 7px;
    }

    #btn ul {
        gap: 12px;
    }
}

/* Larger phones and small tablets */
@media screen and (max-width: 768px) {
    #btn li a {
        width: 140px;
        height: 140px;
        font-size: 20px;
        border-width: 6px;
    }

    #btn ul {
        gap: 10px;
    }

    body {
        margin: 15px;
    }
}

/* Mobile phones */
@media screen and (max-width: 576px) {
    #btn li a {
        width: 100px;
        height: 100px;
        font-size: 16px;
        border-width: 5px;
    }

    #btn ul {
        gap: 8px;
    }

    body {
        margin: 10px;
    }

    .hamburger {
        width: 38px;
        height: 38px;
        top: 15px;
        right: 15px;
    }

    .hamburger span {
        width: 18px;
        height: 2px;
    }

    .menu-content {
        width: 250px;
        padding: 70px 25px 25px;
    }

    .toggle {
        padding: 10px 15px;
        font-size: 14px;
        width: calc(100% - 65px);
        /* Leave space for mobile hamburger (38px + 15px margin + 12px gap) */
    }

    .toggle input {
        margin-right: 8px;
        transform: scale(1.1);
    }
}

/* Very small mobile phones */
@media screen and (max-width: 375px) {
    #btn li a {
        width: 28vw;
        /* Approximately 3 buttons per row accounting for gap */
        height: 28vw;
        font-size: 14px;
        border-width: 4px;
    }

    #btn ul {
        gap: 6px;
    }

    body {
        margin: 5px;
    }

    .hamburger {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }

    .hamburger span {
        width: 16px;
        height: 2px;
    }

    .menu-content {
        width: 220px;
        padding: 60px 20px 20px;
    }

    .toggle {
        padding: 8px 12px;
        font-size: 12px;
        width: calc(100% - 55px);
        /* Leave space for very small hamburger (32px + 10px margin + 13px gap) */
    }
}