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

body, html {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: #020617;
    font-family: 'Segoe UI', sans-serif;
    color: white;
}

.main-viewport {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: radial-gradient(circle at center, #1e1b4b 0%, #020617 100%);
}

header { flex: 0 0 auto; text-align: center; padding: 10px 0; }
header h1 { font-size: 1.4rem; color: #38bdf8; }

.grid-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    padding: 10px;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

.planet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
}

.planet-circle {
    border-radius: 50%;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.planet-card:active .planet-circle { transform: scale(1.2); }

.planet-label { font-size: 0.7rem; font-weight: bold; text-transform: uppercase; }

#info-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    border-top: 2px solid #38bdf8;
    padding: 20px;
    z-index: 100;
    transition: transform 0.3s ease-out;
}

#info-panel.hidden { transform: translateY(100%); }

#close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.description {
    font-style: italic;
    color: #94a3b8;
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.stats { display: flex; justify-content: space-between; font-size: 0.8rem; }

.progress-bar {
    width: 100%;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    margin-top: 10px;
}

#viability-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }