/* FONT */
@font-face {
    font-family: "c-space";
    src: url(../img/font/SpaceMono-Regular.ttf);
}

html {
    cursor: url("../img/cur/tile_0086.png"), auto;
    user-select: none;
    font-family: c-space;
}

html {
    background-color: rgb(0, 3, 32);
    overflow: hidden;
}

#body-div {
    height: 850px;
    margin-top: 30px;
}

/* STAR BACKGROUND */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    animation: blink 2s ease-in-out infinite;
}

/* GAME CONTAINER */
#game-container {
    position: relative;
    width: 600px;
    height: 800px;
    margin: 30px auto 0 auto;
    z-index: 1;
    cursor: none;
}

/* OVERLAY CANVAS */
#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* PLANET PREVIEW OUTSIDE GAME */
#preview-container {
    position: absolute;
    top: 30px;
    left: calc(55% + 300px + 30px);
    z-index: 10;
    text-align: center;
    color: white;
    top: 30px;
    right: 30px;
    z-index: 10;
    width: 230px;
    height: 230px;
    background: rgba(255, 255, 255, 0.068);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: block;
    margin-top: 5px;
}

#preview-label {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

#PCtext-div {
    height: 30px;
    padding-top: 7px;
    background-color: black;
    border-radius: 10px 10px 0px 0px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

#game-container #preview-container {
    right: 30px;
    top: 30px;
}

#next-planet-preview {
    height: 195px;
    width: 180px;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    30% {
        opacity: 0.5;
    }
}

/* LEFT PLANET BOX */
#planet-size-box {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    height: 300px;
    background: rgba(255, 255, 255, 0.068);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    overflow-y: auto;
    z-index: 1000;
}

#planet-size-canvas {
    width: 100%;
    display: block;
}

/* SCORE */
#score-div {
    position: absolute;
    background: rgba(255, 255, 255, 0.068);
    border: 2px solid rgba(255, 255, 255, 0.1);
    top: 350px;
    left: 20px;
    width: 315px;
    height: 40px;
    color: aliceblue;
    padding: 10px;
    border-radius: 5px;
}

#score-text {
    transform: translate(-5px, -20px);
    font-size: 17px;
    border: 1px solid rgb(65, 65, 65);
    float: left;
    padding: 3px;
    border-radius: 3px;
}

#score {
    transform: translateY(-3px);
    float: left;
    font-size: 27px;
    border: 1px solid rgb(65, 65, 65);
    padding: 3px;
    border-radius: 3px;
}

/* SCROLLBAR */
/* Scrollbar width */
::-webkit-scrollbar {
    width: 8px;
    height: 12px;
}

/* Track (background) */
::-webkit-scrollbar-track {
    background: #151b3f48;
    border-radius: 10px;
}

/* Thumb (scroll handle) */
::-webkit-scrollbar-thumb {
    background-color: #424242;
    border-radius: 10px;
    border: 1px solid #c5c5c5;
}

/* Thumb on hover */
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
    cursor: url("../img/cur/tile_0097.png"), auto;
}

/* Toggle BTN */
#toggle-physics {
    margin-top: 0px;
    width: 230px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.144);
    border: 2px solid rgba(255, 255, 255, 0.137);
    border-radius: 7px;
    color: rgba(245, 245, 220, 0.74);
    padding: 7px;
    font-family: c-space;
    cursor: url("../img/cur/tile_0097.png"), auto;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
}

#physicT:hover,
#toggle-physics:hover {
    color: beige;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
}

#toggle-physics:hover {
    background-color: rgba(255, 255, 255, 0.253);
}

/* Leaderboard */
#leaderboard-div {
    position: absolute;
    left: 20px;
    top: 425px;
    height: 300px;
    width: 320px;
    background: rgba(255, 255, 255, 0.068);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

#leaderboard-div h3 {
    margin: 0;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: aliceblue;
    padding: 5px;
    border-radius: 6px 6px 0px 0px;
    background: rgb(0, 0, 0);
    position: sticky;
    top: 0;
    z-index: 2;
    transform: translateY(10px) translateX(-5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#LBtext-div {
    background-color: rgb(0, 0, 0);
    height: 45px;
    top: 0;
    width: 340px;
    border-radius: 15px 15px 0px 0px;
    transform: translateY(-10px) translateX(-10px);
    position: sticky;
    z-index: 10;
}

#LB-inner-div {
    position: absolute;
    padding: none;
    min-height: 250px;
    height: fit-content;
    width: 315px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0px 0px 6px 6px;
}

