.main-panel {
    display: grid;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.288);
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    width: 90%;
    max-width: 52rem;
    margin: 1rem auto;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: fadeIn 0.6s ease-in-out;
}

body.dark-mode .main-panel {
    background-color: rgba(68, 68, 68, 0.288);
    border: 2px solid #C9C9C9;
}

.main-panel h1 {
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

body.dark-mode .main-panel h1 {
    color: #f5efef;
}

.score {
    color: #1a1a1a;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #a0a0a0;
}

.settings {
    color: #1a1a1a;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #a0a0a0;
}

body.dark-mode .score {
    color: #f5efef;
}

body.dark-mode .settings {
    color: #f5efef;
}


ul#score-list {
    list-style: none;
    padding: 0;
    font-family: monospace;
    font-size: 0.95rem;
    color: #5f5f5f;
}

body.dark-mode ul#score-list {
    color: #d8d8d8;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.toggle-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.about {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ccc;
    font-size: 0.95rem;
    color: #1a1a1a;
    text-align: left;
}

.about h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.about ul {
    list-style: none;
    padding-left: 0;
}

.about ul li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    position: relative;
    left: 0;
}

body.dark-mode .about {
    color: #f5efef;
}

.bottom-text {
    text-decoration: none;
    font-size: 0.85rem;
    color: #5f5f5f;
    opacity: 0.7;
    margin-top: 1.5rem;
}

.bottom-text a {
    color: #5f5f5f;
    text-decoration: none;
}

body.dark-mode .bottom-tex {
    color: #d8d8d8;
}

body.dark-mode .bottom-tex a {
    color: #d8d8d8;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-name {
    align-items: center;
    appearance: none;
    background-color: #fcfcfd;
    border-radius: 4px;
    border-width: 0;
    box-shadow:
        rgba(45, 35, 66, 0.2) 0 2px 4px,
        rgba(45, 35, 66, 0.15) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    box-sizing: border-box;
    color: #1a1a1a;
    cursor: pointer;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    line-height: 1;
    list-style: none;
    overflow: hidden;
    padding-left: 16px;
    padding-right: 16px;
    position: relative;
    text-align: left;
    text-decoration: none;
    transition:
        box-shadow 0.15s,
        transform 0.15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    will-change: box-shadow, transform;
    font-size: 18px;
}

.button-name a {
    text-decoration: none;
    color: #1a1a1a;
}

.button-name:focus {
    box-shadow:
        #d6d6e7 0 0 0 1.5px inset,
        rgba(45, 35, 66, 0.4) 0 2px 4px,
        rgba(45, 35, 66, 0.3) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
}

.button-name:hover {
    /* background-color: rgba(204, 204, 204, 0.589); */
    box-shadow:
        rgba(45, 35, 66, 0.3) 0 4px 8px,
        rgba(45, 35, 66, 0.2) 0 7px 13px -3px,
        #d6d6e7 0 -3px 0 inset;
    transform: translateY(-2px);
    color: #343434;
}

.button-name:active {
    box-shadow: #d6d6e7 0 3px 7px inset;
    transform: translateY(2px);
}


.theme-checkbox {
    --toggle-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 6.25em;
    height: 3.125em;
    background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
    background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
    background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
    background-size: 205%;
    background-position: 0;
    -webkit-transition: 0.4s;
    -o-transition: 0.4s;
    transition: 0.4s;
    border-radius: 99em;
    position: relative;
    cursor: pointer;
    font-size: var(--toggle-size);
}

.theme-checkbox::before {
    content: "";
    width: 2.25em;
    height: 2.25em;
    position: absolute;
    top: 0.438em;
    left: 0.438em;
    background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
    background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
    background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
    background-size: 205%;
    background-position: 100%;
    border-radius: 50%;
    -webkit-transition: 0.4s;
    -o-transition: 0.4s;
    transition: 0.4s;
}

.theme-checkbox:checked::before {
    left: calc(100% - 2.25em - 0.438em);
    background-position: 0;
}

.theme-checkbox:checked {
    background-position: 100%;
}

@media screen and (max-width: 768px) {
    .main-panel {
        width: 95%;
        padding: 0.5rem;
    }

    .main-panel h1 {
        margin-top: 1rem;
    }

    #play-area {
        grid-template-columns: repeat(2, 80px);
        gap: 1rem;
    }

    .button-name,
    .pre-button {
        width: 100%;
        font-size: 16px;
        padding: 0.75rem;
        margin: 1rem 0;
    }

    .game-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    #stats {
        font-size: 1.5rem;
        flex-direction: column;
    }

    #stats #timer {
        margin-right: 1rem;
    }

    .pre-btn {
        margin: 1rem auto;
        justify-content: center;
    }

    .about,
    .settings,
    .score {
        padding: 0 1rem;
        text-align: center;
    }

    .about ul,
    .score ul {
        text-align: left;
    }
}