* {
    box-sizing: border-box;
}
/* ============================================================
   STELLAR NEXUS — Design System  v2.0
   Three-theme sci-fi aesthetic: Dark / Mid / Light
   ============================================================ */

/* Font aliases (always available regardless of theme) */
:root {
    --main-font-family: 'Titillium Web', 'Space Mono', monospace;
    --secondary-font-family: 'Rajdhani', sans-serif;
    --sn-font-display: 'Orbitron', 'Rajdhani', sans-serif;
    --sn-font-heading: 'Rajdhani', sans-serif;
    --sn-font-body: 'Titillium Web', sans-serif;
    --sn-font-mono: 'Space Mono', monospace;
    --sn-border-radius: 8px;
    --sn-border-radius-lg: 16px;
}

/* === DARK THEME (default) === */
html,
html[data-theme="dark"] {
    --sn-bg-panel:        rgba(8, 12, 20, 0.90);
    --sn-bg-panel-hover:  rgba(12, 18, 30, 0.94);
    --sn-bg-nav:          rgba(5, 8, 14, 0.95);
    --sn-bg-topbar:       rgba(4, 6, 11, 0.96);
    --sn-bg-input:        rgba(6, 10, 18, 0.82);

    --sn-border-subtle:   rgba(55, 82, 118, 0.32);
    --sn-border-main:     rgba(82, 122, 168, 0.48);
    --sn-border-chrome:   rgba(118, 158, 210, 0.58);
    --sn-border-active:   rgba(0, 200, 245, 0.78);

    --sn-chrome-dim:      #587090;
    --sn-chrome:          #8A9DB8;
    --sn-chrome-bright:   #B4C8E0;
    --sn-chrome-highlight:#D8EAFC;

    --sn-cyan:            #00D4FF;
    --sn-cyan-dim:        rgba(0, 212, 255, 0.52);
    --sn-cyan-glow:       0 0 14px rgba(0, 212, 255, 0.42), 0 0 4px rgba(0, 212, 255, 0.72);

    --sn-gold:            #E8A020;
    --sn-gold-dim:        rgba(232, 160, 32, 0.52);
    --sn-gold-glow:       0 0 14px rgba(232, 160, 32, 0.42), 0 0 4px rgba(232, 160, 32, 0.72);

    --sn-text-primary:    #C4D4EC;
    --sn-text-secondary:  rgba(175, 198, 228, 0.80);
    --sn-text-muted:      rgba(132, 156, 190, 0.60);
    --sn-text-heading:    #E4EFFF;
    --sn-text-link:       #68C8F0;
    --sn-text-link-hover: #9ADEFF;

    --sn-shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.48);
    --sn-shadow-md:       0 4px 18px rgba(0, 0, 0, 0.62), 0 2px 6px rgba(0, 0, 0, 0.44);
    --sn-shadow-lg:       0 8px 36px rgba(0, 0, 0, 0.74), 0 4px 14px rgba(0, 0, 0, 0.52);
    --sn-shadow-panel:    0 0 0 1px var(--sn-border-main), var(--sn-shadow-md);

    --sn-status-ok:       #4AE87A;
    --sn-status-warn:     #F0C040;
    --sn-status-danger:   #F04848;
    --sn-status-info:     #40A8F8;

    --sn-body-overlay:    rgba(4, 6, 10, 0.18);
}

/* === MID THEME === */
html[data-theme="mid"] {
    --sn-bg-panel:        rgba(18, 26, 42, 0.91);
    --sn-bg-panel-hover:  rgba(24, 35, 54, 0.95);
    --sn-bg-nav:          rgba(12, 18, 32, 0.95);
    --sn-bg-topbar:       rgba(9, 14, 26, 0.96);
    --sn-bg-input:        rgba(14, 20, 34, 0.84);

    --sn-border-subtle:   rgba(68, 102, 148, 0.34);
    --sn-border-main:     rgba(95, 140, 192, 0.50);
    --sn-border-chrome:   rgba(138, 180, 228, 0.60);
    --sn-border-active:   rgba(18, 210, 252, 0.80);

    --sn-chrome-dim:      #6880A0;
    --sn-chrome:          #9AAEC8;
    --sn-chrome-bright:   #C2D6EE;
    --sn-chrome-highlight:#DFF0FC;

    --sn-cyan:            #18D8FF;
    --sn-cyan-dim:        rgba(24, 216, 255, 0.52);
    --sn-cyan-glow:       0 0 16px rgba(24, 216, 255, 0.44), 0 0 5px rgba(24, 216, 255, 0.74);

    --sn-gold:            #DCAA2C;
    --sn-gold-dim:        rgba(220, 170, 44, 0.52);
    --sn-gold-glow:       0 0 16px rgba(220, 170, 44, 0.44), 0 0 5px rgba(220, 170, 44, 0.74);

    --sn-text-primary:    #CCD8F0;
    --sn-text-secondary:  rgba(184, 208, 238, 0.82);
    --sn-text-muted:      rgba(148, 172, 204, 0.64);
    --sn-text-heading:    #ECF4FF;
    --sn-text-link:       #78D0F4;
    --sn-text-link-hover: #A4E4FF;

    --sn-shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.40);
    --sn-shadow-md:       0 4px 18px rgba(0, 0, 0, 0.54), 0 2px 6px rgba(0, 0, 0, 0.36);
    --sn-shadow-lg:       0 8px 36px rgba(0, 0, 0, 0.64), 0 4px 14px rgba(0, 0, 0, 0.44);
    --sn-shadow-panel:    0 0 0 1px var(--sn-border-main), var(--sn-shadow-md);

    --sn-status-ok:       #42DA6E;
    --sn-status-warn:     #EAB832;
    --sn-status-danger:   #E83C3C;
    --sn-status-info:     #38A2F2;

    --sn-body-overlay:    rgba(6, 10, 18, 0.10);
}

/* === LIGHT THEME — Steel Silver === */
html[data-theme="light"] {
    /* Panels: metallic steel-blue silver, semi-transparent so
       the space background still bleeds through with a cool tint */
    --sn-bg-panel:        rgba(172, 192, 218, 0.86);
    --sn-bg-panel-hover:  rgba(158, 180, 210, 0.92);
    --sn-bg-nav:          rgba(140, 163, 196, 0.92);
    --sn-bg-topbar:       rgba(122, 148, 185, 0.95);
    --sn-bg-input:        rgba(188, 206, 228, 0.90);

    --sn-border-subtle:   rgba(80, 110, 155, 0.30);
    --sn-border-main:     rgba(60, 92, 145, 0.50);
    --sn-border-chrome:   rgba(42, 76, 136, 0.62);
    --sn-border-active:   rgba(10, 68, 148, 0.80);

    --sn-chrome-dim:      #7090B8;
    --sn-chrome:          #3C5878;
    --sn-chrome-bright:   #1E3858;
    --sn-chrome-highlight:#0A2040;

    --sn-cyan:            #0060A8;
    --sn-cyan-dim:        rgba(0, 96, 168, 0.45);
    --sn-cyan-glow:       0 0 10px rgba(0, 96, 168, 0.26), 0 0 3px rgba(0, 96, 168, 0.50);

    --sn-gold:            #7A5800;
    --sn-gold-dim:        rgba(122, 88, 0, 0.42);
    --sn-gold-glow:       0 0 10px rgba(122, 88, 0, 0.26), 0 0 3px rgba(122, 88, 0, 0.50);

    --sn-text-primary:    #0C1C34;
    --sn-text-secondary:  rgba(18, 38, 70, 0.85);
    --sn-text-muted:      rgba(45, 72, 112, 0.70);
    --sn-text-heading:    #060E1E;
    --sn-text-link:       #0040A0;
    --sn-text-link-hover: #002A78;

    --sn-shadow-sm:       0 2px 8px rgba(8, 20, 50, 0.18);
    --sn-shadow-md:       0 4px 18px rgba(8, 20, 50, 0.26), 0 2px 6px rgba(8, 20, 50, 0.16);
    --sn-shadow-lg:       0 8px 36px rgba(8, 20, 50, 0.32), 0 4px 14px rgba(8, 20, 50, 0.20);
    --sn-shadow-panel:    0 0 0 1px var(--sn-border-main), var(--sn-shadow-md);

    --sn-status-ok:       #0E6828;
    --sn-status-warn:     #7A5000;
    --sn-status-danger:   #A00E0E;
    --sn-status-info:     #083CA0;

    /* Body overlay: steel blue tint over the space background */
    --sn-body-overlay:    rgba(100, 135, 188, 0.68);
}
html, body {
    font-family: "Space Mono", monospace;
    font-family: var(--main-font-family);
   background-color: rgba(0,0,0,0);
}
html {
	background-image:url("../img/background/mars.webp");
	background-size: cover;
    background-position: center center;
    background-attachment: fixed;
	
	color: #fff;
}
/* Backgrounds */
html.mars {
    background-image:url("../img/background/mars.webp");
}
html.light_green {
    background-image:url("../img/background/light_green.webp");
}
html.intense_blue {
    background-image:url("../img/background/intense_blue.webp");
}
html.dark_blue {
    background-image:url("../img/background/dark_blue.webp");
}
html.mountains {
    background-image:url("../img/background/mountains.webp");
}
html.orbit {
    background-image:url("../img/background/orbit.webp");
}
html.supernova {
    background-image:url("../img/background/supernova.webp");
}
html.spaceport {
    background-image:url("../img/background/spaceport.webp");
}
/* Headings */
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6, .uk-heading-2xlarge, .uk-heading-3xlarge, .uk-heading-large, .uk-heading-medium, .uk-heading-small, .uk-heading-xlarge, h1, h2, h3, h4, h5, h6 {
    font-family: "Rajdhani", sans-serif;
  font-weight: 500;
  color: rgba(255,255,255,1);
}
.uk-navbar-item, .uk-navbar-nav > li > a, .uk-navbar-toggle {
    font-family: "Rajdhani", sans-serif;
  font-weight: 400;
    font-size: 1.3em;
}

.dark-blur-bg {
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255,255,255,1);
}

.box-border {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    
    color: rgba(255,255,255,1);
    padding: 20px;
}
.blur-bg-danger {
    background-color: rgba(83, 6, 6, 0.65) !important;

}



.menu-container {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    
}
.footer-container {
    border-top: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
    bottom: 0px;
    position: fixed;
    left: 0px;
    padding: 10px;
    border-radius: 0px 20px 0px 0px;
    padding-right: 15px;
}
.mobile-universe-info {
    display: none;
}
.mobile-footer-info-btn {
    display: none;
}

.box-shadow-large {
    box-shadow: 0px 0px 40px 0px rgba(0,0,0,0.75);
-webkit-box-shadow: 0px 0px 40px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 40px 0px rgba(0,0,0,0.75);
}
a:hover img.logo {
    transform: scale(1.05);
opacity: 0.9;
}
img.logo {
    max-width: 300px;
    transition: all 0.5s ease;
}
/* Navbar */
.uk-navbar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    float: left;
    background-color: rgba(0,0,0,0);
    margin-bottom: 40px;
}
header {
    margin-bottom: 40px;
    z-index:9999;
    position: relative;

}

.menu-container {
    z-index:999;
    position: relative;
}
.uk-navbar-nav .uk-active {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 128, 0, 0.6);
  }
  /* .top-bar */
.top-bar .uk-navbar-nav > li > a {
    min-height: 50px;
}
.top-bar {
    background-color: rgba(0,0,0,0.8);
    z-index:9999;
    position: relative;
    height: 50px;
}

.top-bar .uk-navbar-nav {
    gap: 30px;
  }
/* Resources */