#LB-list li {
    color: rgba(104, 104, 104, 0.856);
    font-size: 20px;
    border-bottom: 1px solid gray;
    padding: 5px 0px 10px 10px;
    transition: color 0.2s ease, background-color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
    font-weight: normal;
    width: 300px;
}

#LB-list {
    list-style: none;
    transform: translateX(-35px);
}

#LB-list li:hover {
    background-color: rgba(255, 255, 255, 0.075);
    cursor: url("../img/cur/tile_0097.png"), auto;
    border-radius: 0px 0px 10px 10px;
    color: rgb(170, 170, 170);
    text-shadow: 2px 2px 4px rgba(170, 170, 170, 0.6);
}

#LB-list li:nth-of-type(odd) {
    background: rgba(56, 56, 56, 0.2);
}

#LB-list li:nth-of-type(odd):hover {
    background: rgba(114, 114, 114, 0.2);
    transition: color 0.2s ease;
}

/* 1st */
#LB-list li:nth-of-type(1) {
    color: rgba(255, 217, 0, 0.7);
}

#LB-list li:nth-of-type(1):hover {
    color: gold;
    text-shadow: 2px 2px 4px rgba(255, 217, 0, 0.6);
}

/* 2nd */
#LB-list li:nth-of-type(2) {
    color: rgba(255, 255, 255, 0.7);
}

#LB-list li:nth-of-type(2):hover {
    color: rgb(255, 255, 255);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
}

/* 3rd */
#LB-list li:nth-of-type(3) {
    color: rgba(205, 127, 50, 0.7);
}

#LB-list li:nth-of-type(3):hover {
    color: rgb(205, 127, 50);
    text-shadow: 2px 2px 4px rgba(205, 127, 50, 0.6);
}

.leaderboard-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.leaderboard-tooltip.show {
    opacity: 1;
}

/* SOUND */
#sound-container {
    height: 50px;
    width: 250px;
    bottom: 0px;
    left: 10px;
    position: relative;
    background: rgba(255, 255, 255, 0.068);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 5px;
    cursor: url("../img/cur/tile_0097.png"), auto;
}

#sound-div {
    width: 55px;
    height: 50px;
    padding-left: 5px;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
}

#sound-container:hover #sound-div {
    background-color: rgba(255, 255, 255, 0.13);
    transition: background-color 0.2s ease-in-out;
}

#sound-container:hover #sound-icon,
#sound-container:hover .equalizer {
    opacity: 0.9;
    transition: opacity 0.2s ease-in-out;
}

#sound-icon {
    width: 32px;
    height: 50px;
    opacity: 0.5;
}

.equalizer {
    position: relative;
    transform: translate(60px, -50px);
    display: flex;
    gap: 6px;
    align-items: flex-end;
    opacity: 0.5;
    height: 40px;
    width: 180px;
    margin-left: 3px;
}

.bar {
    width: 7px;
    height: 5px;
    border-radius: 2px;
    background-color: rgb(226, 226, 226);
    animation: bounce 3s ease-in-out infinite;
    transform-origin: bottom;
}

.paused .bar {
    animation-play-state: paused;
}

/* Different bars get different timings */
.bar:nth-child(1) {
    animation-delay: 0s;
}

.bar:nth-child(2) {
    animation-delay: 0.3s;
}

.bar:nth-child(3) {
    animation-delay: 0.6s;
}

.bar:nth-child(4) {
    animation-delay: 0.9s;
}

.bar:nth-child(5) {
    animation-delay: 1.2s;
}

.bar:nth-child(6) {
    animation-delay: 1.5s;
}

.bar:nth-child(7) {
    animation-delay: 1.8s;
}

.bar:nth-child(8) {
    animation-delay: 2.1s;
}

.bar:nth-child(9) {
    animation-delay: 2.4s;
}

.bar:nth-child(10) {
    animation-delay: 2.7s;
}

.bar:nth-child(11) {
    animation-delay: 3.0s;
}

.bar:nth-child(12) {
    animation-delay: 3.3s;
}

.bar:nth-child(13) {
    animation-delay: 3.6s;
}

.bar:nth-child(14) {
    animation-delay: 3.9s;
}

.bar:nth-child(15) {
    animation-delay: 4.2s;
}

.bar:nth-child(16) {
    animation-delay: 4.5s;
}

@keyframes bounce {

    0%,
    100% {
        height: 5px;
    }

    50% {
        height: 40px;
    }
}