@font-face {
    font-family: 'starry';
    src: url('starrynight-xnyj-webfont.woff2') format('woff2'),
         url('starrynight-xnyj-webfont.woff') format('woff');
    font-display: swap;
}


/* =========================================================
   GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #05070b;
    color: #ffffff;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

#booking {
    position: relative;
    min-height: 100vh;

    background: #05070b;

    overflow: hidden;
}


/*
 * Actual photograph.
 *
 * Slight blur keeps the background atmospheric without
 * competing with the calculator.
 */
#booking::before {
    content: '';

    position: absolute;
    inset: -10px;

    background-image: url('wallpaper3.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    filter: blur(2px);

    transform: scale(1.015);

    z-index: 0;
}


/*
 * Much lighter overlay than before.
 *
 * The old overlay was making the photograph unnecessarily
 * dark. This keeps text readable while allowing the
 * Milky Way and stars to actually pop.
 */
#booking::after {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(3, 8, 18, 0.16) 0%,
            rgba(3, 8, 18, 0.22) 45%,
            rgba(3, 8, 18, 0.34) 100%
        );

    pointer-events: none;

    z-index: 0;
}


/* =========================================================
   CENTERING
   ========================================================= */

.section-center {
    position: relative;
    z-index: 1;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 42px 20px;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}


/* =========================================================
   ACTIVE PAGE AREA
   ========================================================= */

/*
 * This is the main glass shell surrounding the active
 * StarSpan interface.
 *
 * Because the star map is inside .booking-form, it will
 * automatically sit inside this same border when displayed.
 */
.booking-form {
    width: 100%;

    padding: 34px;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(10, 20, 34, 0.56),
            rgba(5, 12, 23, 0.38)
        );

    border: 1px solid rgba(145, 210, 255, 0.30);

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.42),
        0 0 45px rgba(65, 155, 220, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* =========================================================
   HEADER
   ========================================================= */

.form-header {
    text-align: center;

    margin-bottom: 30px;
}

.form-header h1 {
    margin: 0;

    /*
     * KEEP THE EXISTING STAR FONT.
     */
    font-family: 'starry', Arial, sans-serif;

    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;

    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;

    color: #78baf3;

    text-shadow:
        0 0 10px rgba(72, 136, 200, 0.45),
        0 0 25px rgba(72, 136, 200, 0.20);
}

.form-header p {
    margin: 12px 0 0;

    color: rgba(235, 245, 255, 0.88);

    font-size: 15px;
    letter-spacing: 0.5px;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.55);
}


/* =========================================================
   CALCULATOR PANEL
   ========================================================= */

#star-form {
    background:
        rgba(5, 13, 25, 0.48);

    padding: 28px;

    border:
        1px solid
        rgba(145, 210, 255, 0.20);

    border-radius: 18px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 12px 35px rgba(0, 0, 0, 0.18);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* =========================================================
   INPUT ROW
   ========================================================= */

.row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;
}


/* =========================================================
   FORM GROUP
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}


/* =========================================================
   LABELS
   ========================================================= */

.form-label {
    display: block;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.96);

    font-size: 15px;
    font-weight: 700;
    font-style: italic;

    text-align: left;

    letter-spacing: 0.2px;
}


/* =========================================================
   MODERN INPUTS
   ========================================================= */

.form-control {
    display: block;

    width: 100%;
    height: 54px;

    padding: 0 44px 0 17px;

    background:
        rgba(7, 16, 29, 0.72);

    border:
        1px solid
        rgba(145, 210, 255, 0.32);

    border-radius: 12px;

    outline: none;

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 4px 15px rgba(0, 0, 0, 0.12);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.form-control::placeholder {
    color: rgba(220, 232, 245, 0.62);
}

.form-control:hover {
    border-color:
        rgba(145, 210, 255, 0.48);

    background:
        rgba(8, 19, 34, 0.78);
}

.form-control:focus {
    background:
        rgba(8, 20, 36, 0.88);

    border-color:
        rgba(123, 220, 241, 0.85);

    box-shadow:
        0 0 0 3px rgba(123, 220, 241, 0.09),
        0 0 22px rgba(80, 190, 245, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}


/* =========================================================
   BUTTON
   ========================================================= */

.form-btn {
    margin-top: 8px;
}

.submit-btn {
    width: 100%;
    height: 54px;

    border: none;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #73d9f3 0%,
            #63c5ed 100%
        );

    color: #07131d;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    letter-spacing: 1.5px;
    text-transform: uppercase;

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(74, 190, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);

    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        box-shadow 0.15s ease;
}

.submit-btn:hover {
    filter: brightness(1.08);

    box-shadow:
        0 10px 30px rgba(74, 190, 235, 0.28),
        0 0 22px rgba(74, 190, 235, 0.12);

    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);

    box-shadow:
        0 5px 15px rgba(74, 190, 235, 0.16);
}