.resources-container {
  margin-top: 17px;
}
.resource-grid {
    align-items: stretch;
}
.resource-slot {
    display: flex;
}
.resource {
    border-radius: 14px;
    min-height: 46px;
    max-height: 46px;
    width: 100%;
    padding: 4px 8px !important;
    border: 1px solid rgba(108, 178, 255, 0.35);
    background: linear-gradient(145deg, rgba(8, 18, 30, 0.82), rgba(3, 8, 14, 0.74));
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 16px rgba(64, 148, 255, 0.12);
 
    /*background-size: cover;
    background-image: none !important;
    overflow: hidden;*/

}
.resource::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(120, 210, 255, 0.75), rgba(120, 210, 255, 0));
    pointer-events: none;
}
.resource-negative {
    border-color: rgba(255, 108, 108, 0.48);
    background: linear-gradient(145deg, rgba(34, 6, 10, 0.86), rgba(16, 3, 6, 0.76));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 16px rgba(255, 90, 90, 0.16);
}

/*.resource::before {
    width: 100%;
    height: 100%;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.8);
    border-radius: 25px;
   
}*/
.resource-content {
    z-index: 99;
    position: relative;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}
.resource:hover {
    background-color: rgba(4,12,20,0.88);
    border-color: rgba(145, 218, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(189, 233, 255, 0.14), 0 8px 20px rgba(0,0,0,0.34), 0 0 22px rgba(70, 175, 255, 0.22);
    transform: translateY(-1px);
}
.resource-name {
    font-family: Arial, Helvetica, sans-serif;
    margin-bottom: 0;
    line-height: 1.15;
    transition: color 0.2s ease;
    text-transform: none;
    letter-spacing: 0.01em;
    color: rgba(210, 235, 255, 0.9);
    font-size: 11px;
    font-weight: 700;
}

.resource:hover .resource-name {
    font-weight: 700;
    color: #fff;
}
.resource-picture {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(148, 212, 255, 0.42);
    overflow: hidden;
    margin-right: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(20, 35, 54, 0.85), rgba(8, 15, 23, 0.9));
    box-shadow: inset 0 0 10px rgba(147, 211, 255, 0.16);
}
.resource-tooltip {
    font-family: Arial, Helvetica, sans-serif;
    clear: both;
    opacity: 0;
    font-size: 11px;
    transition: opacity 0.18s ease, transform 0.18s ease;
    filter: none;
    -webkit-filter: none;
    padding: 7px 8px;
    line-height: 1.25;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    min-width: 190px;
    max-width: 240px;
    background: rgba(5, 11, 18, 0.96);
    border: 1px solid rgba(120, 210, 255, 0.4);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    pointer-events: none;
    transform: translateY(-2px);
}
.resource.darkmatter {
    pointer-events: none;
}
.resource:hover .resource-tooltip {
    opacity: 1;
    transform: translateY(0);
}
.credits-tooltip {
    min-width: 260px;
    max-width: 340px;
    padding: 12px 13px 11px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 38%),
        linear-gradient(160deg, rgba(42, 47, 56, 0.98), rgba(18, 21, 28, 0.98));
    border: 1px solid rgba(201, 216, 232, 0.48);
    border-radius: 12px;
    box-shadow:
        0 14px 28px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 0 0 1px rgba(158, 176, 194, 0.08);
    color: #e8eef5;
}
.credits-tooltip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 42%);
    pointer-events: none;
}
.credits-tooltip-title,
.credits-tooltip-subtitle,
.credits-tooltip-list,
.credits-tooltip-total,
.credits-tooltip-empty {
    position: relative;
    z-index: 1;
}
.credits-tooltip-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f4f8fc;
    text-shadow: 0 0 12px rgba(255,255,255,0.16);
}
.credits-tooltip-subtitle {
    margin-top: 3px;
    margin-bottom: 9px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(201, 214, 226, 0.78);
}
.credits-tooltip-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.credits-tooltip-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(196, 208, 220, 0.12);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.credits-tooltip-label {
    min-width: 0;
    color: #ced8e2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.credits-tooltip-value {
    font-weight: 700;
    color: #f3fbff;
    text-shadow: 0 0 10px rgba(197, 226, 255, 0.15);
}
.credits-tooltip-total {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(206, 218, 231, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #dbe4ec;
}
.credits-tooltip-total strong {
    color: #ffffff;
    font-size: 13px;
    letter-spacing: 0.02em;
}
.credits-tooltip-empty {
    margin-top: 8px;
    padding: 8px 9px;
    border: 1px solid rgba(196, 208, 220, 0.12);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    color: #c9d5df;
}
.resource img {
    transition: transform 0.2s ease;
    transform: scale(1.28);
}
.resource:hover img {
    transform: scale(1.35);
}
.res_current {
    line-height: 1.2;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.01em;
    color: #f0f7ff;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}
.resource-subline {
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    white-space: nowrap;
    color: rgba(230,244,255,0.9);
    border: 1px solid rgba(120, 210, 255, 0.34);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(26, 44, 66, 0.72), rgba(12, 24, 36, 0.72));
    padding: 1px 7px;
    max-width: fit-content;
}
.resource-subkey {
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.resource-subvalue {
    font-weight: 700;
    color: #9ff3ff;
    text-shadow: 0 0 8px rgba(101, 237, 255, 0.3);
}
.resource.credits {
    border-color: rgba(122, 255, 228, 0.5);
    background: linear-gradient(145deg, rgba(7, 28, 33, 0.84), rgba(4, 14, 17, 0.76));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 16px rgba(94, 255, 224, 0.14);
}
.resource.credits:hover {
    border-color: rgba(145, 255, 234, 0.75);
    box-shadow: inset 0 0 0 1px rgba(194, 255, 242, 0.16), 0 8px 20px rgba(0,0,0,0.34), 0 0 22px rgba(91, 255, 233, 0.24);
}
.resource-credits-icon-wrap {
    width: 28px;
    height: 28px;
}
.resource-credits-icon {
    font-size: 15px;
    color: #9ff3ff;
    text-shadow: 0 0 8px rgba(101, 237, 255, 0.35);
}

@media (max-width: 959px) {
    .resource {
        min-height: 44px;
        max-height: 44px;
        padding: 4px 7px !important;
        border-radius: 8px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
    }
    .resource::before,
    .resource::after {
        display: none;
    }
    .resource-picture {
        width: 28px;
        height: 28px;
        margin-right: 5px;
    }
    .resource img {
        transform: scale(1.22);
    }
    .resource:hover img {
        transform: scale(1.24);
    }
    .resource:hover {
        transform: none;
        box-shadow: none;
    }
    .resource-tooltip {
        display: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .resource,
    .resource *,
    .resource img {
        transition: none !important;
        animation: none !important;
    }
    .resource:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(255,255,255,0.1);
    }
}

@media (max-width: 959px) {
    .footer-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 12px;
        border-right: 1px solid rgba(255,255,255,0.1);
        transform: translateY(calc(100% + 16px));
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
        max-height: 70vh;
        overflow-y: auto;
        padding: 12px 10px;
        z-index: 9998;
    }
    .footer-container.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .footer-container .border-end {
        border-right: none !important;
        display: block;
        padding: 6px 4px !important;
    }
    .footer-universe-trigger {
        display: none;
    }
    .mobile-universe-info {
        display: block;
        font-size: 12px;
        line-height: 1.35;
        color: rgba(255,255,255,0.92);
        padding: 6px 4px 8px;
        margin-bottom: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }
    .mobile-universe-info div + div {
        margin-top: 2px;
    }
    .mobile-footer-info-btn {
        display: inline-flex;
        position: fixed;
        right: 12px;
        bottom: 12px;
        z-index: 9999;
        border: 1px solid rgba(130, 215, 255, 0.5);
        border-radius: 999px;
        padding: 7px 12px;
        background: linear-gradient(145deg, rgba(10, 25, 38, 0.92), rgba(5, 13, 20, 0.92));
        color: #d7f6ff;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.03em;
        box-shadow: 0 0 12px rgba(91, 255, 233, 0.2);
    }
}

/* center-content-box */
.center-content-box {
    transition: all 0.5s ease;
    z-index: 9;
    padding-top: 40px;
    padding-bottom: 50px;
}

/* Main Menu */

.main-menu-container {
    border-radius: 0px 0px 25px 25px;
    padding: 5px;
   
   padding-top: 20px;
   transition: all 0.5s ease;
   margin-bottom: 50px;
   min-width: 150px;
   z-index: 99;
    position: relative;
    
}

#main-navigation {
    transition: all 0.5s ease;
}
#main-navigation.main-menu-hidden {
    width: 0% ;
}
.main-menu-hidden .main-menu-container {
    transform:translateY(-100%);
    opacity: 1;
}
.toggle-menu-button-container {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    transition: all 0.5s ease;
}

.toggle-menu-button:hover {
    background-color: rgba(0,0,0,0.7);


}
.toggle-menu-button {
    width: 100px;
    margin: 0 auto;
    text-align: center;
    border-radius: 0px 0px 50px 50px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.5s ease;
}
.toggle-menu-button img {
    max-height: 15px;
    margin-top: -5px;
    transform: scaleY(-1);
    transition: all 0.5s ease;
}
.main-menu-hidden .toggle-menu-button {
    margin-left: 50px;
}

.main-menu-hidden .toggle-menu-button img {
    transform: scaleY(1);
}
.main-menu-hidden .main-menu {
    display: none;

}
ul.main-menu, .main-menu li {
    list-style-type: none;
    margin: 0;
    padding: 0;

}
.main-menu li a {
    display: block;
    border-radius: 25px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 5px 15px;
    margin-bottom: 5px;
    width: 100%;
    color: rgba(255,255,255,1);
    font-family: var(--secondary-font-family);
    text-align: center;
    transition: all 0.5s ease;

}
.main-menu li a:hover {
    background-color: rgba(0,0,0,0.7);
    text-decoration: none;
    transform: scale(1.1);
    font-weight: 700;
}
.main-menu li a.menuActive {
    background-color: rgba(0,0,0,0.7);
    text-decoration: none;
   
    font-weight: 700;
}



/* Settings */
.settings_bg_img_select label img {
    opacity: 0.5;
    border-radius: 25px;
    transition: all 0.5s ease;
    border: 3px solid rgba(255,255,255,0);
}
.settings_bg_img_select input[type="radio"]:checked+ img {
    opacity: 1;
    border: 3px solid rgba(255,255,255,1);
}
.settings_bg_img_select label:hover img {
    opacity: 1;
    transform: scale(1.1);
}
.settings_bg_img_select {
    padding-top: 10px;
    padding-bottom: 10px;
}
.settings_bg_img_select input {
    display: none;
}

/* Planets Box */
.planet-box {
    background-size: cover;
    min-height: 200px;
    overflow: hidden;
    z-index: 99;
    transition: all 0.5s ease;
    opacity: 1;
    border: none;
    position: relative;
    text-decoration: none !important;
    
}
a:hover .planet-box {
    text-decoration: none;
}
.planet-box-small {
  min-height: 100px !important;
}

.planet-inactive {
  filter: grayscale(100%);
}
.planet-inactive:hover {
  filter: grayscale(0%);

}
.planet-box:hover {
    transform: scale(2);
    z-index: 9999;
    opacity: 1;
}

.planet-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
   border-radius: 15px;
}

.planet-box * {
    transition: all 0.5s ease;
    text-decoration: none !important;
    text-shadow: 0px 0px 12px #000000;
    color: rgba(255,255,255,1);
} 
.planet-box .planet-moon img {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: 0px solid rgba(255,255,255,0);
  box-shadow: 0px 0px 5px 0px rgba(255,255,255,0.75);
-webkit-box-shadow: 0px 0px 5px 0px rgba(255,255,255,0.75);
-moz-box-shadow: 0px 0px 5px 0px rgba(255,255,255,0.75);
position: relative;
}
.planet-box-small .planet-moon img {
  width: 20px;
  height: 20px;
  border-radius: 10px;
}
.planet-box .planet-moon:hover img {
  transform: scale(1.5);
  border: 1px solid rgba(255,255,255,1);
}
.planet-box .planet-moons {
  padding-bottom: 5px;
}
.planet-box .planet-moon-active img {
  border: 2px solid rgba(255,255,255,1);
}
.planet-url {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 99;
}
.planet-url-alert {
  border: 1px solid rgba(255, 90, 90, 0.75);
  border-radius: 14px;
  box-shadow: inset 0 0 18px rgba(255, 90, 90, 0.18), 0 0 10px rgba(255, 90, 90, 0.16);
  animation: planetAlertPulse 1.7s ease-in-out infinite;
}
.planet-url-alert + .planet-info .planet-name,
.planet-url-alert + .planet-info .planet-coords {
  color: #ff7a7a;
  text-shadow: 0 0 8px rgba(255, 90, 90, 0.28);
  animation: planetAlertTextPulse 1.7s ease-in-out infinite;
}
.planet-url-spy {
  border: 1px solid rgba(255, 214, 90, 0.75);
  border-radius: 14px;
  box-shadow: inset 0 0 18px rgba(255, 214, 90, 0.18), 0 0 10px rgba(255, 214, 90, 0.16);
  animation: planetSpyPulse 1.9s ease-in-out infinite;
}
.planet-url-spy + .planet-info .planet-name,
.planet-url-spy + .planet-info .planet-coords {
  color: #ffd66b;
  text-shadow: 0 0 8px rgba(255, 214, 90, 0.28);
  animation: planetSpyTextPulse 1.9s ease-in-out infinite;
}
@keyframes planetAlertPulse {
  0%, 100% {
    box-shadow: inset 0 0 10px rgba(255, 90, 90, 0.08), 0 0 8px rgba(255, 90, 90, 0.10);
    border-color: rgba(255, 90, 90, 0.45);
  }
  50% {
    box-shadow: inset 0 0 22px rgba(255, 90, 90, 0.22), 0 0 18px rgba(255, 90, 90, 0.34);
    border-color: rgba(255, 90, 90, 0.95);
  }
}
@keyframes planetAlertTextPulse {
  0%, 100% {
    color: #ffc2c2;
    text-shadow: 0 0 6px rgba(255, 90, 90, 0.18);
  }
  50% {
    color: #ff5a5a;
    text-shadow: 0 0 14px rgba(255, 90, 90, 0.42);
  }
}
@keyframes planetSpyPulse {
  0%, 100% {
    box-shadow: inset 0 0 10px rgba(255, 214, 90, 0.08), 0 0 8px rgba(255, 214, 90, 0.10);
    border-color: rgba(255, 214, 90, 0.45);
  }
  50% {
    box-shadow: inset 0 0 22px rgba(255, 214, 90, 0.22), 0 0 18px rgba(255, 214, 90, 0.34);
    border-color: rgba(255, 214, 90, 0.95);
  }
}
@keyframes planetSpyTextPulse {
  0%, 100% {
    color: #ffeab7;
    text-shadow: 0 0 6px rgba(255, 214, 90, 0.18);
  }
  50% {
    color: #ffd04d;
    text-shadow: 0 0 14px rgba(255, 214, 90, 0.42);
  }
}
.planet-moons-url {
  position: relative;
  z-index: 9999;
}
.planet-details, .planet-moon-details {
  width: 100%;
  padding: 10px;
  font-family: var(--secondary-font-family);
  font-size: 0.9em;
  font-weight: 700;
  margin-top: -100%;
  position: absolute;
  top: 0px;
  opacity: 0;
}

.planet-moon:hover .planet-moon-details, .planet-box:hover .planet-details {
  margin-top: -50%;
  opacity: 1;
}
.planet-moons:hover ~ .planet-details {
  margin-top: -100%;
  opacity: 0;
}

.planet-info {
    bottom: 5px;
    position: absolute;
    text-align: center;
    width: 100%;
   
    line-height: 1em;
    
    
}
.planet-coords {
  font-size: 0.7em;
}

.planet-box:hover .planet-name {
  font-weight: 700;
}

.planet-name {
    font-family: var(--secondary-font-family);
    font-size: 1.2em;
    transition: all 0.5s ease;
}
.planet-box-small:hover .planet-info {
    font-size: 0.7em;
}

/* ToolTip Notify */
#tooltipNotify {
    
    bottom: 1vh;
    z-index: 99999;
    top: auto;
    right: 1vw;
    left: auto !important;
}

/* Buttons */

  .uk-button {
    
  border-radius: 25px;
  background-color: rgba(0, 0, 0, 0.545);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 25px;
  margin-bottom: 5px;
 
  color: rgba(255,255,255,1);
  font-family: var(--secondary-font-family);
  font-weight: 700;
  text-align: center;
  transition: all 0.5s ease;
  font-size: 1.2em;
  }
  a.uk-button {
    color: rgba(255,255,255,1);
  }
  .uk-button:hover {
    background-color: rgba(0,0,0,0.5);
    color: rgba(255,255,255,1);
    transform: scale(1.1);
  }

  .uk-button-submit {
    background-color: rgba(21, 166, 31, 0.545);
  }

  /* Loading Screen */
  .spinner-box {
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
  }
  /* KEYFRAMES */

@keyframes spin {
    from {
      transform: rotate(0);
    }
    to{
      transform: rotate(359deg);
    }
  }
  
  @keyframes spin3D {
    from {
      transform: rotate3d(.5,.5,.5, 360deg);
    }
    to{
      transform: rotate3d(0deg);
    }
  }
  
  @keyframes configure-clockwise {
    0% {
      transform: rotate(0);
    }
    25% {
      transform: rotate(90deg);
    }
    50% {
      transform: rotate(180deg);
    }
    75% {
      transform: rotate(270deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  @keyframes configure-xclockwise {
    0% {
      transform: rotate(45deg);
    }
    25% {
      transform: rotate(-45deg);
    }
    50% {
      transform: rotate(-135deg);
    }
    75% {
      transform: rotate(-225deg);
    }
    100% {
      transform: rotate(-315deg);
    }
  }
  
  @keyframes pulse {
    from {
      opacity: 1;
      transform: scale(1);
    }
    to {
      opacity: .25;
      transform: scale(.75);
    }
  }
  
  /* GRID STYLING */
 

  .leo {
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
  }
  
  .blue-orbit {
      width: 165px;
      height: 165px;
    border: 1px solid #91daffa5;
    -webkit-animation: spin3D 3s linear .2s infinite;
  }
  
  .green-orbit {
      width: 120px;
      height: 120px;
    border: 1px solid #91ffbfa5;
    -webkit-animation: spin3D 2s linear 0s infinite;
  }
  
  .red-orbit {
      width: 90px;
      height: 90px;
    border: 1px solid #ffca91a5;
    -webkit-animation: spin3D 1s linear 0s infinite;
  }
  
  .white-orbit {
      width: 60px;
      height: 60px;
    border: 2px solid #ffffff;
    -webkit-animation: spin3D 10s linear 0s infinite;
  }
  
  .w1 {
    transform: rotate3D(1, 1, 1, 90deg);
  }
  
  .w2 {
    transform: rotate3D(1, 2, .5, 90deg);
  }
  
  .w3 {
    transform: rotate3D(.5, 1, 2, 90deg);
  }
  
  .three-quarter-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #fb5b53;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin .5s linear 0s infinite;
  }

  .uk-grid-small > * {
    padding: 5px;
    margin-top: 0px;
  }
  .uk-grid-small,
.uk-grid-column-small {
  margin-left: -5px;
}

body#tinymce.mcecontentbody {
background: white;
}

body.mceContentBody {
background: #fff;
}

.station-action-popover {
  min-width: 280px;
  color: #13202b;
  background: linear-gradient(155deg, #eff2f6 0%, #d8dde4 55%, #c4ccd6 100%);
  border: 1px solid #aeb7c3;
  border-radius: 10px;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 14px rgba(0,0,0,0.3);
}

.station-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.station-action-title {
  font-weight: 700;
  color: #1b2935;
}

.station-action-name {
  margin-top: 2px;
  margin-bottom: 7px;
  color: #2f3e4d;
  font-size: 12px;
}

.station-action-close {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #7f8a99;
  background: #e8ecf2;
  color: #1b2935;
  font-size: 10px;
  line-height: 16px;
  padding: 0;
  cursor: pointer;
}

.station-share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.station-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  padding: 2px 4px;
}

.station-share-btn.is-buyable {
  background: #ffffff;
  border: 1px solid #9aa6b5;
  color: #1f2f3f;
}

.station-share-btn.is-taken {
  background: #b8c0cb;
  border: 1px solid #95a0ae;
  color: #3f4a57;
}

.station-share-btn.is-own {
  background: #8ab7db;
  border: 1px solid #5f95c1;
  color: #10283c;
}

.station-share-btn.is-takeover {
  background: #db5b5b;
  border: 1px solid #a63c3c;
  color: #ffffff;
}

.station-share-btn.is-pulse {
  background: #32d679;
  border-color: #1fa35a;
  color: #ffffff;
  animation: stationBuyPulse 1.2s ease-in-out infinite;
}

@keyframes stationBuyPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(30, 173, 94, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(30, 173, 94, 0);
  }
}

.station-share-note {
  margin-top: 7px;
  color: #149a47;
  font-size: 11px;
  font-weight: 700;
}

.station-share-disabled {
  margin-top: 5px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #c6ccd5;
  border: 1px solid #9da8b6;
  color: #27394b;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.station-action-links {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

.station-link {
  flex: 1;
  text-align: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 6px;
  text-decoration: none;
}

.station-link-details {
  color: #202e3c;
  background: #d7dee8;
  border: 1px solid #9ca8b8;
}

.station-link-missions {
  color: #103247;
  background: #bfe8ff;
  border: 1px solid #72a8c5;
}

/* Overview: DEFCON + Breaking News ticker (ported from NextGen runtime behavior) */
body#overview .defcon-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

body#overview .defcon-level-5 {
  color: #7cff9f;
  border-color: rgba(124, 255, 159, 0.6);
  background: rgba(20, 90, 35, 0.35);
}

body#overview .defcon-level-4 {
  color: #fff08d;
  border-color: rgba(255, 240, 141, 0.65);
  background: rgba(130, 105, 10, 0.35);
}

body#overview .defcon-level-3 {
  color: #ffbf7f;
  border-color: rgba(255, 191, 127, 0.65);
  background: rgba(120, 55, 10, 0.35);
}

body#overview .defcon-level-2 {
  color: #ff8b8b;
  border-color: rgba(255, 139, 139, 0.8);
  background: rgba(120, 12, 12, 0.42);
  box-shadow: 0 0 14px rgba(255, 50, 50, 0.45);
  animation: defconPulseSoft 1.45s ease-in-out infinite;
}

body#overview .defcon-level-1 {
  color: #ffd3d3;
  border-color: rgba(255, 65, 65, 0.9);
  background: rgba(120, 0, 0, 0.55);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.7);
  animation: defconPulseHard 0.95s ease-in-out infinite;
}

@keyframes defconPulseSoft {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 64, 64, 0.32);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 64, 64, 0.7);
    filter: brightness(1.2);
  }
}

@keyframes defconPulseHard {
  0%,
  100% {
    box-shadow: 0 0 9px rgba(255, 0, 0, 0.35);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 26px rgba(255, 0, 0, 0.95);
    filter: brightness(1.3);
  }
}

body#overview .overview-news-outer {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

body#overview .overview-news-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 10px;
}

body#overview .overview-news-label {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ff9a9a;
  text-shadow: 0 0 8px rgba(255, 55, 55, 0.4);
}

body#overview .overview-news-ticker {
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

body#overview .overview-news-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: overviewNewsTicker 95s linear infinite;
}

body#overview .overview-news-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.92);
  margin-right: 34px;
}

body#overview .overview-news-item strong {
  color: #ffd9d9;
  margin-right: 6px;
}

body#overview .overview-news-ticker-wrap:hover .overview-news-track {
  animation-play-state: paused;
}

body#overview .overview-news-desktop {
  display: flex;
}

body#overview .overview-news-mobile {
  display: none;
}

@keyframes overviewNewsTicker {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 991px) {
  body#overview .overview-news-desktop {
    display: none !important;
  }

  body#overview .overview-news-mobile {
    display: block !important;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  body#overview .overview-news-mobile summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
  }

  body#overview .overview-news-mobile summary::-webkit-details-marker {
    display: none;
  }

  body#overview .overview-news-mobile-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
  }

  body#overview .overview-news-mobile-list {
    padding: 0 10px 8px;
  }

  body#overview .overview-news-mobile-item {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.92);
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

body#overview .overview-news-mobile-item strong {
  color: #ffd9d9;
}
}

/* Overview queue styles */
body#overview .overview-queue-table td {
  vertical-align: middle;
  padding-top: 10px;
  padding-bottom: 10px;
}

body#overview .overview-queue-title-cell {
  color: rgba(220, 232, 255, 0.9);
  font-weight: 600;
}

body#overview .overview-queue-link {
  color: #b9ceff;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(120, 160, 255, 0.25);
  font-size: 0.86rem;
}

body#overview .overview-queue-link:hover {
  color: #d7e4ff;
}

body#overview .overview-queue-status-cell {
  color: rgba(255, 255, 255, 0.96);
}

body#overview .overview-queue-status {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 9px;
}

body#overview .overview-queue-status-free {
  color: #8affb5;
  background: rgba(16, 88, 54, 0.28);
  border-color: rgba(108, 255, 175, 0.38);
  text-shadow: 0 0 8px rgba(80, 255, 160, 0.25);
}

body#overview .overview-queue-status-active {
  color: #ffd3d3;
  background: rgba(88, 16, 16, 0.35);
  border-color: rgba(255, 125, 125, 0.45);
  box-shadow: 0 0 10px rgba(255, 75, 75, 0.16);
}

body#overview .overview-queue-tech {
  font-weight: 600;
  font-size: 0.8rem;
}

body#overview .overview-queue-timer {
  font-size: 0.7rem;
  color: rgba(255, 214, 214, 0.95);
  line-height: 1.2;
}

body#overview .overview-credit-net {
  display: inline-block;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}

body#overview .overview-credit-net.is-positive {
  color: #89ffb5;
  border-color: rgba(108, 255, 175, 0.42);
  background: rgba(12, 70, 44, 0.3);
}

body#overview .overview-credit-net.is-negative {
  color: #ff9696;
  border-color: rgba(255, 110, 110, 0.44);
  background: rgba(88, 22, 22, 0.32);
}

/* Messages stacked view styles */
#messages .messages-stacked-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#messages .messages-category-block {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(10, 20, 35, 0.36);
}

#messages .messages-category-header {
  width: 100%;
  border: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(26, 42, 65, 0.88) 0%, rgba(13, 24, 39, 0.9) 100%);
  text-align: left;
}

#messages .messages-category-header::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(190, 210, 255, 0.9);
  border-bottom: 2px solid rgba(190, 210, 255, 0.9);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

#messages .messages-category-block:not(.is-expanded) .messages-category-header::after {
  transform: rotate(-45deg);
}

#messages .messages-category-block:not(.is-expanded) .messages-category-body {
  display: none;
}

#messages .messages-category-block.has-unread.is-pulsing {
  border-color: rgba(120, 190, 255, 0.9);
  box-shadow: 0 0 0 0 rgba(95, 175, 255, 0.55);
  animation: messagesCategoryPulse 0.9s ease-in-out infinite;
}

@keyframes messagesCategoryPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(90, 170, 255, 0.45), 0 0 14px rgba(75, 150, 255, 0.35);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(90, 170, 255, 0), 0 0 24px rgba(80, 165, 255, 0.85);
    filter: brightness(1.18);
  }
}

#messages .messages-category-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#messages .messages-category-count {
  color: rgba(220, 232, 255, 0.94);
  font-weight: 700;
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

#messages .messages-category-body {
  padding: 2px 10px 10px;
}

#messages .message-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(5, 12, 22, 0.55);
  margin-top: 8px;
}

#messages .message-card:last-child {
  margin-bottom: 0;
}

#messages .message-card.mes_unread {
  border-color: rgba(112, 177, 255, 0.62);
}

#messages .message-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.74rem;
  color: rgba(185, 205, 238, 0.9);
  margin-bottom: 6px;
}

#messages .message-meta-label {
  color: rgba(150, 184, 234, 0.9);
  font-weight: 700;
}

#messages .message-card-subject {
  color: rgba(231, 240, 255, 0.96);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

#messages .message-card-text {
  color: rgba(231, 240, 255, 0.93);
  font-size: 0.8rem;
  line-height: 1.35;
}

#messages .message-card-text,
#messages .message-card-text * {
  max-width: 100%;
}

#messages .message-card-text a {
  color: #9fd0ff !important;
  text-decoration: underline;
  word-break: break-word;
}

#messages .message-card-text a:hover {
  color: #c5e3ff !important;
}

#messages .message-card-text .planet-url,
#messages .message-card-text .planet-moons-url,
#messages .message-card-text a.planet-url,
#messages .message-card-text a.planet-moons-url {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

#messages .message-card-actions {
  margin-top: 8px;
  text-align: right;
}

#messages .messages-empty {
  color: rgba(214, 226, 245, 0.86);
  text-align: center;
  padding: 10px 8px;
}

@media (max-width: 991px) {
  body#overview .overview-queue-status-cell {
    text-align: left !important;
  }

  body#overview .overview-queue-status {
    align-items: flex-start;
  }

  body#overview .overview-queue-link {
    font-size: 0.8rem;
  }

  body#overview .overview-queue-tech {
    font-size: 0.74rem;
  }

  body#overview .overview-queue-timer {
    font-size: 0.66rem;
  }

  #messages .messages-category-header {
    padding: 9px 10px;
  }

  #messages .messages-category-title {
    font-size: 0.86rem;
  }

  #messages .message-card {
    padding: 8px 8px;
  }

  #messages .message-card-meta {
    flex-direction: column;
    gap: 4px;
  }

  #messages .message-card-text {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  #messages .message-card-text * {
    max-width: 100% !important;
    box-sizing: border-box;
    white-space: normal !important;
  }

  #messages .message-card-text table,
  #messages .message-card-text tr,
  #messages .message-card-text td,
  #messages .message-card-text th,
  #messages .message-card-text span,
  #messages .message-card-text font,
  #messages .message-card-text b,
  #messages .message-card-text strong {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #messages .message-card-text a {
    display: inline-block;
    max-width: 100%;
  }

  #messages .messages-empty {
    font-size: 0.78rem;
  }
}

/* Shop & Abos page */
body#subscriptions .shop-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body#subscriptions .shop-intro {
  border: 1px solid rgba(143, 193, 255, 0.28);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(13, 26, 42, 0.85), rgba(7, 14, 24, 0.9));
}

body#subscriptions .shop-title {
  margin: 0;
  font-size: 1.05rem;
  color: #e3f2ff;
}

body#subscriptions .shop-subtitle {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: rgba(210, 229, 249, 0.85);
}

body#subscriptions .shop-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body#subscriptions .shop-panel {
  border: 1px solid rgba(132, 181, 245, 0.24);
  border-radius: 10px;
  padding: 10px;
  background: rgba(6, 13, 22, 0.72);
}

body#subscriptions .shop-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

body#subscriptions .shop-panel-head h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #d7ebff;
}

body#subscriptions .shop-pill {
  border: 1px solid rgba(130, 238, 192, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8ff6ca;
  background: rgba(15, 64, 42, 0.45);
}

body#subscriptions .shop-pill.is-soft {
  color: #b8d8ff;
  border-color: rgba(126, 176, 255, 0.44);
  background: rgba(16, 39, 70, 0.48);
}

body#subscriptions .shop-pill.is-warning {
  color: #ffe39e;
  border-color: rgba(255, 202, 98, 0.45);
  background: rgba(81, 57, 11, 0.5);
}

body#subscriptions .shop-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body#subscriptions .shop-card {
  border: 1px solid rgba(140, 186, 255, 0.2);
  border-radius: 8px;
  padding: 8px 9px;
  background: linear-gradient(160deg, rgba(18, 33, 52, 0.62), rgba(8, 16, 26, 0.78));
}

body#subscriptions .shop-card-name {
  color: #f0f7ff;
  font-size: 0.83rem;
  font-weight: 700;
}

body#subscriptions .shop-impact-badge {
  display: inline-flex;
  margin-top: 5px;
  border: 1px solid rgba(124, 244, 201, 0.5);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #8ff0c9;
  background: rgba(16, 64, 49, 0.45);
}

body#subscriptions .shop-sub-badge {
  color: #a8d4ff;
  border-color: rgba(130, 180, 255, 0.5);
  background: rgba(20, 44, 81, 0.5);
}

body#subscriptions .shop-card-price {
  margin-top: 4px;
  color: #9dd6ff;
  font-size: 0.75rem;
  font-weight: 700;
}

body#subscriptions .shop-card-credits {
  margin-top: 2px;
  color: #90efc5;
  font-size: 0.74rem;
}

body#subscriptions .shop-card-note {
  margin-top: 4px;
  color: rgba(211, 228, 246, 0.82);
  font-size: 0.72rem;
  line-height: 1.25;
}

body#subscriptions .shop-feature-list {
  margin: 7px 0 0;
  padding-left: 16px;
  color: rgba(216, 232, 248, 0.88);
  font-size: 0.72rem;
}

body#subscriptions .shop-feature-list li {
  margin-bottom: 3px;
}

body#subscriptions .shop-strategy-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(220, 234, 250, 0.9);
  font-size: 0.78rem;
}

body#subscriptions .shop-strategy-list li {
  margin-bottom: 4px;
}

body#subscriptions .shop-note {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: rgba(188, 212, 238, 0.9);
}

/* Economy-Panel */
body#subscriptions .shop-economy-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
body#subscriptions .shop-economy-left {
  flex: 1 1 180px;
}
body#subscriptions .shop-economy-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  flex: 2 1 260px;
}
body#subscriptions .shop-econ-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 120px;
  border: 1px solid rgba(120, 180, 255, 0.18);
  border-radius: 7px;
  padding: 5px 9px;
  background: rgba(10, 22, 40, 0.5);
}
body#subscriptions .shop-econ-stat.shop-econ-player {
  border-color: rgba(140, 255, 200, 0.28);
  background: rgba(10, 35, 28, 0.55);
}
body#subscriptions .shop-econ-label {
  font-size: 0.65rem;
  color: rgba(160, 200, 240, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body#subscriptions .shop-econ-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #9dd6ff;
  font-family: 'Orbitron', monospace;
}
body#subscriptions .shop-econ-val.shop-econ-live {
  color: #8ff6ca;
}
body#subscriptions .shop-econ-age {
  font-size: 0.62rem;
  color: rgba(160, 190, 220, 0.5);
  width: 100%;
  padding-top: 2px;
}

/* Wert-Vergleich Tabelle */
body#subscriptions .shop-value-panel {
  overflow: hidden;
}
body#subscriptions .shop-value-table-wrap {
  overflow-x: auto;
}
body#subscriptions .shop-value-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
body#subscriptions .shop-value-table thead th {
  padding: 5px 8px;
  color: rgba(160, 200, 240, 0.75);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(120, 170, 230, 0.2);
  text-align: left;
  white-space: nowrap;
}
body#subscriptions .shop-value-table tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.1);
  color: rgba(220, 235, 250, 0.9);
  vertical-align: middle;
}
body#subscriptions .shop-vt-row:hover td {
  background: rgba(20, 40, 70, 0.4);
}
body#subscriptions .shop-vt-abo td {
  background: rgba(12, 25, 45, 0.3);
}
body#subscriptions .shop-vt-name {
  font-weight: 600;
  color: #e3f2ff;
  white-space: nowrap;
}
body#subscriptions .shop-vt-price {
  color: #9dd6ff;
  white-space: nowrap;
}
body#subscriptions .shop-vt-credits {
  color: #8ff0c9;
  font-weight: 600;
  white-space: nowrap;
}
body#subscriptions .shop-vt-impact {
  color: rgba(210, 228, 246, 0.85);
  font-size: 0.74rem;
  white-space: nowrap;
}
body#subscriptions .shop-eff-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
body#subscriptions .shop-eff-einmal {
  color: #b8d4ff;
  border: 1px solid rgba(130, 180, 255, 0.4);
  background: rgba(20, 44, 81, 0.45);
}
body#subscriptions .shop-eff-abo {
  color: #8ff6ca;
  border: 1px solid rgba(100, 240, 180, 0.4);
  background: rgba(10, 55, 38, 0.5);
}

/* Karten-Verbesserungen */
body#subscriptions .shop-card-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 4px;
}
body#subscriptions .shop-card-eff {
  margin-top: 3px;
  font-size: 0.7rem;
  color: rgba(180, 215, 250, 0.75);
}
body#subscriptions .shop-eff-abo-val {
  color: rgba(140, 246, 200, 0.8);
}
body#subscriptions .shop-buy-btn {
  margin-top: 8px;
  width: 100%;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid rgba(120, 170, 230, 0.35);
  background: rgba(20, 40, 70, 0.55);
  color: rgba(180, 210, 240, 0.6);
  font-size: 0.72rem;
  cursor: not-allowed;
  transition: opacity 0.2s;
}

@media (max-width: 991px) {
  body#subscriptions .shop-columns {
    grid-template-columns: 1fr;
  }
  body#subscriptions .shop-economy-panel {
    flex-direction: column;
  }
}

/* ============================================================
   STELLAR NEXUS — Theme Overrides & Sci-Fi Enhancements
   These rules apply the design variables to all core components
   and add new visual elements. They cascade over legacy rules.
   ============================================================ */

/* --- Global Typography --- */
html, body {
    font-family: var(--sn-font-body) !important;
    color: var(--sn-text-primary);
}

/* Light theme: tinted body overlay over the space background */
html[data-theme="light"] body {
    background-color: var(--sn-body-overlay);
}

a {
    color: var(--sn-text-link);
    transition: color 0.18s ease;
}
a:hover {
    color: var(--sn-text-link-hover);
}

/* Headings: Orbitron for h1-h3, Rajdhani for h4-h6 */
h1, h2, h3,
.uk-h1, .uk-h2, .uk-h3,
.uk-heading-large, .uk-heading-medium, .uk-heading-xlarge {
    font-family: var(--sn-font-display) !important;
    color: var(--sn-text-heading) !important;
    letter-spacing: 0.05em;
}
h4, h5, h6,
.uk-h4, .uk-h5, .uk-h6 {
    font-family: var(--sn-font-heading) !important;
    color: var(--sn-text-heading) !important;
    letter-spacing: 0.03em;
}

/* --- Panels — dark-blur-bg becomes theme-aware --- */
.dark-blur-bg {
    background: var(--sn-bg-panel) !important;
    border: 1px solid var(--sn-border-subtle);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--sn-text-primary) !important;
    box-shadow: var(--sn-shadow-sm);
}

.box-border {
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-chrome) !important;
    border-radius: var(--sn-border-radius-lg) !important;
    color: var(--sn-text-primary);
    box-shadow: var(--sn-shadow-panel);
}

/* --- Top Bar --- */
.top-bar {
    background: var(--sn-bg-topbar) !important;
    border-bottom: 1px solid var(--sn-border-chrome) !important;
    box-shadow: 0 1px 0 var(--sn-cyan-dim), 0 4px 18px rgba(0, 0, 0, 0.38);
    height: 52px;
}
.top-bar .uk-navbar-nav > li > a {
    color: var(--sn-chrome) !important;
    transition: color 0.18s ease, text-shadow 0.18s ease;
    font-family: var(--sn-font-heading) !important;
    font-size: 1.25em;
    min-height: 52px;
}
.top-bar .uk-navbar-nav > li > a:hover {
    color: var(--sn-cyan) !important;
    text-shadow: var(--sn-cyan-glow);
}
.top-bar .uk-navbar-nav .uk-active > a,
.top-bar .uk-navbar-nav > li.text-danger > a {
    color: var(--sn-status-danger) !important;
}

/* Menu container (resource bar) */
.menu-container {
    border-bottom: 1px solid var(--sn-border-chrome) !important;
    background: var(--sn-bg-topbar) !important;
}

/* --- Sidebar Navigation --- */
.main-menu-container {
    background: var(--sn-bg-nav) !important;
    border: 1px solid var(--sn-border-subtle) !important;
    border-top: none !important;
    border-radius: 0 0 var(--sn-border-radius-lg) var(--sn-border-radius-lg) !important;
    box-shadow: var(--sn-shadow-md);
}

.main-menu li a {
    background: transparent !important;
    border: 1px solid var(--sn-border-subtle) !important;
    border-radius: var(--sn-border-radius) !important;
    color: var(--sn-chrome) !important;
    font-family: var(--sn-font-heading) !important;
    font-size: 0.92em;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 12px;
    margin-bottom: 4px;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.main-menu li a:hover {
    background: rgba(0, 212, 255, 0.05) !important;
    border-color: var(--sn-border-active) !important;
    color: var(--sn-text-heading) !important;
    text-shadow: 0 0 8px var(--sn-cyan-dim);
    box-shadow: 0 0 10px var(--sn-cyan-dim);
    transform: none !important;
}
.main-menu li a.menuActive {
    background: rgba(0, 212, 255, 0.08) !important;
    border-color: var(--sn-border-active) !important;
    color: var(--sn-cyan) !important;
    text-shadow: 0 0 7px var(--sn-cyan-dim);
    box-shadow: 0 0 12px var(--sn-cyan-dim);
    font-weight: 700;
}

/* Toggle button */
.toggle-menu-button {
    background: var(--sn-bg-panel) !important;
    border-color: var(--sn-border-subtle) !important;
    border-radius: 0 0 50px 50px !important;
}
.toggle-menu-button:hover {
    background: var(--sn-bg-panel-hover) !important;
    border-color: var(--sn-border-chrome) !important;
}

/* --- Resource Slots --- */
.resource {
    border-color: var(--sn-border-main) !important;
    background: var(--sn-bg-panel) !important;
}
.resource:hover {
    border-color: var(--sn-border-active) !important;
    background: var(--sn-bg-panel-hover) !important;
    box-shadow: inset 0 0 0 1px rgba(200, 240, 255, 0.1), 0 8px 22px rgba(0, 0, 0, 0.36), var(--sn-cyan-glow) !important;
}
.resource-name {
    font-family: var(--sn-font-heading) !important;
    color: var(--sn-chrome-bright) !important;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.res_current {
    color: var(--sn-text-primary) !important;
    font-family: var(--sn-font-mono) !important;
    font-size: 12px;
}
html[data-theme="light"] .resource {
    background: var(--sn-bg-panel) !important;
    border-color: var(--sn-border-main) !important;
}

/* --- Navbar (UIKit overrides) --- */
.uk-navbar-item, .uk-navbar-nav > li > a, .uk-navbar-toggle {
    font-family: var(--sn-font-heading) !important;
    color: var(--sn-chrome) !important;
}
.uk-navbar-nav .uk-active > a {
    color: var(--sn-cyan) !important;
    text-shadow: var(--sn-cyan-glow);
}

/* --- Tables --- */
table {
    background: var(--sn-bg-panel) !important;
    color: var(--sn-text-primary) !important;
}
.table-gow {
    background: var(--sn-bg-panel) !important;
}
.table-gow td, .table-gow th {
    border-color: var(--sn-border-subtle) !important;
    color: var(--sn-chrome-bright) !important;
}
.table-gow a {
    color: var(--sn-text-link) !important;
}
.table-gow button, .table-gow select, .table-gow input {
    color: var(--sn-text-primary) !important;
    background: var(--sn-bg-input) !important;
    border-color: var(--sn-border-subtle) !important;
}

/* --- Inputs, Selects --- */
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
select,
textarea {
    background: var(--sn-bg-input) !important;
    color: var(--sn-text-primary) !important;
    border: 1px solid var(--sn-border-main) !important;
    border-radius: var(--sn-border-radius) !important;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--sn-border-active) !important;
    box-shadow: 0 0 0 2px var(--sn-cyan-dim) !important;
    outline: none;
}

/* --- Buttons --- */
.uk-button {
    background: var(--sn-bg-panel) !important;
    border: 1px solid var(--sn-border-main) !important;
    color: var(--sn-chrome-bright) !important;
    font-family: var(--sn-font-heading) !important;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: var(--sn-border-radius) !important;
    transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.uk-button:hover {
    background: rgba(0, 212, 255, 0.06) !important;
    border-color: var(--sn-border-active) !important;
    color: var(--sn-cyan) !important;
    box-shadow: var(--sn-cyan-glow) !important;
    transform: none !important;
}
.uk-button-submit {
    border-color: rgba(74, 232, 122, 0.50) !important;
    color: var(--sn-status-ok) !important;
    background: rgba(74, 232, 122, 0.06) !important;
}
.uk-button-submit:hover {
    background: rgba(74, 232, 122, 0.12) !important;
    box-shadow: 0 0 12px rgba(74, 232, 122, 0.32) !important;
    color: var(--sn-status-ok) !important;
    border-color: rgba(74, 232, 122, 0.80) !important;
}

/* --- Legacy Buttons (formate.css) --- */
.button-upgrade {
    background: rgba(74, 232, 122, 0.14) !important;
    border-color: rgba(74, 232, 122, 0.42) !important;
    color: var(--sn-status-ok) !important;
    border-radius: var(--sn-border-radius) !important;
}
.button-upgrade:hover {
    background: rgba(74, 232, 122, 0.24) !important;
    box-shadow: 0 0 8px rgba(74, 232, 122, 0.28);
}
.button-downgrade {
    background: rgba(240, 72, 72, 0.14) !important;
    border-color: rgba(240, 72, 72, 0.42) !important;
    color: var(--sn-status-danger) !important;
    border-radius: var(--sn-border-radius) !important;
}
.button-upgrade-disabled {
    background: var(--sn-bg-panel) !important;
    border-color: var(--sn-border-subtle) !important;
    color: var(--sn-text-muted) !important;
    border-radius: var(--sn-border-radius) !important;
}
.button-blue {
    background: var(--sn-bg-panel) !important;
    border-color: var(--sn-border-main) !important;
    color: var(--sn-text-link) !important;
}
.button-blue:hover {
    border-color: var(--sn-border-active) !important;
    color: var(--sn-cyan) !important;
}

/* --- Building Items --- */
.buildItemSmall {
    border-color: var(--sn-border-main) !important;
    background: var(--sn-bg-panel) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.buildItemSmall:hover {
    border-color: var(--sn-gold) !important;
    box-shadow: var(--sn-gold-glow) !important;
}
.queueItemFirst {
    border-color: var(--sn-border-main) !important;
    background: var(--sn-bg-panel) !important;
}

/* --- Tooltips --- */
.tooltip-inner {
    background: var(--sn-bg-topbar) !important;
    border: 1px solid var(--sn-border-chrome) !important;
    color: var(--sn-text-primary) !important;
    font-family: var(--sn-font-body);
    backdrop-filter: blur(10px);
    font-size: 12px !important;
    max-width: 420px !important;
}

/* --- Fleet Items — legacy classes, kept for compat but visually replaced by .sn-fleet-* --- */
.fleetWrapper {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.fleetRow {
    background: transparent !important;
    border: none !important;
    border-top: 1px solid var(--sn-border-subtle) !important;
    color: var(--sn-text-primary) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- Status Colors (game) — theme-aware --- */
.color-green  { color: var(--sn-status-ok)     !important; }
.color-red, .text-red    { color: var(--sn-status-danger)  !important; }
.color-blue, .text-blue   { color: var(--sn-status-info)   !important; }
.text-yellow, .color-yellow { color: var(--sn-status-warn) !important; }
.color-gray, .text-gray   { color: var(--sn-text-muted)    !important; }
.color-white              { color: var(--sn-chrome-highlight) !important; }

/* --- Overview: planet border — chrome gradient --- */
.overview-planet {
    border-image-source: linear-gradient(
        45deg,
        var(--sn-cyan),
        var(--sn-chrome),
        var(--sn-cyan),
        var(--sn-chrome)
    ) !important;
}

/* --- Footer --- */
.footer-container {
    background: var(--sn-bg-topbar) !important;
    border-color: var(--sn-border-chrome) !important;
}
.mobile-footer-info-btn {
    background: var(--sn-bg-topbar) !important;
    border-color: var(--sn-border-chrome) !important;
    color: var(--sn-chrome-bright) !important;
    box-shadow: var(--sn-shadow-sm);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--sn-bg-nav); }
::-webkit-scrollbar-thumb { background: var(--sn-border-chrome); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sn-chrome); }

/* --- UI tabs / state (jQuery UI) --- */
.ui-state-default {
    background: var(--sn-bg-nav) !important;
    border-color: var(--sn-border-main) !important;
    color: var(--sn-text-secondary) !important;
}
.ui-state-hover {
    background: var(--sn-bg-panel-hover) !important;
    border-color: var(--sn-border-active) !important;
    color: var(--sn-text-heading) !important;
}
.ui-tabs {
    border-color: var(--sn-border-subtle) !important;
    background: var(--sn-bg-panel) !important;
}

/* --- Popovers --- */
.popover {
    background: var(--sn-bg-panel) !important;
    border: 1px solid var(--sn-border-chrome) !important;
    box-shadow: var(--sn-shadow-md) !important;
}
.popover-body { color: var(--sn-text-primary); }

/* --- HUD Panel — new sci-fi component --- */
.hud-panel {
    position: relative;
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    box-shadow: var(--sn-shadow-panel);
    color: var(--sn-text-primary);
    padding: 16px;
}
/* Top-left + top-right corner brackets */
.hud-panel::before, .hud-panel::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--sn-cyan);
    border-style: solid;
    pointer-events: none;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}
.hud-panel::before {
    top: -1px; left: -1px;
    border-width: 2px 0 0 2px;
    border-radius: 2px 0 0 0;
}
.hud-panel::after {
    top: -1px; right: -1px;
    border-width: 2px 2px 0 0;
    border-radius: 0 2px 0 0;
}
.hud-panel:hover::before,
.hud-panel:hover::after {
    opacity: 1;
}

/* HUD title bar */
.hud-title {
    font-family: var(--sn-font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sn-chrome-bright);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--sn-border-subtle);
}

/* HUD accent line (top shimmer) */
.hud-panel-accent {
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-cyan-dim), transparent);
    pointer-events: none;
    opacity: 0.7;
}

/* --- Theme Switcher Widget --- */
.theme-switcher {
    position: fixed;
    top: 62px;
    right: 10px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px;
    background: var(--sn-bg-topbar);
    border: 1px solid var(--sn-border-chrome);
    border-radius: 10px;
    box-shadow: var(--sn-shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.ts-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--sn-border-subtle);
    border-radius: 5px;
    background: transparent;
    color: var(--sn-chrome);
    font-size: 9px;
    font-family: var(--sn-font-display);
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    text-transform: uppercase;
}
.ts-btn:hover {
    border-color: var(--sn-border-active);
    color: var(--sn-cyan);
    background: rgba(0, 212, 255, 0.06);
}
.ts-btn.ts-active {
    border-color: var(--sn-border-active);
    color: var(--sn-cyan);
    background: rgba(0, 212, 255, 0.12);
    box-shadow: 0 0 7px var(--sn-cyan-dim);
}

/* --- Desktop Layout Enhancements --- */

/* UIKit container: expand beyond the default ~1200px cap */
.uk-container {
    max-width: 1700px !important;
    padding-left:  clamp(12px, 2vw, 40px) !important;
    padding-right: clamp(12px, 2vw, 40px) !important;
}
@media (min-width: 1920px) {
    .uk-container {
        max-width: 92vw !important;
    }
}

@media (min-width: 1400px) {
    .center-content-box {
        padding-top: 48px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .main-menu-container {
        min-width: 170px;
    }
    .main-menu li a {
        font-size: 1em;
        padding: 8px 14px;
    }
}
@media (min-width: 1600px) {
    .center-content-box {
        padding-left: 28px;
        padding-right: 28px;
    }
    .main-menu-container {
        min-width: 185px;
    }
}
@media (min-width: 1920px) {
    .center-content-box {
        padding-left: 36px;
        padding-right: 36px;
        padding-top: 54px;
    }
    .main-menu-container {
        min-width: 200px;
    }
    .main-menu li a {
        font-size: 1.08em;
        padding: 9px 16px;
    }
}

/* ============================================================
   LIGHT THEME — Special Overrides
   Ensures readability on steel-silver panels
   ============================================================ */

/* Body tint over space background */
html[data-theme="light"] body {
    background-color: var(--sn-body-overlay);
}

/* Footer links: override hardcoded text-white for light theme */
html[data-theme="light"] .footer-container,
html[data-theme="light"] .footer-container a,
html[data-theme="light"] .footer-container a.text-white,
html[data-theme="light"] .footer-container span,
html[data-theme="light"] .footer-container .color-red {
    color: var(--sn-text-primary) !important;
}
html[data-theme="light"] .footer-container a:hover {
    color: var(--sn-cyan) !important;
    text-decoration: underline;
}
html[data-theme="light"] .footer-container {
    border-color: var(--sn-border-chrome) !important;
}
html[data-theme="light"] .mobile-footer-info-btn {
    color: var(--sn-text-primary) !important;
}

/* Headings stay dark on silver */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
    color: var(--sn-text-heading) !important;
}

/* Tables in light theme */
html[data-theme="light"] table {
    background: var(--sn-bg-panel) !important;
    color: var(--sn-text-primary) !important;
}
html[data-theme="light"] .table-gow td,
html[data-theme="light"] .table-gow th {
    color: var(--sn-chrome-bright) !important;
    border-color: var(--sn-border-subtle) !important;
}

/* Input/selects readability */
html[data-theme="light"] input:not([type="radio"]):not([type="checkbox"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color: var(--sn-text-primary) !important;
    background: var(--sn-bg-input) !important;
    border-color: var(--sn-border-main) !important;
}

/* ============================================================
   OVERVIEW PAGE — HUD-style redesign
   ============================================================ */

/* --- Info Strip (horizontal stat bar) --- */
.ov-info-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--sn-border-subtle);
    border: 1px solid var(--sn-border-chrome);
    border-radius: var(--sn-border-radius);
    overflow: hidden;
    margin-bottom: 10px;
}
.ov-stat {
    background: var(--sn-bg-panel);
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background 0.18s ease;
    position: relative;
}
.ov-stat::after {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-cyan-dim), transparent);
    opacity: 0.5;
}
.ov-stat:hover {
    background: var(--sn-bg-panel-hover);
}
.ov-stat-label {
    font-family: var(--sn-font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--sn-text-muted);
}
.ov-stat-value {
    font-family: var(--sn-font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sn-chrome-bright);
}
.ov-stat-value a {
    color: var(--sn-chrome-bright);
    text-decoration: none;
}
.ov-stat-value a:hover {
    color: var(--sn-cyan);
}
.ov-stat-ok {
    color: var(--sn-status-ok) !important;
    text-shadow: 0 0 8px rgba(74, 232, 122, 0.3);
}
.ov-stat-sub {
    font-family: var(--sn-font-body);
    font-size: 0.65rem;
    color: var(--sn-text-muted);
}

/* --- Planet Section --- */
.ov-planet-section {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    margin-bottom: 10px;
    align-items: start;
}
.ov-planet-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    padding: 12px 10px;
    position: relative;
}
.ov-planet-hero::before, .ov-planet-hero::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    border-color: var(--sn-cyan);
    border-style: solid;
    opacity: 0.55;
}
.ov-planet-hero::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.ov-planet-hero::after  { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }

.ov-planet-img-wrap {
    border-radius: 50%;
    overflow: hidden;
    width: 130px; height: 130px;
    border: 2px solid var(--sn-border-chrome);
    box-shadow: 0 0 20px var(--sn-cyan-dim), inset 0 0 12px rgba(0,0,0,0.4);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.ov-planet-img-wrap:hover {
    border-color: var(--sn-border-active);
    box-shadow: 0 0 28px var(--sn-cyan-dim), inset 0 0 14px rgba(0,0,0,0.3);
}
.ov-planet-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ov-planet-name {
    font-family: var(--sn-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sn-chrome-bright);
    letter-spacing: 0.06em;
    text-align: center;
}
.ov-moon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.ov-moon-wrap img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--sn-border-chrome);
    box-shadow: 0 0 8px rgba(255,255,255,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ov-moon-wrap img:hover {
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(255,255,255,0.28);
}
.ov-moon-name {
    font-size: 0.65rem;
    color: var(--sn-text-muted);
    text-align: center;
    font-family: var(--sn-font-heading);
    letter-spacing: 0.05em;
}

/* Planet data panel */
.ov-planet-data {
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}
.ov-data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--sn-border-subtle);
    transition: background 0.15s ease;
}
.ov-data-row:last-child { border-bottom: none; }
.ov-data-row:hover { background: var(--sn-bg-panel-hover); }
.ov-data-key {
    font-family: var(--sn-font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--sn-cyan);
    flex-shrink: 0;
    min-width: 90px;
}
.ov-data-val {
    font-family: var(--sn-font-mono);
    font-size: 0.78rem;
    color: var(--sn-chrome-bright);
    text-align: right;
    line-height: 1.3;
}
.ov-coords {
    color: var(--sn-text-link);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.ov-coords:hover {
    color: var(--sn-cyan);
    text-shadow: 0 0 8px var(--sn-cyan-dim);
}

/* --- Build Queue Panel --- */
.ov-queue {
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}
.ov-queue::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-gold-dim), transparent);
    opacity: 0.7;
}
.ov-queue-title {
    font-family: var(--sn-font-display);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sn-gold);
    padding: 8px 14px 7px;
    border-bottom: 1px solid var(--sn-border-subtle);
    background: var(--sn-bg-nav);
}
.ov-queue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--sn-border-subtle);
}
.ov-queue-item {
    background: var(--sn-bg-panel);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.18s ease;
}
.ov-queue-item:hover {
    background: var(--sn-bg-panel-hover);
}
.ov-queue-label {
    font-family: var(--sn-font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--sn-chrome);
    text-decoration: none;
    transition: color 0.15s ease;
}
.ov-queue-label:hover {
    color: var(--sn-cyan);
    text-shadow: 0 0 6px var(--sn-cyan-dim);
}
.ov-queue-status {
    display: flex;
    align-items: flex-start;
}
.ov-queue-free {
    font-family: var(--sn-font-mono);
    font-size: 0.70rem;
    font-weight: 700;
    color: var(--sn-status-ok);
    text-shadow: 0 0 8px rgba(74, 232, 122, 0.25);
    border: 1px solid rgba(74, 232, 122, 0.32);
    border-radius: 4px;
    padding: 2px 7px;
    background: rgba(74, 232, 122, 0.06);
    letter-spacing: 0.06em;
}
.ov-queue-active {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid rgba(240, 192, 64, 0.40);
    border-radius: 4px;
    padding: 4px 8px;
    background: rgba(240, 192, 64, 0.06);
    width: 100%;
}
.ov-queue-tech {
    font-family: var(--sn-font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--sn-status-warn);
    letter-spacing: 0.03em;
}
.ov-queue-timer {
    font-family: var(--sn-font-mono);
    font-size: 0.66rem;
    color: rgba(240, 192, 64, 0.80);
    letter-spacing: 0.04em;
}

