@import url('https://unpkg.com/98.css');

.title-bar {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(100% - 8px);
    height: 20px;
    /* Gradient from original title blue to #2596be */
    background: linear-gradient(90deg, #080484 0%, #2596be 100%);
    display: flex;
    align-items: center;
    padding: 0 5px;
    box-sizing: border-box;
    border-top: 1px solid #4646ba;
    border-left: 1px solid #4646ba;
    border-right: 1px solid #000052;
    border-bottom: 1px solid #000052;
    z-index: 2200; /* ensure title-bar sits above the 3D canvas and loading overlay */
}

/* ensure our title-text uses the bold ms_sans font like original */
.title-text {
    color: #ffffff;
    font-family: 'ms_sans_serif_bold', 'W95FA', sans-serif;
    font-weight: 700;
    font-size: 12px;
    margin-left: 6px;
}

/* keep the existing .title-icon sizing for injected icons */
.title-icon {
    height: 16px;
    width: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.title-icon {
    height: 16px;
    width: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.title-text {
    color: #ffffff;
    font-family: 'ms_sans_serif_bold', 'W95FA', sans-serif;
    font-weight: 700;
    font-size: 12px;
}

/* Website titlebar uses same styling (kept here so both title bars share the same look) */
.website-titlebar {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(100% - 8px);
    height: 20px;
    background: linear-gradient(90deg, #080484 0%, #2596be 100%);
    display: flex;
    align-items: center;
    padding: 0 5px;
    box-sizing: border-box;
    border-top: 1px solid #4646ba;
    border-left: 1px solid #4646ba;
    border-right: 1px solid #000052;
    border-bottom: 1px solid #000052;
}

/* Keep the minimize/maximize/close buttons grouped on the right without changing their visual style */
.title-bar-controls {
    margin-left: auto;
    display: flex;
    gap: 0; /* glue the first two buttons together */
    align-items: center;
    /* nudge the whole control group a few pixels to the right */
    position: relative;
    left: 4px;
}

/* Make the close button sit 3px away from the maximize button (apply to both website and game titlebars) */
.title-bar-controls button:last-child {
    margin-left: 3px;
}

/* Ensure the maximize (2nd) button doesn't add extra spacing on its right */
.title-bar-controls .title-bar-controls button:nth-child(2),
.title-bar-controls button:nth-child(2) {
    margin-right: 0;
    margin-left: 0;
}

/* Glue minimize + maximize only on the website titlebar (keep game titlebar visually consistent) */
.website-titlebar .title-bar-controls {
    gap: 0; /* remove spacing so the first two buttons sit flush */
    /* nudge the website titlebar controls slightly right as a group */
    position: relative;
    left: 4px;
}

/* Make the website close button sit 3px away from the maximize button */
.website-titlebar .title-bar-controls button:last-child {
    margin-left: 3px;
}

/* Remove extra gap so the minimize and maximize buttons are glued together */
.website-titlebar .title-bar-controls button:nth-child(2) {
    margin-right: 0;
    margin-left: 0;
}

/* Ensure the first two buttons don't get extra spacing from borders */
.website-titlebar .title-bar-controls button:first-child,
.website-titlebar .title-bar-controls button:nth-child(2) {
    margin: 0;
    padding: 0 4px; /* keep button internals readable while appearing flush */
}