* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: black;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.solar-system {
    position: relative;
    width: 700px;
    height: 700px;
}

.sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 0 0 60px #ff4500;
    z-index: 10;
    overflow: hidden;
}

.sun img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}


.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.rotator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin linear infinite;
}

.planet {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


.mercurio {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/4a/Mercury_in_true_color.jpg');
}

.venus {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/e/e5/Venus-real_color.jpg');
}

.terra {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg');
}

.marte {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/0/02/OSIRIS_Mars_true_color.jpg');
}

.jupiter {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/e/e2/Jupiter.jpg');
}

.saturno {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/c/c7/Saturn_during_Equinox.jpg');
}

.urano {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/3/3d/Uranus2.jpg');
}

.netuno {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/5/56/Neptune_Full.jpg');
}


.planet.mercurio {
    width: 8px;
    height: 8px;
}

.planet.venus {
    width: 10px;
    height: 10px;
}

.planet.terra {
    width: 12px;
    height: 12px;
}

.planet.marte {
    width: 10px;
    height: 10px;
}

.planet.jupiter {
    width: 24px;
    height: 24px;
}

.planet.saturno {
    width: 20px;
    height: 20px;
}

.planet.urano {
    width: 18px;
    height: 18px;
}

.planet.netuno {
    width: 18px;
    height: 18px;
}


.info-panel {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    font-family: Arial, sans-serif;
}

.info-card {
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    width: 140px;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    position: relative;
    cursor: pointer;
}

.info-card::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 130%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--tooltip-color, #fff);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 30;
    line-height: 1.4;
}

.info-card:hover::after {
    opacity: 1;
}

.info-card.sol {
    background: #f7b500;
    --tooltip-color: #f7b500;
}

.info-card.mercurio {
    background: #5a6c8c;
    --tooltip-color: #5a6c8c;
}

.info-card.venus {
    background: #c8917c;
    --tooltip-color: #c8917c;
}

.info-card.terra {
    background: #547da6;
    --tooltip-color: #547da6;
}

.info-card.marte {
    background: #e1523d;
    --tooltip-color: #e1523d;
}

.info-card.jupiter {
    background: #a29683;
    --tooltip-color: #a29683;
}

.info-card.saturno {
    background: #7c6175;
    --tooltip-color: #7c6175;
}

.info-card.urano {
    background: #7cc6c8;
    --tooltip-color: #7cc6c8;
}

.info-card.netuno {
    background: #224fdd;
    --tooltip-color: #224fdd;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1200px) {
    .solar-system {
        width: 600px;
        height: 600px;
    }
    
    .sun {
        width: 80px;
        height: 80px;
    }
    
    /* Ajuste proporcional das órbitas */
    .orbit:nth-child(2) { width: 100px; height: 100px; }
    .orbit:nth-child(3) { width: 140px; height: 140px; }
    .orbit:nth-child(4) { width: 180px; height: 180px; }
    .orbit:nth-child(5) { width: 220px; height: 220px; }
    .orbit:nth-child(6) { width: 280px; height: 280px; }
    .orbit:nth-child(7) { width: 340px; height: 340px; }
    .orbit:nth-child(8) { width: 400px; height: 400px; }
    .orbit:nth-child(9) { width: 460px; height: 460px; }
    
    .info-panel {
        right: 20px;
    }
}