/* =========================
   RESULT
   ========================= */

.result {
    margin-top: 25px;

    text-align: center;

    color: #bcd2e8;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.result:empty {
    display: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .section-center {
        align-items: flex-start;

        padding:
            28px 10px 35px;
    }

    .container {
        width: 100%;
    }

    .booking-form {
        padding: 24px 14px 18px;

        border-radius: 20px;

        background:
            linear-gradient(
                145deg,
                rgba(7, 17, 30, 0.58),
                rgba(4, 11, 21, 0.44)
            );

        border-color:
            rgba(145, 210, 255, 0.27);

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .form-header {
        margin-bottom: 22px;
    }

    .form-header h1 {
        font-size: 34px;
    }

    .form-header p {
        margin-top: 10px;

        font-size: 14px;
    }

    #star-form {
        padding: 20px 14px;

        border-radius: 16px;
    }

    .row {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-label {
        margin-bottom: 8px;

        font-size: 16px;
    }

    .form-control {
        height: 56px;

        padding:
            0 43px 0 16px;

        border-radius: 13px;

        font-size: 16px;

        /*
         * 16px prevents mobile browsers from zooming the
         * page when the input receives focus.
         */
    }

    .submit-btn {
        height: 54px;

        border-radius: 14px;

        font-size: 14px;
    }
}
/* =========================
   RESULT DETAILS
   ========================= */

.result .star-name {
    color: #87b6e6;
}

.result .distance {
    color: #92c1f0;
}

.result .error {
    display: block;
    color: #ff4d4d;
    font-size: 17px;
    font-weight: 700;
}
/* =========================
   AUTOCOMPLETE
   ========================= */

.autocomplete-group {
    position: relative;
}

.suggestions {
    position: absolute;

    top: calc(100% - 12px);
    left: 0;
    right: 0;

    z-index: 1000;

    display: none;

    background: #171b22;

    border: 1px solid rgba(123, 220, 241, 0.35);
    border-radius: 0 0 6px 6px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.55);

    overflow: hidden;
}

.suggestions.visible {
    display: block;
}


/* Individual suggestion */

.suggestion {
    padding: 11px 14px;

    cursor: pointer;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);

    transition:
        background 0.12s ease,
        padding-left 0.12s ease;
}

.suggestion:last-child {
    border-bottom: none;
}


/* Hover / keyboard selection */

.suggestion:hover,
.suggestion.selected {
    background: rgba(123, 220, 241, 0.14);
    padding-left: 17px;
}


/* Main star name */

.suggestion-name {
    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    line-height: 1.3;
}


/* HIP / HD / HR / etc. */

.suggestion-designations {
    margin-top: 3px;

    color: rgba(190, 205, 220, 0.72);

    font-size: 12px;
    font-weight: 400;

    line-height: 1.4;

    white-space: normal;
}


/* Don't let the dropdown get ridiculously tall */

.suggestions {
    max-height: 310px;
    overflow-y: auto;
}


/* Scrollbar */

.suggestions::-webkit-scrollbar {
    width: 7px;
}

.suggestions::-webkit-scrollbar-track {
    background: #11151b;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #4c5967;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #637485;
}


/* Mobile */

@media (max-width: 600px) {

    .suggestions {
        max-height: 260px;
    }

    .suggestion {
        padding: 12px;
    }

    .suggestion-name {
        font-size: 15px;
    }

    .suggestion-designations {
        font-size: 11px;
    }
}
.star-map {
    position: relative;
    display: none;
    width: 100%;
    height: 600px;
    margin-top: 30px;
    border-radius: 16px;
    border: 1px solid rgba(145, 210, 255, 0.22);
    overflow: hidden;
    background: #05070b;
    
}
/* =========================================================
   STAR MAP TOOLTIP
   ========================================================= */

.star-map-tooltip {
    position: absolute;
    z-index: 20;
    pointer-events: none;
    display: none;
    padding: 8px 11px;
    border-radius: 5px;
    background: rgba(8, 11, 17, 0.92);
    border: 1px solid rgba(135, 216, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    transform: translate(12px, 12px);
}
/* =========================================================
   STAR MAP LABELS
   ========================================================= */

.star-map-label {
    position: absolute;

    z-index: 15;

    transform:
        translate(10px, -50%);

    pointer-events: none;

    color:
        rgba(235, 245, 255, 0.82);

    font-size: 12px;

    line-height: 1.2;

    white-space: nowrap;

    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.95),
        0 0 8px rgba(0, 0, 0, 0.75);
}


/* Three important stars */

.important-label {

    opacity: 0.55;

    font-size: 13px;

    font-weight: 600;

    transition:
        opacity 0.15s ease,
        text-shadow 0.15s ease;
}


/* Desktop hover */

.important-label.hovered {

    opacity: 1;

    text-shadow:
        0 1px 5px rgba(0, 0, 0, 1),
        0 0 12px rgba(255, 255, 255, 0.35);
}


/* Nearby catalogue stars */

.background-label {

    opacity: 0.32;

    font-size: 10px;

    font-weight: 400;
}


/* =========================================================
   AUTOCOMPLETE ARROW
   ========================================================= */

.autocomplete-group::after {

    content: "▼";

    position: absolute;

    right: 15px;

    top: 55px;

    transform:
        translateY(-50%);

    pointer-events: none;

    color:
        rgba(255, 255, 255, 0.65);

    font-size: 10px;

    z-index: 5;
}


.autocomplete-group .form-control {

    padding-right: 42px;
}


/* =========================================================
   MOBILE STAR INFORMATION
   ========================================================= */

.star-map-mobile-info {

    position: absolute;

    top: 12px;

    left: 12px;

    right: 12px;

    z-index: 30;

    display: none;

    padding: 11px 14px;

    border-radius: 7px;

    background:
        rgba(8, 11, 17, 0.92);

    border:
        1px solid
        rgba(135, 216, 255, 0.38);

    box-shadow:
        0 6px 22px
        rgba(0, 0, 0, 0.55);

    color: #ffffff;

    font-size: 13px;

    line-height: 1.45;

    pointer-events: none;
}


.star-map-mobile-info strong {

    display: block;

    margin-bottom: 2px;

    color: #ffffff;

    font-size: 14px;
}


.star-map-mobile-info span {

    display: block;

    color:
        rgba(220, 235, 250, 0.88);
}


/* =========================================================
   TOUCH MAP
   ========================================================= */

.star-map {

    touch-action: none;
}


@media (max-width: 600px) {

    .important-label {

        opacity: 0.62;

        font-size: 12px;
    }


    .background-label {

        font-size: 9px;

        opacity: 0.28;
    }


    .star-map-mobile-info {

        font-size: 12px;
    }


    .star-map-mobile-info strong {

        font-size: 13px;
    }

}


@media (min-width: 601px) {

    .star-map-mobile-info {

        display: none !important;
    }

}

/* =========================================================
   TABS
   ========================================================= */

.tabs {
    display: flex;

    width: 100%;

    margin-bottom: 28px;

    padding: 5px;

    background: rgba(5, 13, 25, 0.48);

    border:
        1px solid
        rgba(145, 210, 255, 0.20);

    border-radius: 14px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 8px 25px rgba(0, 0, 0, 0.15);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


.tab-button {
    flex: 1;

    height: 48px;

    padding: 0 18px;

    border: none;

    border-radius: 10px;

    background: transparent;

    color: rgba(220, 232, 245, 0.68);

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.5px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


.tab-button:hover {
    color: rgba(255, 255, 255, 0.95);

    background:
        rgba(123, 220, 241, 0.07);
}


.tab-button.active {
    color: #07131d;

    background:
        linear-gradient(
            135deg,
            #73d9f3 0%,
            #63c5ed 100%
        );

    box-shadow:
        0 5px 18px rgba(74, 190, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}


/* =========================================================
   TAB CONTENT
   ========================================================= */

.tab-content {
    display: none;
}


.tab-content.active {
    display: block;
}


/* =========================================================
   MOBILE TABS
   ========================================================= */

@media (max-width: 600px) {

    .tabs {

        margin-bottom: 22px;

        padding: 4px;

        border-radius: 12px;

    }



    .tab-button {

        height: 46px;

        padding: 0 8px;

        font-size: 12px;

        letter-spacing: 0.3px;

    }

}


/* =========================================================
   STAR HOPPER BUTTONS
   ========================================================= */


/*
 * ADD STAR
 */

#add-hopper-star {

    display: block;

    width: 100%;

    height: 48px;

    margin-top: 4px;

    padding: 0 18px;

    border: 1px solid rgba(123, 220, 241, 0.42);

    border-radius: 12px;

    background:

        linear-gradient(

            135deg,

            rgba(123, 220, 241, 0.10),

            rgba(74, 190, 235, 0.04)

        );

    color: rgba(220, 245, 255, 0.92);

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 0.5px;

    cursor: pointer;

    box-shadow:

        inset 0 1px 0 rgba(255, 255, 255, 0.06),

        0 5px 18px rgba(0, 0, 0, 0.14);

    transition:

        background 0.18s ease,

        border-color 0.18s ease,

        box-shadow 0.18s ease,

        transform 0.15s ease,

        color 0.18s ease;

}


#add-hopper-star:hover {

    background:

        linear-gradient(

            135deg,

            rgba(123, 220, 241, 0.18),

            rgba(74, 190, 235, 0.08)

        );

    border-color:

        rgba(123, 220, 241, 0.72);

    color: #ffffff;

    box-shadow:

        0 7px 24px rgba(74, 190, 235, 0.16),

        0 0 18px rgba(123, 220, 241, 0.08);

    transform: translateY(-1px);

}


#add-hopper-star:active {

    transform: translateY(1px);

    box-shadow:

        0 3px 10px rgba(0, 0, 0, 0.18);

}


