/* =====================================
   Stellare Nachbarschaft - Main Styles
   Mobile-First Approach
   ===================================== */

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
.stellar-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Canvas */
#stellar-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Loading Screen */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

/* Skip Focus Button */
.skip-focus-btn {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    border-radius: 2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.skip-focus-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 1);
}

/* Star Info Panel */
.star-info-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 200;
    max-height: 50vh;
    overflow-y: auto;
}

.star-info-panel.visible {
    transform: translateY(0);
}

.star-info-panel .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.star-info-panel .close-btn:hover {
    color: rgba(255, 255, 255, 1);
}

.star-info-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.star-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
}

.star-details dt {
    color: rgba(255, 255, 255, 0.6);
}

.star-details dd {
    color: rgba(255, 255, 255, 0.9);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for accessibility */
:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Performance Classes */
.quality-basic #stellar-canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Tablet Styles */
@media screen and (min-width: 768px) {
    .loading p {
        font-size: 1.25rem;
    }
    
    .star-info-panel {
        left: auto;
        right: 0;
        width: 400px;
        max-height: 100vh;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateX(100%);
    }
    
    .star-info-panel.visible {
        transform: translateX(0);
    }
    
    .star-info-panel h2 {
        font-size: 1.75rem;
    }
    
    .star-details {
        font-size: 1rem;
    }
}

/* Desktop Styles */
@media screen and (min-width: 1024px) {
    #stellar-canvas {
        cursor: pointer;
    }
    
    .star-info-panel {
        width: 450px;
        padding: 2rem;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    #stellar-canvas {
        image-rendering: auto;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
