/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: #0a0e17;
    color: #e0f7ff;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(28, 58, 173, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 20%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 20px 0 30px;
    background: linear-gradient(to right, rgba(16, 36, 64, 0.9), rgba(10, 25, 47, 0.9));
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(64, 156, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 20, 40, 0.5);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    background: linear-gradient(90deg, #40c9ff, #e81cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(64, 156, 255, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #88d3ff;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Main Layout */
main {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1100px) {
    main {
        flex-direction: column;
    }
}

/* Simulation Area */
.simulation-area {
    flex: 3;
    background: rgba(13, 22, 41, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(64, 156, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 15, 30, 0.6);
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(64, 156, 255, 0.2);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    background: rgba(25, 45, 80, 0.8);
    border: 1px solid rgba(64, 156, 255, 0.3);
    color: #b3e0ff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: rgba(40, 80, 140, 0.8);
    border-color: #40c9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 156, 255, 0.3);
}

.btn.active {
    background: linear-gradient(90deg, #40c9ff, #3a7bd5);
    color: #0a0e17;
    border-color: #40c9ff;
    box-shadow: 0 0 15px rgba(64, 201, 255, 0.5);
}

#speedControl {
    width: 150px;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #1a3c6e, #40c9ff);
    border-radius: 4px;
    outline: none;
}

#speedControl::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #40c9ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(64, 201, 255, 0.8);
}

#speedValue {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #40c9ff;
}

/* Solar System Container */
.solar-system-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    background: rgba(5, 10, 20, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(64, 156, 255, 0.1);
    margin-bottom: 20px;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #eee, transparent),
        radial-gradient(1px 1px at 40px 70px, #fff, transparent),
        radial-gradient(2px 2px at 90px 40px, #ddd, transparent),
        radial-gradient(1px 1px at 150px 90px, #fff, transparent),
        radial-gradient(2px 2px at 180px 130px, #eee, transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
    z-index: 0;
}

.solar-system {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(20deg);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sun */
.sun {
    position: absolute;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #ffdd00, #ff6600, #ff3300);
    border-radius: 50%;
    box-shadow: 
        0 0 60px #ff9900,
        0 0 120px #ff6600,
        inset 0 0 20px rgba(255, 255, 200, 0.5);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 10;
}

.sun:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 
        0 0 80px #ff9900,
        0 0 160px #ff6600,
        inset 0 0 30px rgba(255, 255, 200, 0.8);
}

/* Orbits */
.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform-style: preserve-3d;
}

/* Planets */
.planet {
    position: absolute;
    border-radius: 50%;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: all 0.3s ease;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.planet:hover {
    transform: translateX(-50%) scale(1.5);
    z-index: 5;
}

.planet.selected {
    transform: translateX(-50%) scale(1.8);
    z-index: 20;
    box-shadow: 0 0 30px currentColor;
}

/* Planet Specific Styles */
.mercury { background: radial-gradient(circle at 30% 30%, #a9a9a9, #5a5a5a); }
.venus { background: radial-gradient(circle at 30% 30%, #ffcc99, #cc9966, #996633); }
.earth { background: radial-gradient(circle at 30% 30%, #6b93d6, #2e5aa7, #1e3a8a); }
.mars { background: radial-gradient(circle at 30% 30%, #ff7b7b, #cc3a3a, #8b0000); }
.jupiter { background: radial-gradient(circle at 30% 30%, #ffcc99, #cc9966, #996633); }
.saturn { background: radial-gradient(circle at 30% 30%, #fad5a5, #e6b87c, #b0894e); }
.uranus { background: radial-gradient(circle at 30% 30%, #99e6ff, #66c2ff, #3399ff); }
.neptune { background: radial-gradient(circle at 30% 30%, #4d94ff, #0066cc, #004d99); }

/* Saturn's Rings */
.rings {
    position: absolute;
    width: 160%;
    height: 12px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(210, 180, 140, 0.9) 10%, 
        rgba(210, 180, 140, 0.9) 90%, 
        transparent 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    pointer-events: none;
}

/* Planet Labels */
.planet-label {
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.planet-label.visible {
    opacity: 1;
}

/* Instructions */
.instructions {
    display: flex;
    justify-content: space-around;
    background: rgba(20, 35, 60, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(64, 156, 255, 0.2);
    font-size: 0.95rem;
}

.instructions p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #88d3ff;
}

/* Info Panel */
.info-panel {
    flex: 1;
    min-width: 300px;
    background: rgba(13, 22, 41, 0.9);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(64, 156, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 15, 30, 0.6);
    backdrop-filter: blur(10px);
}

.panel-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(64, 156, 255, 0.3);
}

#selectedObject {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #40c9ff;
    margin-bottom: 5px;
}

#objectType {
    color: #88d3ff;
    font-size: 1.1rem;
    font-weight: 300;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.object-visual {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(20, 35, 60, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.object-icon {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-icon {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ffdd00, #ff6600);
    border-radius: 50%;
    box-shadow: 0 0 40px #ff9900;
}

.object-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(30, 50, 90, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.stat-label {
    font-size: 0.9rem;
    color: #88d3ff;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #40c9ff;
}

.object-description {
    line-height: 1.7;
    color: #c2e5ff;
    background: rgba(20, 35, 60, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.object-details {
    background: rgba(20, 35, 60, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.object-details h3 {
    color: #40c9ff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.fact {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(30, 50, 90, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.fact-label {
    font-size: 0.85rem;
    color: #88d3ff;
    margin-bottom: 5px;
}

.fact-value {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #88d3ff;
    background: rgba(13, 22, 41, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(64, 156, 255, 0.1);
    font-size: 0.9rem;
}

.copyright {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #66a3cc;
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor; }
    100% { box-shadow: 0 0 5px currentColor; }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .solar-system-wrapper {
        height: 400px;
    }
    
    .facts-grid,
    .object-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .solar-system-wrapper {
        height: 350px;
    }
    
    .facts-grid,
    .object-stats {
        grid-template-columns: 1fr;
    }
}