* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 30% 40%, #0b0d2e, #010003);
    font-family: 'Quicksand', sans-serif;
    color: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* star field animation */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><radialGradient id="glow" cx="30%" cy="40%" r="70%"><stop offset="0%" stop-color="%23ffffff10"/><stop offset="100%" stop-color="%2300000000"/></radialGradient></defs><rect width="100%" height="100%" fill="url(%23glow)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: transparent;
    animation: twinkle 4s infinite alternate;
}

.stars span {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 12px cyan;
    opacity: 0.6;
}

@keyframes twinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* main glass panel */
.container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    width: 100%;
    background: rgba(10, 15, 30, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(100, 200, 255, 0.2);
    border-radius: 3rem 3rem 2rem 2rem;
    padding: 2.2rem 2rem;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(0, 255, 255, 0.1) inset, 0 0 30px #00aaff40;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 6vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 5px;
    text-align: center;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #a8ede0, #fed6e3, #a1c4fd, #c2e9fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 15px cyan);
}

.subhead {
    text-align: center;
    font-weight: 300;
    letter-spacing: 3px;
    color: #bbddff;
    margin-bottom: 2.5rem;
    border-bottom: 1px dashed #3f638b;
    padding-bottom: 0.8rem;
    font-size: 1rem;
}

/* input area — futuristic pod */
.input-pod {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    background: rgba(0, 10, 25, 0.7);
    border-radius: 60px;
    padding: 1rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid #1d5b8e;
    box-shadow: 0 0 20px #0077ff66, inset 0 1px 3px #ffffff30;
}

.input-pod label {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: #a0d0ff;
    text-shadow: 0 0 5px blue;
}

.input-pod input {
    background: #021a2b;
    border: 2px solid #00d0ff;
    border-radius: 40px;
    padding: 0.9rem 1.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    width: 200px;
    text-align: center;
    color: #c4f0ff;
    font-family: 'Orbitron', monospace;
    outline: none;
    box-shadow: 0 0 20px #00ddff, inset 0 0 8px #0044ff;
    transition: all 0.2s;
}

.input-pod input:focus {
    border-color: white;
    box-shadow: 0 0 35px cyan, inset 0 0 10px blue;
    transform: scale(1.02);
}

.input-pod span {
    font-size: 1.3rem;
    font-weight: 300;
    color: #b0e0ff;
}

/* planet grid — fully responsive */
.planet-fleet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.4rem;
    margin: 2.5rem 0 2rem;
}

.planet-card {
    background: rgba(0, 20, 40, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 40px;
    padding: 1.2rem 0.5rem 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
}

.planet-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    transition: 0.4s;
}

.planet-card:hover::before {
    left: 100%;
}

.planet-card:hover {
    border-color: #6effff;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 30px #00ddff, 0 10px 25px black;
}

.planet-card.active {
    border: 3px solid #fff;
    box-shadow: 0 0 40px #0ff, 0 0 60px #2a6fdb;
    background: rgba(0, 40, 70, 0.9);
}

/* planet orb */
.planet-orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 5px auto;
    box-shadow: 0 0 30px currentColor, inset -5px -10px 10px rgba(0,0,0,0.6);
    transition: 0.2s;
    position: relative;
}

/* saturn ring simulation */
.planet-card[data-ring="true"] .planet-orb::after {
    content: "";
    position: absolute;
    top: 25%;
    left: -10%;
    width: 120%;
    height: 40%;
    border-radius: 50%;
    background: rgba(220, 200, 140, 0.4);
    transform: rotate(5deg);
    border: 2px solid #b5905d;
    box-shadow: 0 0 20px gold;
}

.planet-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #d4f2ff;
    text-shadow: 0 0 8px blue;
}

.gravity-badge {
    font-size: 0.7rem;
    background: #0a253b;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    border: 1px solid cyan;
    color: #abdbff;
}

/* result console */
.result-console {
    background: #030c17b0;
    border: 2px solid #00d9ff80;
    border-radius: 50px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px #00b3ff, inset 0 0 10px #004488;
}

.result-console p {
    font-size: clamp(1.4rem, 5vw, 2.6rem);
    font-family: 'Orbitron', monospace;
    font-weight: 500;
}

.result-console span {
    font-weight: 900;
    color: #feffb0;
    text-shadow: 0 0 15px yellow, 0 0 30px orange;
    background: linear-gradient(45deg, gold, cyan);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-unit {
    font-size: 1.2rem;
    margin-left: 0.3rem;
    color: #8cbaff;
}

.footnote {
    text-align: right;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 1rem;
    letter-spacing: 1px;
    border-top: 1px dashed #304a70;
    padding-top: 0.8rem;
}

@media (max-width: 550px) {
    .container { padding: 1.2rem; }
    .planet-fleet { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .input-pod { flex-direction: column; border-radius: 40px; }
    .planet-orb { width: 60px; height: 60px; }
}