/* Main styles for Interactive Star Map */

body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: 'Courier New', monospace;
    color: #fff;
    overflow: hidden;
}

#starCanvas {
    display: block;
    cursor: crosshair;
}

.controls {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
    max-width: 250px;
    z-index: 100;
}

.time-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    z-index: 100;
}

.manual-controls, .playback-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.playback-controls {
    border-top: 1px solid #444;
    padding-top: 10px;
}

#timeAcceleration {
    color: #88ff88;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

button {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

button:hover {
    background: #333;
}

button:active {
    background: #555;
}

button:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

input[type="date"], input[type="time"], input[type="text"] {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    padding: 5px;
    border-radius: 3px;
    font-family: inherit;
}

input[type="text"] {
    width: 100%;
    margin-bottom: 5px;
}

.info-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
    max-width: 250px;
    z-index: 100;
}

.legend {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
    z-index: 100;
}

.star-brightness {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0;
}

.star-sample {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* Search results styling */
#searchResults {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 3px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    margin-top: 5px;
}

.search-result-item {
    padding: 5px;
    cursor: pointer;
    border-radius: 2px;
    margin: 2px 0;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-result-item.selected {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .controls {
        top: 5px;
        left: 5px;
        right: 5px;
        max-width: none;
        padding: 10px;
    }
    
    .info-panel {
        top: auto;
        bottom: 120px;
        right: 5px;
        left: 5px;
        max-width: none;
    }
    
    .legend {
        bottom: 5px;
        right: 5px;
        left: 5px;
        max-width: none;
    }
    
    .time-controls {
        bottom: 5px;
        left: 5px;
        right: 5px;
        transform: none;
        padding: 10px;
    }
    
    .manual-controls, .playback-controls {
        flex-direction: column;
        gap: 5px;
    }
    
    button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Performance indicator */
#performanceInfo {
    font-size: 10px;
    color: #888;
    margin-top: 10px;
    font-family: monospace;
}

/* Loading states */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Smooth transitions */
* {
    transition: opacity 0.3s ease;
}

/* Accessibility improvements */
button:focus, input:focus, select:focus {
    outline: 2px solid #4A9EFF;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .controls, .info-panel, .legend, .time-controls {
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid #fff;
    }
    
    button {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none;
    }
    
    button {
        transition: none;
    }
}