/*
 * REMOVE STAR
 */

.hopper-remove-btn {

    width: 42px;

    height: 42px;

    flex-shrink: 0;

    margin-left: 8px;

    padding: 0;

    border: 1px solid rgba(255, 105, 125, 0.30);

    border-radius: 10px;

    background:

        rgba(255, 70, 100, 0.07);

    color: rgba(255, 150, 165, 0.86);

    font-family: inherit;

    font-size: 19px;

    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    box-shadow:

        inset 0 1px 0 rgba(255, 255, 255, 0.04),

        0 4px 12px rgba(0, 0, 0, 0.12);

    transition:

        background 0.18s ease,

        border-color 0.18s ease,

        color 0.18s ease,

        box-shadow 0.18s ease,

        transform 0.15s ease;

}


.hopper-remove-btn:hover {

    background:

        rgba(255, 70, 100, 0.16);

    border-color:

        rgba(255, 105, 125, 0.65);

    color: #ffb4c0;

    box-shadow:

        0 5px 18px rgba(255, 70, 100, 0.12),

        0 0 14px rgba(255, 70, 100, 0.07);

    transform: translateY(-1px);

}


.hopper-remove-btn:active {

    transform: translateY(1px);

    box-shadow:

        0 3px 9px rgba(0, 0, 0, 0.16);

}


/*
 * CALCULATE ROUTE
 */

#calculate-hopper {

    width: 100%;

    height: 54px;

    margin-top: 12px;

    border: none;

    border-radius: 14px;

    background:

        linear-gradient(

            135deg,

            #73d9f3 0%,

            #63c5ed 100%

        );

    color: #07131d;

    font-family: inherit;

    font-size: 14px;

    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    cursor: pointer;

    box-shadow:

        0 8px 25px rgba(74, 190, 235, 0.18),

        inset 0 1px 0 rgba(255, 255, 255, 0.45);

    transition:

        transform 0.15s ease,

        filter 0.15s ease,

        box-shadow 0.15s ease;

}


#calculate-hopper:hover {

    filter: brightness(1.08);

    box-shadow:

        0 10px 30px rgba(74, 190, 235, 0.28),

        0 0 22px rgba(74, 190, 235, 0.12);

    transform: translateY(-1px);

}


#calculate-hopper:active {

    transform: translateY(1px);

    box-shadow:

        0 5px 15px rgba(74, 190, 235, 0.16);

}


/*
 * MOBILE HOPPER BUTTONS
 */

@media (max-width: 600px) {

    #add-hopper-star {

        height: 50px;

        font-size: 14px;

        border-radius: 12px;

    }


    .hopper-remove-btn {

        width: 44px;

        height: 44px;

        margin-left: 7px;

        border-radius: 10px;

    }


    #calculate-hopper {

        height: 54px;

        margin-top: 10px;

        border-radius: 14px;

        font-size: 14px;

    }

}

/*
 * =========================================================
 * STAR HOPPER - DRAG / REORDER
 * =========================================================
 */

.hopper-field .form-label {
    cursor: grab;
    user-select: none;
    touch-action: none;
}


.hopper-field .form-label::before {
    content: "⋮⋮";
    display: inline-block;
    margin-right: 8px;
    opacity: 0.65;
    letter-spacing: -3px;
}


.hopper-field
.hopper-drag-handle-active {
    cursor: grabbing;
}


.hopper-field.hopper-dragging {
    opacity: 0.45;
}


.hopper-drag-placeholder {
    width: 100%;
    border: 1px dashed rgba(155, 220, 255, 0.55);
    border-radius: 8px;
    margin: 8px 0;
    box-sizing: border-box;
}

/* =========================================================
   GALACTIC LONGITUDE LABELS
   ========================================================= */

.galactic-longitude-label {

    color: rgba(155, 205, 240, 0.30);

    font-size: 11px;

    font-family:
        Arial,
        sans-serif;

    white-space: nowrap;

    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.95);

    z-index: 5;

    user-select: none;

}