@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&family=Poetsen+One&display=swap');

:root {
    --txt-color: #fff;
    --title-color: #f9f5ed;
    --menu-color: #080816f7;
    --font: "Comfortaa", sans-serif, arial;
    --title-font: "Poetsen One", sans-serif;

    /* Tamanhos dos corpos celestes */
    --sun-size: 75vmin;
    --planet-distance: 6vmin;
    --mercury-size: 8vmin;
    --venus-size: 12vmin;
    --earth-size: 15vmin;
    --mars-size: 14vmin;
    --jupiter-size: 22vmin;
    --saturn-size: 22vmin;
    --uranus-size: 16vmin;
    --neptune-size: 15vmin;
}

.sun,
.planet {
    will-change: transform, filter;
    backface-visibility: hidden;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Layout e Display */
.solar-display {
    background-image: url('../images/background.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top;
    overflow-x: auto;
    background-color: rgba(30, 13, 48, 0.192);
}

.solar-display h1 {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    font-weight: 900;
    text-shadow: 1px 2px 1px #272727;
    background-color: #1E0D30;
    color: var(--title-color);
    font-family: var(--title-font);
}

.solar-system {
    position: relative;
    height: 99vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    overflow-x: visible;
}

.sun-wrapper {
    margin-left: -10%;
    margin-right: -120px;
    transform: translateX(-30%);
}

.sun {
    width: var(--sun-size);
    height: var(--sun-size);
    filter: drop-shadow(0 0 15px #ffc06780);
    min-width: 200px;
    min-height: 200px;
}

.planets-container {
    display: flex;
    gap: var(--planet-distance);
    align-items: center;
    flex-wrap: nowrap;
}

.break {
    display: none;
}

/* Tamanhos e posições dos planetas */
.mercury {
    width: var(--mercury-size);
    height: var(--mercury-size);
    top: 60px;
}

.venus {
    width: var(--venus-size);
    height: var(--venus-size);
    top: 50px;
}

.earth {
    width: var(--earth-size);
    height: var(--earth-size);
}

.mars {
    width: var(--mars-size);
    height: var(--mars-size);
    top: 55px;
}

.jupiter {
    width: var(--jupiter-size);
    height: var(--jupiter-size);
}

.saturn {
    width: var(--saturn-size);
    top: 50px;
}

.uranus {
    width: 9vmin;
    height: 9vmin;
}

.neptune {
    width: 8vmin;
    height: 8vmin;
}

/* Specific components */
.earth-with-rocket {
    position: relative;
    display: inline-block;
}

.earth-with-rocket .rocket-icon {
    width: 10vmin;
    height: 10vmin;
    bottom: 150%;
    left: -20%;
    transform: translateX(-50%) rotate(-60deg);
    position: absolute;
}

#info-panel {
    max-width: 300px;
    padding: 15px;
    border-radius: 8px;
    position: absolute;
    left: 20px;
    bottom: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-family: var(--font);
    color: #fff;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

#info-panel p {
    padding-top: 10px;
}

#planet-name {
    color: #9995f7;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(156, 156, 255, 0.463)
}

.planet:hover ~ #info-panel {
    opacity: 1;
}

/* Menu */
.menu {
    height: 100vh;
    width: 100%;
    background-color: var(--menu-color);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    overflow-y: hidden;
}

.menu .close-menu {
    align-self: start;
}

.menu h2 {
    padding: 20px;
    text-align: right;
    padding-right: 15px;
    font-size: 45px;
    color: #dbdada;
    font-weight: 200;
}

/* details */
.details-panel {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: auto;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    color: var(--txt-color);
    font-family: var(--font);
    justify-content: center;
    align-items: center;
}

.planet-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.planet-content .planet-image {
    max-width: 80%;
    height: auto;
    border-radius: 50%; 
    box-shadow: none;
    margin-bottom: 15px;
    width: 250px;
    min-width: 150px;
    object-fit: contain;
}

.planet-text-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.planet-content h3 {
    font-size: 2.5em;
    color: #8cdeff;
    text-align: center;
    margin-bottom: 9px;
    text-shadow: 0 2 8px rgba(140, 222, 255, 0.5);
    font-family: var(--title-font);
}

.planet-content p {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 900px;
    margin: 10px;
    max-width: 100%;
    text-align: center;
}

.planet-stats-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    max-width: fit-content; 
}

.planet-stat-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: 1em;
}

.planet-stat-item span:first-child {
    font-weight: bold;
    color: #c7d2e0;
    margin-bottom: 5px;
}

/* Btns */
.menu-button {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
}

.btn-menu p {
    cursor: pointer;
    padding: 15px;
    background-color: #000000;
    border: none;
}

.close-menu {
    cursor: pointer;
    display: none;
    width: 130px;
    padding: 20px;
    margin: 5px;
    background-color: #00000087;
    color: white;
    border-radius: 5px;
    border: none;
}

/* Footer */
.page-footer {
    background-color: #000000;
    color: var(--txt-color);
    font-family: var(--font);
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    padding: 10px 0px 13px 10px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #261534;
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background-color: #000000;
}

/* Images */
img {
    -webkit-user-drag: none;
}

/* Animations */
.sun-wrapper .sun:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px #ff6b00cc) !important;
}

.planet:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.347));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.rocket-icon:hover {
    filter: drop-shadow(0 0 10px #00ffff22);
    transition: transform 0.3s ease, filter 0.3s ease;
}

@keyframes spin-normal {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.solar-display:hover .spin-normal {
    animation: spin-normal 10s linear infinite;
}

.solar-display:hover .spin-reverse {
    animation: spin-reverse 10s linear infinite;
}

/* Media Queries */
@media (max-width: 700px) {
    .solar-system {
        height: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        padding: 20px;
    }

    .sun-wrapper {
        position: relative;
        width: 55vmin;
        height: 55vmin;
        margin-right: 10px;
    }

    .sun {
        width: 100%;
        height: 100%;
    }

    .planet {
        position: relative;
        margin: 10px;
        flex-shrink: 0;
    }

    .planets-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 20px;
    }

    .break {
        display: block;
        flex-basis: 10%;
    }

    .earth-with-rocket .rocket-icon {
        display: none;
    }

    .mercury {
        top: 0;
        left: 0;
    }

    .venus {
        top: 0;
        left: 10px;
    }

    .earth {
        top: -12px;
        left: 5px;
    }

    .mars {
        top: 10px;
        left: 15px;
    }

    .jupiter {
        top: -5px;
        left: 40px;
    }

    .saturn {
        top: 12px;
        left: 20px;
    }

    .uranus {
        top: 45px;
        left: 22px;
    }

    .neptune {
        top: -2px;
        left: 30px;
    }

    #info-panel {
        position: static;
        margin: 0px auto;
        width: 90%;
    }
}

@media (hover: none) {
    .solar-display {
        perspective: 1000px;
    }

    .sun-wrapper,
    .planets-container {
        transform-style: preserve-3d;
        transition: transform 0.1s;
    }
}