/* Yıldız sistemi — oyun ekranı penceresi (DarkOrbit tarzı) */

.ui-panel.star-system-window {
    pointer-events: auto;
    position: fixed;
    width: 860px;
    max-width: 95vw;
    height: 540px;
    max-height: 90vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 26;
    cursor: default;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #2a8fb5;
    border-top-color: #4eb8dc;
    border-left-color: #4eb8dc;
    background: rgba(6, 18, 28, 0.92);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.9),
        0 0 18px rgba(46, 170, 220, 0.28),
        inset 0 0 0 1px rgba(0, 0, 0, 0.75);
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 12px),
        calc(100% - 12px) 100%,
        0 100%
    );
}

.ui-panel.star-system-window.hidden {
    display: none !important;
}

.ui-panel.star-system-window::before {
    display: none !important;
    pointer-events: none !important;
}

.star-system-titlebar {
    flex-shrink: 0;
    height: 28px;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 6px 0 8px;
    box-sizing: border-box;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, rgba(10, 58, 78, 0.98) 0%, rgba(6, 34, 48, 0.98) 100%);
    border-bottom: 1px solid #1f7ea3;
    box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.16);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.star-system-titlebar:active {
    cursor: grabbing;
}

.star-system-title-icon {
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
}

.star-system-title {
    flex: 1;
    min-width: 0;
    color: #f6d991;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(255, 211, 100, 0.28);
}

.star-system-close {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(70, 150, 185, 0.55);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(12, 48, 64, 0.95), rgba(8, 28, 40, 0.95));
    color: rgba(230, 245, 255, 0.92);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.star-system-close:hover {
    color: #fff;
    border-color: #6ec8ea;
    background: linear-gradient(180deg, rgba(18, 72, 96, 0.98), rgba(10, 40, 56, 0.98));
}

.star-system-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.022) 0,
            rgba(255, 255, 255, 0.022) 1px,
            transparent 1px,
            transparent 5px
        ),
        linear-gradient(180deg, rgba(10, 24, 34, 0.94), rgba(5, 12, 20, 0.96));
}

.star-system-map-host {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 8px 10px 10px;
}

.star-system-map-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid rgba(120, 130, 145, 0.35);
    border-radius: 4px;
    background: #0a1018;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.star-system-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.star-system-map-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
}

.star-system-map-footer {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 3;
    flex-shrink: 0;
    margin: 0;
    pointer-events: none;
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffe566;
    letter-spacing: 0.03em;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 1),
        0 1px 3px rgba(0, 0, 0, 0.95),
        0 0 12px rgba(255, 200, 40, 0.45);
}

#starSystemMapCurrentLabel {
    color: inherit;
    font-weight: inherit;
}

@media (max-width: 900px), (max-height: 620px) {
    .ui-panel.star-system-window {
        width: min(860px, calc(100vw - 16px));
        height: min(540px, calc(100vh - 16px));
    }
}
