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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    overflow: hidden;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #00f5ff;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 245, 255, 0.3);
    border-top: 4px solid #00f5ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    color: #b8b8ff;
    font-size: 1.1rem;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 24px;
    color: #00d4ff;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

header p {
    font-size: 14px;
    color: #cccccc;
}

.system-selector {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-selector label {
    color: #cccccc;
    font-size: 12px;
}

.system-selector select {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    min-width: 180px;
}

.system-selector select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.system-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    font-size: 11px;
}

.system-info.hidden {
    display: none;
}

.system-info p {
    margin: 2px 0;
    color: #cccccc;
}

.system-info strong {
    color: #00d4ff;
}

#scene-container {
    width: 100%;
    height: 100%;
}

.info-panel {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    padding: 25px;
    min-width: 300px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 200;
}

.info-panel.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(100%);
    pointer-events: none;
}

.info-content {
    position: relative;
}

.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.info-panel h2 {
    color: #00d4ff;
    font-size: 22px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.planet-details {
    space-y: 10px;
}

.planet-details p {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
}

.planet-details strong {
    color: #00d4ff;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.planet-details span {
    color: #ffffff;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #cccccc;
    max-width: 400px;
}

.add-planet-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.add-planet-btn:hover {
    background: linear-gradient(45deg, #0099cc, #007aa3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.add-planet-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.comparison-btn, .zone-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
    display: inline-block;
}

.zone-btn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    box-shadow: 0 3px 10px rgba(46, 204, 113, 0.3);
}

.comparison-btn:hover {
    background: linear-gradient(45deg, #ee5a24, #c44569);
    transform: translateY(-2px);
}

.zone-btn:hover {
    background: linear-gradient(45deg, #27ae60, #229954);
    transform: translateY(-2px);
}

.comparison-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff6b6b;
    border-radius: 15px;
    padding: 25px;
    min-width: 350px;
    max-width: 500px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
}

.comparison-panel.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.comparison-panel h2 {
    color: #ff6b6b;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

#comparison-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.planet-comparison-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.planet-comparison-item h4 {
    color: #ff6b6b;
    font-size: 12px;
    margin-bottom: 8px;
}

.planet-comparison-item .size-indicator {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.planet-comparison-item .size-circle {
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.planet-comparison-item .size-text {
    color: white;
    font-size: 10px;
}

.timeline-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
}

.timeline-btn:hover {
    background: linear-gradient(45deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
}

.reset-view-btn {
    background: linear-gradient(45deg, #34495e, #2c3e50);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 73, 94, 0.3);
    display: inline-block;
}

.reset-view-btn.hidden {
    display: none;
}

.reset-view-btn:hover {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 73, 94, 0.4);
}

.education-btn {
    background: linear-gradient(45deg, #e67e22, #d35400);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.3);
    display: inline-block;
}

.education-btn:hover {
    background: linear-gradient(45deg, #d35400, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.filter-controls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-controls label {
    color: #cccccc;
    font-size: 12px;
    min-width: 60px;
}

.filter-controls select {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 11px;
    flex: 1;
}

.timeline-panel {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #9b59b6;
    border-radius: 15px;
    padding: 25px;
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
    transition: all 0.3s ease;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
}

.timeline-panel.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(-100%);
    pointer-events: none;
}

.timeline-panel h2 {
    color: #9b59b6;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #9b59b6;
}

.timeline-year {
    color: #9b59b6;
    font-weight: bold;
    font-size: 14px;
    min-width: 50px;
    margin-right: 10px;
}

.timeline-planet {
    color: white;
    font-size: 12px;
}

.timeline-planet .planet-name {
    font-weight: bold;
    color: #00d4ff;
}

.navigation-hint {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.navigation-hint p {
    color: #cccccc;
    font-size: 12px;
    font-style: italic;
    margin: 0;
}

.mission-details, .transit-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mission-details h3, .transit-details h3 {
    color: #00d4ff;
    font-size: 14px;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.education-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.education-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.education-content {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #e67e22;
    border-radius: 15px;
    position: relative;
}

.education-content h2 {
    color: #e67e22;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(230, 126, 34, 0.5);
}

.education-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(230, 126, 34, 0.2);
    color: #e67e22;
    border: 1px solid #e67e22;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.tab-btn.active, .tab-btn:hover {
    background: #e67e22;
    color: white;
}

#education-content {
    color: white;
    line-height: 1.6;
}

#education-content h3 {
    color: #e67e22;
    margin-top: 20px;
    margin-bottom: 10px;
}

#education-content ul {
    padding-left: 20px;
}

#education-content .quiz-question {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
}

#education-content .quiz-option {
    background: rgba(230, 126, 34, 0.2);
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#education-content .quiz-option:hover {
    background: rgba(230, 126, 34, 0.4);
}

#education-content .quiz-option.correct {
    background: rgba(46, 204, 113, 0.4);
}

#education-content .quiz-option.incorrect {
    background: rgba(231, 76, 60, 0.4);
}

/* Loading animation */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00d4ff;
    font-size: 18px;
    z-index: 1000;
}

/* Glowing effects */
.glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        top: 10px;
        left: 10px;
        padding: 15px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .info-panel {
        right: 10px;
        min-width: 250px;
        padding: 20px;
    }
    
    .controls {
        bottom: 10px;
        left: 10px;
        padding: 10px;
        font-size: 12px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .info-panel {
        top: 20px;
        right: 10px;
        left: 10px;
        transform: none;
        min-width: auto;
    }
    
    .info-panel.hidden {
        transform: translateY(-100%);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}