@media (max-width: 767px) {
    .ov-planet-section {
        grid-template-columns: 1fr;
    }
    .ov-planet-hero {
        flex-direction: row;
        align-items: center;
        padding: 10px;
    }
    .ov-planet-img-wrap {
        width: 80px; height: 80px;
        flex-shrink: 0;
    }
    .ov-queue-grid {
        grid-template-columns: 1fr;
    }
    .ov-info-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   FLEET MOVEMENTS PANEL — HUD redesign
   ============================================================ */

.sn-fleet-panel {
    position: relative;
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    overflow: hidden;
    margin-bottom: 8px;
}

/* Cyan shimmer line at top */
.sn-fleet-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-cyan-dim), transparent);
    opacity: 0.65;
}

.sn-fleet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: var(--sn-bg-nav);
    border-bottom: 1px solid var(--sn-border-subtle);
}

.sn-fleet-title {
    font-family: var(--sn-font-display);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sn-cyan);
    text-shadow: 0 0 8px var(--sn-cyan-dim);
}

.sn-fleet-toggle {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--sn-border-subtle);
    border-radius: 4px;
    background: transparent;
    color: var(--sn-chrome);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.sn-fleet-toggle:hover {
    border-color: var(--sn-border-active);
    color: var(--sn-cyan);
    background: rgba(0, 212, 255, 0.06);
}

.sn-fleet-body {
    padding: 0;
}

/* Empty state */
.sn-fleet-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-family: var(--sn-font-heading);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--sn-text-muted);
}

.sn-fleet-empty-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sn-border-chrome);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--sn-border-chrome);
    animation: fleetIdlePulse 2.8s ease-in-out infinite;
}
@keyframes fleetIdlePulse {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 4px var(--sn-border-chrome); }
    50%       { opacity: 1;   box-shadow: 0 0 9px var(--sn-cyan-dim); }
}

.sn-fleet-label {
    font-family: var(--sn-font-heading);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sn-text-muted);
    padding: 6px 14px 4px;
}

/* Individual fleet rows */
.sn-fleet-row {
    display: block;
    padding: 8px 14px 10px;
    border-top: 1px solid var(--sn-border-subtle);
    transition: background 0.15s ease;
}
.sn-fleet-row:hover {
    background: var(--sn-bg-panel-hover);
}
.sn-fleet-row-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sn-fleet-time {
    font-family: var(--sn-font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sn-gold);
    text-shadow: 0 0 6px var(--sn-gold-dim);
    letter-spacing: 0.06em;
    line-height: 1.2;
}
.sn-fleet-text {
    font-family: var(--sn-font-body);
    font-size: 0.82rem;
    color: var(--sn-text-primary);
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

/* ============================================================
   BREAKING NEWS TICKER — theme-aware redesign
   ============================================================ */

body#overview .overview-news-outer {
    border: 1px solid var(--sn-border-main) !important;
    border-radius: var(--sn-border-radius) !important;
    overflow: hidden;
    background: var(--sn-bg-panel);
    margin-bottom: 8px;
}

body#overview .overview-news-ticker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sn-bg-nav) !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 8px 14px !important;
    position: relative;
}

/* Red shimmer line at top of news */
body#overview .overview-news-ticker-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 80, 80, 0.5), transparent);
}

body#overview .overview-news-label {
    font-family: var(--sn-font-display) !important;
    font-size: 0.60rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: var(--sn-status-danger) !important;
    text-shadow: 0 0 8px rgba(240, 72, 72, 0.45) !important;
    flex-shrink: 0;
    border-right: 1px solid var(--sn-border-subtle);
    padding-right: 12px;
    white-space: nowrap;
}

body#overview .overview-news-item {
    font-family: var(--sn-font-body);
    font-size: 0.76rem !important;
    color: var(--sn-text-secondary) !important;
}

body#overview .overview-news-item strong {
    color: var(--sn-chrome-bright) !important;
    font-weight: 700;
}

/* Mobile news */
body#overview .overview-news-mobile {
    background: var(--sn-bg-panel) !important;
    border-top: none !important;
    border-bottom: none !important;
}

body#overview .overview-news-mobile summary {
    padding: 8px 14px !important;
    background: var(--sn-bg-nav);
}

body#overview .overview-news-mobile-hint {
    color: var(--sn-text-muted) !important;
}

body#overview .overview-news-mobile-item {
    font-size: 0.76rem !important;
    color: var(--sn-text-secondary) !important;
    border-top-color: var(--sn-border-subtle) !important;
    padding: 7px 14px !important;
}

body#overview .overview-news-mobile-item strong {
    color: var(--sn-chrome-bright) !important;
}

/* ============================================================
   BATTLE REPORT — HUD Redesign
   Full replacement for the 2005 nested-table layout
   ============================================================ */

/* Container */
.br-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--sn-font-body);
}

/* ── Header ── */
.br-header {
    text-align: center;
    padding: 14px 20px;
    background: var(--sn-bg-nav);
    border: 1px solid var(--sn-border-chrome);
    border-radius: var(--sn-border-radius);
    position: relative;
    overflow: hidden;
}
.br-header::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-cyan-dim), transparent);
}
.br-header-label {
    font-family: var(--sn-font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sn-text-muted);
    margin-bottom: 5px;
}
.br-header-time {
    font-family: var(--sn-font-mono);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--sn-chrome-bright);
    letter-spacing: 0.04em;
}

/* ── VS Bar ── */
.br-vs-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
}
.br-vs-side {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.br-vs-side.attacker { text-align: left; }
.br-vs-side.defender { text-align: right; }
.br-vs-role {
    font-family: var(--sn-font-display);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sn-text-muted);
}
.br-vs-name {
    font-family: var(--sn-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sn-chrome-bright);
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}
.br-vs-side.br-won  .br-vs-name { color: var(--sn-status-ok);     text-shadow: 0 0 14px rgba(74,232,122,0.38); }
.br-vs-side.br-lost .br-vs-name { color: var(--sn-status-danger);  text-shadow: 0 0 14px rgba(240,72,72,0.38);  }
.br-vs-icon {
    font-size: 1.5rem;
    color: var(--sn-chrome);
    text-align: center;
    text-shadow: 0 0 10px var(--sn-chrome-dim);
}

/* ── Round Panel ── */
.br-round {
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    overflow: hidden;
    background: var(--sn-bg-panel);
}
.br-round-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: var(--sn-bg-nav);
    border-bottom: 1px solid var(--sn-border-subtle);
}
.br-round-badge {
    font-family: var(--sn-font-display);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sn-gold);
    text-shadow: 0 0 8px var(--sn-gold-dim);
    border: 1px solid var(--sn-gold-dim);
    border-radius: 4px;
    padding: 2px 9px;
    background: rgba(232, 160, 32, 0.07);
}

/* Two-column grid */
.br-round-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--sn-border-subtle);
}
.br-side {
    background: var(--sn-bg-panel);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.br-side-label {
    font-family: var(--sn-font-display);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--sn-border-subtle);
}
.br-side-attacker .br-side-label { color: #F07850; }
.br-side-defender .br-side-label { color: var(--sn-status-info); }

/* Player card */
.br-player-card {
    border: 1px solid var(--sn-border-subtle);
    border-radius: var(--sn-border-radius);
    padding: 9px 10px;
    background: var(--sn-bg-nav);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.br-player-card.br-destroyed {
    border-color: rgba(240,72,72,0.35);
    background: rgba(240,72,72,0.05);
}
.br-player-name {
    font-family: var(--sn-font-heading);
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--sn-text-secondary);
    line-height: 1.35;
}
.br-player-name strong {
    color: var(--sn-chrome-bright);
    font-weight: 700;
}
.br-coords {
    font-family: var(--sn-font-mono);
    font-size: 0.70rem;
    color: var(--sn-text-link);
    margin-left: 5px;
}

/* Tech badges */
.br-player-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.br-tech-item {
    font-family: var(--sn-font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid;
}
.br-tech-weapon { color: #F07850; border-color: rgba(240,120,80,0.30); background: rgba(240,120,80,0.07); }
.br-tech-shield  { color: var(--sn-status-info); border-color: rgba(64,168,248,0.30); background: rgba(64,168,248,0.07); }
.br-tech-armor   { color: var(--sn-chrome-bright); border-color: var(--sn-border-subtle); background: rgba(255,255,255,0.04); }

/* Ship data table — horizontal scroll for many ship types */
.br-ship-scroll {
    overflow-x: auto;
    border-radius: 4px;
    border: 1px solid var(--sn-border-subtle);
}
.br-ship-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 220px;
    background: transparent !important;
    table-layout: auto;
}
.br-ship-table thead tr {
    background: var(--sn-bg-topbar) !important;
}
.br-ship-table th {
    font-family: var(--sn-font-display);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--sn-chrome);
    background: var(--sn-bg-topbar) !important;
    padding: 4px 8px;
    border: 1px solid var(--sn-border-subtle) !important;
    white-space: nowrap;
    text-align: center;
}
.br-ship-table td {
    font-family: var(--sn-font-mono);
    font-size: 0.68rem;
    color: var(--sn-text-secondary);
    padding: 3px 8px;
    border: 1px solid var(--sn-border-subtle) !important;
    text-align: center;
    background: transparent !important;
    white-space: nowrap;
}
.br-ship-table tbody tr:hover td {
    background: var(--sn-bg-panel-hover) !important;
}
.br-ship-row-label {
    font-family: var(--sn-font-heading) !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sn-text-muted) !important;
    text-align: left !important;
    white-space: nowrap;
}
.br-ship-count {
    font-weight: 700 !important;
    color: var(--sn-chrome-bright) !important;
}

/* Destroyed badge */
.br-destroyed-badge {
    display: inline-block;
    font-family: var(--sn-font-display);
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sn-status-danger);
    text-shadow: 0 0 10px rgba(240,72,72,0.45);
    border: 1px solid rgba(240,72,72,0.35);
    border-radius: 4px;
    padding: 4px 12px;
    background: rgba(240,72,72,0.07);
}