@media (max-width: 992px) {
    .solar-system {
        width: 500px;
        height: 500px;
    }
    
    .sun {
        width: 70px;
        height: 70px;
    }
    
    /* Ajuste proporcional das órbitas */
    .orbit:nth-child(2) { width: 90px; height: 90px; }
    .orbit:nth-child(3) { width: 120px; height: 120px; }
    .orbit:nth-child(4) { width: 150px; height: 150px; }
    .orbit:nth-child(5) { width: 200px; height: 200px; }
    .orbit:nth-child(6) { width: 250px; height: 250px; }
    .orbit:nth-child(7) { width: 300px; height: 300px; }
    .orbit:nth-child(8) { width: 350px; height: 350px; }
    .orbit:nth-child(9) { width: 400px; height: 400px; }
    
    .info-panel {
        right: 15px;
    }
    
    .info-card {
        width: 120px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }
    
    .solar-system {
        width: 400px;
        height: 400px;
        margin-bottom: 30px;
    }
    
    .sun {
        width: 60px;
        height: 60px;
    }
    
    /* Ajuste proporcional das órbitas */
    .orbit:nth-child(2) { width: 80px; height: 80px; }
    .orbit:nth-child(3) { width: 100px; height: 100px; }
    .orbit:nth-child(4) { width: 130px; height: 130px; }
    .orbit:nth-child(5) { width: 170px; height: 170px; }
    .orbit:nth-child(6) { width: 210px; height: 210px; }
    .orbit:nth-child(7) { width: 250px; height: 250px; }
    .orbit:nth-child(8) { width: 290px; height: 290px; }
    .orbit:nth-child(9) { width: 330px; height: 330px; }
    
    .info-panel {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        gap: 10px;
    }
    
    .info-card {
        width: calc(50% - 20px);
        margin-bottom: 10px;
    }
    
    .info-card::after {
        right: auto;
        left: 50%;
        top: 100%;
        transform: translateX(-50%);
        width: 180px;
    }
}

@media (max-width: 480px) {
    .solar-system {
        width: 300px;
        height: 300px;
    }
    
    .sun {
        width: 50px;
        height: 50px;
    }
    
    /* Ajuste proporcional das órbitas */
    .orbit:nth-child(2) { width: 70px; height: 70px; }
    .orbit:nth-child(3) { width: 90px; height: 90px; }
    .orbit:nth-child(4) { width: 110px; height: 110px; }
    .orbit:nth-child(5) { width: 140px; height: 140px; }
    .orbit:nth-child(6) { width: 170px; height: 170px; }
    .orbit:nth-child(7) { width: 200px; height: 200px; }
    .orbit:nth-child(8) { width: 230px; height: 230px; }
    .orbit:nth-child(9) { width: 260px; height: 260px; }
    
    .planet.mercurio { width: 6px; height: 6px; }
    .planet.venus { width: 8px; height: 8px; }
    .planet.terra { width: 10px; height: 10px; }
    .planet.marte { width: 8px; height: 8px; }
    .planet.jupiter { width: 18px; height: 18px; }
    .planet.saturno { width: 16px; height: 16px; }
    .planet.urano { width: 14px; height: 14px; }
    .planet.netuno { width: 14px; height: 14px; }
    
    .info-card {
        width: calc(50% - 10px);
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .info-card::after {
        width: 150px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .orbit {
        border: none;
    }
}

/* ========== CORREÇÕES ESPECÍFICAS ========== */
@media (max-width: 992px) {
    body {
        padding: 20px;
        overflow: auto; /* Permite rolagem se necessário */
    }
    
    .solar-system {
        transform: scale(0.8); /* Reduz proporcionalmente todo o sistema */
        transform-origin: center;
        margin: 0 auto;
    }
    
    .info-panel {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        right: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 90%;
        max-width: 500px;
        background-color: rgba(0, 0, 0, 0.7);
        padding: 10px;
        border-radius: 10px;
        z-index: 100;
    }
    
    .info-card {
        width: calc(33.333% - 10px);
        margin: 5px;
        font-size: 0.8rem;
        padding: 8px 5px;
    }
    
    .info-card::after {
        left: 50%;
        top: auto;
        bottom: 100%;
        transform: translateX(-50%);
        width: 180px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .solar-system {
        transform: scale(0.7);
    }
    
    .info-card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .solar-system {
        transform: scale(0.6);
    }
    
    .info-card {
        width: calc(50% - 5px);
        font-size: 0.7rem;
        padding: 5px 3px;
    }
    
    .info-card::after {
        width: 150px;
    }
}

/* Garante que o sistema solar nunca ultrapasse a tela */
.solar-system {
    max-width: 100vw;
    max-height: 100vh;
    overflow: visible;
}