html, body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

#version {
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.8rem;
    font-family: monospace;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 1002 !important;
}

#solarSystemCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    touch-action: none;
}

#speedControls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px;
    border-radius: 10px;
    z-index: 1000;
    width: auto;
    text-align: center;
    min-width: 120px;
}

.control-group {
    margin-bottom: 10px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9rem;
}

/* Show only mobile slider on mobile */
.desktop-slider {
    display: none !important;
}

.mobile-slider {
    width: 120px;
    height: 40px;
    margin: 10px auto;
    display: block;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    touch-action: manipulation;
}

.mobile-slider::-webkit-slider-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.mobile-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: -10px;
}

.mobile-slider::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    border: none;
}

.mobile-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#speedDisplay {
    font-weight: bold;
    color: #87ceeb;
    font-size: 0.9rem;
    margin-top: 5px;
}

#mainControls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1000;
    flex-wrap: wrap;
    justify-content: center;
}

#mainControls button {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: 80px;
    touch-action: manipulation;
}

#mainControls button:hover,
#mainControls button:active {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

#recenterControls {
    position: fixed;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: none; /* Hidden by default */
}

#recenterButton {
    background: rgba(255, 69, 0, 0.9);
    color: white;
    border: 1px solid rgba(255, 69, 0, 1);
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(255, 69, 0, 0.3);
    touch-action: manipulation;
}

#recenterButton:hover,
#recenterButton:active {
    background: rgba(255, 69, 0, 1);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.5);
}

#planetInfo {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    max-height: 40vh;
    overflow-y: auto;
}

#infoHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    touch-action: manipulation;
}

#infoHeader h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
}

#toggleInfoPanel {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    color: #ffd700;
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

#toggleInfoPanel:hover,
#toggleInfoPanel:active {
    background: rgba(255, 215, 0, 0.3);
}

#toggleInfoPanel.collapsed {
    background: rgba(255, 215, 0, 0.1);
}

#infoContent {
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

#infoContent.collapsed {
    max-height: 0;
    padding: 0 20px;
}

#infoContent p {
    margin: 10px 0;
    font-size: 1rem;
    line-height: 1.5;
}

#infoActions {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none; /* Hidden until a celestial body is selected */
}

#followPlanet {
    width: 100%;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

#followPlanet:hover,
#followPlanet:active {
    background: rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

#followPlanet:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hamburger Menu Styles */
.hamburger-btn {
    position: fixed;
    top: 60px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    backdrop-filter: blur(10px);
    touch-action: manipulation;
}

.hamburger-btn span {
    display: block;
    width: 70%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#planetLegend {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.9) !important;
    padding: 20px !important;
    padding-top: 80px !important;
    transition: transform 0.3s ease !important;
    z-index: 1000 !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    backdrop-filter: blur(15px) !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

#planetLegend.active {
    transform: translateX(0) !important;
}

.legend-header {
    color: #ffd700;
    font-weight: bold;
    margin: 20px 0 20px 0;
    text-align: center;
    font-size: 1.2rem;
    padding-top: 20px;
}

.planet-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.planet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
    touch-action: manipulation;
}

.planet-item:hover,
.planet-item:active {
    background: rgba(255, 255, 255, 0.2);
}

.planet-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* Planet colors */
.planet-color.mercury { background: #8c7853; }
.planet-color.venus { background: #ffc649; }
.planet-color.earth { background: #6b93d6; }
.planet-color.mars { background: #c1440e; }
.planet-color.jupiter { background: #d8ca9d; }
.planet-color.saturn { background: #fad5a5; }
.planet-color.uranus { background: #4fd0e3; }
.planet-color.neptune { background: #4b70dd; }
.planet-color.pluto { background: #906058; }

/* Landscape orientation adjustments */
@media (orientation: landscape) {
    #speedControls {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px;
        min-width: 100px;
    }
    
    #planetInfo {
        bottom: 60px;
        left: 15px;
        right: 15px;
        max-height: 35vh;
    }
    
    #mainControls {
        bottom: 15px;
        gap: 10px;
    }
    
    #mainControls button {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 70px;
    }
    
    .hamburger-btn {
        top: 50px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
    
    #planetLegend {
        width: 260px !important;
        padding: 15px !important;
        padding-top: 70px !important;
    }
    
    .legend-header {
        font-size: 1.1rem;
        margin: 15px 0 15px 0;
        padding-top: 15px;
    }
    
    .planet-item {
        padding: 10px 12px;
        font-size: 0.9rem;
        gap: 10px;
    }
}

/* Very small screens */
@media (orientation: landscape) and (max-height: 400px) {
    #speedControls {
        top: 5px;
        right: 5px;
        padding: 8px;
        min-width: 80px;
    }
    
    #planetInfo {
        bottom: 50px;
        left: 10px;
        right: 10px;
        max-height: 30vh;
    }
    
    #mainControls button {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 60px;
    }
    
    #planetLegend {
        max-width: 140px;
        max-height: 40vh;
    }
}

/* Paused animation */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.paused {
    animation: pulse 2s infinite;
}

/* Custom scrollbar for mobile */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
} 