/* ── Round Damage Stats ── */
.br-round-damage {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 14px;
    border-top: 1px solid var(--sn-border-subtle);
    background: var(--sn-bg-nav);
}
.br-damage-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.74rem;
}
.br-damage-label { color: var(--sn-text-muted); }
.br-damage-sep   { color: var(--sn-text-muted); }
.br-damage-unit  { color: var(--sn-text-muted); font-size: 0.68rem; }
.br-damage-value {
    font-family: var(--sn-font-mono);
    font-weight: 700;
}
.br-damage-attack .br-damage-value { color: #F07850; }
.br-damage-defend .br-damage-value { color: var(--sn-status-info); }

/* ── Results Section ── */
.br-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--sn-bg-panel);
    border: 1px solid var(--sn-border-main);
    border-radius: var(--sn-border-radius);
    position: relative;
}
.br-result::before {
    content: '';
    position: absolute;
    top: 0; left: 8%; right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sn-gold-dim), transparent);
    opacity: 0.8;
}

/* Result banner */
.br-result-badge {
    font-family: var(--sn-font-display);
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    text-align: center;
    padding: 14px 20px;
    border-radius: var(--sn-border-radius);
    border: 1px solid transparent;
    animation: brResultReveal 0.4s ease both;
}
@keyframes brResultReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}
.br-result-attacker {
    color: var(--sn-status-ok);
    border-color: rgba(74,232,122,0.42);
    background: rgba(74,232,122,0.07);
    text-shadow: 0 0 18px rgba(74,232,122,0.50);
    box-shadow: 0 0 28px rgba(74,232,122,0.12);
}
.br-result-defender {
    color: var(--sn-status-danger);
    border-color: rgba(240,72,72,0.42);
    background: rgba(240,72,72,0.07);
    text-shadow: 0 0 18px rgba(240,72,72,0.50);
    box-shadow: 0 0 28px rgba(240,72,72,0.12);
}
.br-result-draw {
    color: var(--sn-status-warn);
    border-color: rgba(240,192,64,0.42);
    background: rgba(240,192,64,0.07);
    text-shadow: 0 0 14px rgba(240,192,64,0.35);
}

/* Stolen resources */
.br-stolen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    background: var(--sn-bg-nav);
    border: 1px solid rgba(74,232,122,0.25);
    border-radius: var(--sn-border-radius);
}
.br-stolen-label {
    font-family: var(--sn-font-heading);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sn-status-ok);
    flex-shrink: 0;
}
.br-stolen-item {
    font-family: var(--sn-font-mono);
    font-size: 0.74rem;
    color: var(--sn-chrome-bright);
}

/* Unit losses */
.br-losses {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.br-loss-row {
    flex: 1;
    min-width: 190px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    padding: 10px 13px;
    border-radius: var(--sn-border-radius);
    border: 1px solid;
}
.br-loss-attacker { border-color: rgba(240,120,80,0.30); background: rgba(240,120,80,0.06); }
.br-loss-defender { border-color: rgba(64,168,248,0.30); background: rgba(64,168,248,0.06); }
.br-loss-label {
    font-family: var(--sn-font-heading);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--sn-text-secondary);
    width: 100%;
}
.br-loss-value {
    font-family: var(--sn-font-mono);
    font-size: 1.0rem;
    font-weight: 900;
    line-height: 1;
}
.br-loss-attacker .br-loss-value { color: #F07850; text-shadow: 0 0 10px rgba(240,120,80,0.30); }
.br-loss-defender .br-loss-value { color: var(--sn-status-info); text-shadow: 0 0 10px rgba(64,168,248,0.30); }
.br-loss-unit {
    font-family: var(--sn-font-heading);
    font-size: 0.68rem;
    color: var(--sn-text-muted);
    align-self: flex-end;
    padding-bottom: 1px;
}

/* Debris */
.br-debris {
    font-family: var(--sn-font-body);
    font-size: 0.76rem;
    color: var(--sn-text-secondary);
    padding: 9px 13px;
    background: var(--sn-bg-nav);
    border: 1px solid var(--sn-border-subtle);
    border-radius: var(--sn-border-radius);
    line-height: 1.5;
}
.br-debris-item {
    font-family: var(--sn-font-mono);
    font-weight: 700;
    color: var(--sn-chrome-bright);
}

/* Moon */
.br-moon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: var(--sn-font-body);
    font-size: 0.76rem;
    color: var(--sn-text-secondary);
    padding: 9px 13px;
    background: var(--sn-bg-nav);
    border: 1px solid rgba(180,160,240,0.22);
    border-radius: var(--sn-border-radius);
    line-height: 1.5;
}
.br-moon-label {
    font-family: var(--sn-font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(200,180,255,0.82);
}
.br-moon-value {
    font-family: var(--sn-font-mono);
    font-weight: 900;
    font-size: 0.90rem;
    color: rgba(200,180,255,0.95);
}
.br-moon-created {
    width: 100%;
    color: rgba(200,180,255,0.90);
    font-weight: 600;
    margin-top: 2px;
}

/* Additional info */
.br-additional {
    font-family: var(--sn-font-body);
    font-size: 0.74rem;
    color: var(--sn-text-muted);
    padding: 7px 12px;
    border-left: 2px solid var(--sn-border-chrome);
    line-height: 1.45;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .br-round-grid {
        grid-template-columns: 1fr;
    }
    .br-vs-bar {
        grid-template-columns: 1fr 1fr;
    }
    .br-vs-icon { display: none; }
    .br-vs-side.attacker { text-align: left; }
    .br-vs-side.defender { text-align: right; }
    .br-losses { flex-direction: column; }
    .br-result-badge { font-size: 0.82rem; padding: 12px; }
}


/* ============================================================
   MENU DIVIDERS — Grouped navigation sections
   ============================================================ */
.main-menu .menu-divider {
    display: block;
    padding: 14px 14px 4px;
    pointer-events: none;
    user-select: none;
    list-style: none;
}
.main-menu .menu-divider span {
    display: block;
    font-family: var(--sn-font-display);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sn-chrome);
    opacity: 0.55;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--sn-border-subtle);
}
.main-menu .menu-divider-danger span {
    color: var(--sn-status-danger);
    border-bottom-color: rgba(255, 90, 90, 0.25);
    opacity: 0.75;
}
/* Tighter spacing after divider */
.main-menu .menu-divider + li > a {
    padding-top: 6px;
}


/* ============================================================
   RESOURCE PULSE — Tick-up (cyan) and negative-energy (red)
   ============================================================ */

/* Continuous red pulse when energy is negative */
.resource.resource-negative {
    animation: resNegativePulse 1.6s ease-in-out infinite;
}
@keyframes resNegativePulse {
    0%, 100% {
        border-color: rgba(255, 90, 90, 0.35);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 8px rgba(255, 90, 90, 0.10);
    }
    50% {
        border-color: rgba(255, 60, 60, 0.85);
        box-shadow: inset 0 0 0 1px rgba(255, 90, 90, 0.12), 0 0 18px rgba(255, 60, 60, 0.38), 0 0 6px rgba(255, 60, 60, 0.22) inset;
    }
}

/* Brief cyan flash when resource ticks upward (class added by JS) */
.resource-slot.res-tick-up .resource {
    animation: resTickUp 0.55s ease-out forwards;
}
@keyframes resTickUp {
    0%   { border-color: rgba(0, 212, 255, 0.90); box-shadow: 0 0 14px rgba(0, 212, 255, 0.55), inset 0 0 8px rgba(0, 212, 255, 0.18); transform: translateY(-1px) scale(1.015); }
    60%  { border-color: rgba(0, 212, 255, 0.50); box-shadow: 0 0 8px rgba(0, 212, 255, 0.22); transform: translateY(0) scale(1); }
    100% { border-color: rgba(108, 178, 255, 0.35); box-shadow: none; transform: none; }
}


/* ============================================================
   PLANET ALERT BADGES
   ============================================================ */

/* Shared badge base */
.planet-alert-badge {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    font-family: var(--sn-font-display);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}
.planet-alert-badge-attack {
    background: rgba(180, 20, 20, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 80, 80, 0.80);
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.55);
    animation: alertBadgePulse 1.1s ease-in-out infinite;
}
.planet-alert-badge-spy {
    background: rgba(140, 100, 0, 0.88);
    color: #ffe066;
    border: 1px solid rgba(255, 210, 60, 0.75);
    box-shadow: 0 0 10px rgba(255, 200, 40, 0.42);
    animation: spyBadgePulse 1.4s ease-in-out infinite;
}
/* Compact badge for small inactive cards (icon only) */
.planet-alert-badge-sm {
    font-size: 0.75rem;
    padding: 2px 5px;
    letter-spacing: 0;
    top: 4px;
}
@keyframes alertBadgePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 60, 60, 0.40); opacity: 0.90; }
    50%       { box-shadow: 0 0 20px rgba(255, 40, 40, 0.80); opacity: 1; }
}
@keyframes spyBadgePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 200, 40, 0.30); opacity: 0.85; }
    50%       { box-shadow: 0 0 16px rgba(255, 200, 40, 0.70); opacity: 1; }
}

/* Strengthen existing alert border animations */
@keyframes planetAlertPulse {
    0%, 100% {
        box-shadow: inset 0 0 12px rgba(255, 60, 60, 0.10), 0 0 10px rgba(255, 60, 60, 0.14);
        border-color: rgba(255, 70, 70, 0.50);
    }
    50% {
        box-shadow: inset 0 0 30px rgba(255, 40, 40, 0.30), 0 0 28px rgba(255, 40, 40, 0.58), 0 0 50px rgba(255, 0, 0, 0.22);
        border-color: rgba(255, 50, 50, 1.0);
        border-width: 2px;
    }
}
@keyframes planetSpyPulse {
    0%, 100% {
        box-shadow: inset 0 0 12px rgba(255, 200, 60, 0.10), 0 0 10px rgba(255, 200, 60, 0.14);
        border-color: rgba(255, 200, 60, 0.50);
    }
    50% {
        box-shadow: inset 0 0 28px rgba(255, 200, 40, 0.28), 0 0 24px rgba(255, 200, 40, 0.52);
        border-color: rgba(255, 200, 40, 0.95);
        border-width: 2px;
    }
}





/* ============================================================
   GLOBAL MARKET TICKER STRIP (desktop only)
   ============================================================ */
.gmt-row {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.global-market-ticker-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    height: 22px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(0, 180, 255, 0.12);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    margin-top: 0;
}
.gmt-label {
    flex-shrink: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(0, 212, 255, 0.85);
    padding: 0 14px 0 12px;
    white-space: nowrap;
    border-right: 1px solid rgba(0, 180, 255, 0.22);
    height: 100%;
    display: flex;
    align-items: center;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.50);
}
.gmt-scroll-outer {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    /* fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}
.gmt-track {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    will-change: transform;
    animation: gmtScroll 55s linear infinite;
}
.global-market-ticker-wrap:hover .gmt-track {
    animation-play-state: paused;
}
.gmt-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 22px 0 0;
    font-size: 11px;
}
.gmt-item::before {
    content: '◈';
    color: rgba(0, 180, 255, 0.35);
    font-size: 9px;
    margin-right: 4px;
}
.gmt-res {
    color: rgba(160, 210, 255, 0.80);
    font-weight: 600;
    font-size: 11px;
}
.gmt-price {
    color: rgba(220, 240, 255, 0.92);
    font-family: "Space Mono", monospace;
    font-size: 10px;
}
.gmt-link {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: rgba(0, 180, 255, 0.55);
    font-size: 10px;
    text-decoration: none;
    border-left: 1px solid rgba(0, 180, 255, 0.18);
    transition: color 0.2s;
}
.gmt-link:hover {
    color: rgba(0, 212, 255, 0.95);
}
@keyframes gmtScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
