/* EVE Echoes System Cards CSS */

:root {
    --highsec-color: #4ade80;
    --lowsec-color: #facc15;
    --nullsec-color: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --accent-blue: #3b82f6;
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --panel-gap: var(--space-md);
    --panel-padding-inline: 1.1rem;
    --panel-padding-block: 0.9rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    position: relative;
}

a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
    color: #4ac2d6;
    text-decoration-color: #4ac2d6;
}

/* Diagonal pattern background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(6, 18, 21, 0.3) 20px,
        rgba(6, 18, 21, 0.3) 40px
    );
    pointer-events: none;
    z-index: 0;
}

/* Main content container with whispernode styling */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.page-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 800px;
    min-width: 600px;
    height: 100vh;
    background: #000000;
    border-left: 2px solid rgba(59, 177, 202, 0.2);
    border-right: 2px solid rgba(59, 177, 202, 0.2);
    box-shadow: -10px 0 20px rgba(0, 0, 0, 1), 10px 0 20px rgba(0, 0, 0, 1);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Launcher-inspired index layout */
.launcher-shell {
    position: relative;
    width: 100%;
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-xl);
}


.launcher-header {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    border-left: 2px solid #ffffff;
    padding-left: 0.75rem;
    padding-right: 0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: "Roboto Mono", "Courier New", monospace;
    display: block;
    z-index: 3;
    text-decoration: none;
}

.launcher-header:hover,
.launcher-header:focus-visible {
    color: #ffffff;
    text-decoration: none;
}

.launcher-label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    color: inherit;
    text-decoration: inherit;
    margin-bottom: -0.05rem;
}

.launcher-subtitle {
    display: block;
    font-size: 0.7rem;
    font-family: "Roboto", sans-serif;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -0.05rem;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: inherit;
}

.launcher-subtitle-full {
    display: inline;
}

.launcher-subtitle-compact {
    display: none;
}

.launcher-subtitle-mobile {
    display: none;
}

.launcher-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.launcher-text {
    color: inherit;
    text-decoration: none;
}

.launcher-text:hover,
.launcher-text:focus-visible {
    color: #ffffff;
    text-decoration: none;
}

.launcher-cyclone-link {
    display: inline-block;
    text-decoration: none;
}

.launcher-search-wrapper {
    position: relative;
    display: inline-block;
    margin-top: -0.05rem;
}

.launcher-search-input {
    width: 320px;
    background: rgba(15, 27, 37, 0.85);
    border: 1px solid rgba(59, 177, 202, 0.35);
    border-radius: 4px;
    color: #f8fafc;
    padding: 0.45rem 0.6rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.launcher-search-input:focus {
    outline: none;
    border-color: rgba(74, 194, 214, 0.6);
    box-shadow: 0 0 0 2px rgba(74, 194, 214, 0.2);
}

.launcher-search-input::placeholder {
    color: rgba(203, 213, 225, 0.5);
}

.launcher-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(15, 27, 37, 0.98);
    border: 1px solid rgba(59, 177, 202, 0.35);
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.launcher-search-results .search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(59, 177, 202, 0.15);
    transition: background-color 0.15s ease;
}

.launcher-search-results .search-result-item:hover,
.launcher-search-results .search-result-item.search-result-focused {
    background-color: rgba(74, 194, 214, 0.1);
}

.launcher-search-results .search-result-item:last-child {
    border-bottom: none;
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.search-result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-subtitle {
    font-size: 0.9em;
    color: #cbd5e1;
    margin-top: 0.35rem;
}

.search-type-pill {
    background: rgba(74, 194, 214, 0.15);
    color: #58c2d7;
    border: 1px solid rgba(74, 194, 214, 0.4);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.search-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
}

.header-search-desktop {
    display: inline-block;
}

.header-search-mobile {
    display: none;
}

.launcher-cyclone-stack {
    position: relative;
    display: inline-block;
    margin-top: -0.1rem;
    font-size: 2.5rem;
    line-height: 1;
    width: 1em;
    height: 1em;
    transform-origin: 50% 50%;
    animation: launcherCycloneSpin 60s linear infinite;
}

.launcher-cyclone {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    font-size: inherit !important;
    line-height: 1;
    width: 1em;
    height: 1em;
    transform-origin: 50% 50%;
}

.launcher-cyclone-primary {
    color: #000000;
    z-index: 2;
}

.launcher-cyclone-secondary {
    color: rgba(0, 0, 0, 0.6);
    z-index: 1;
    transform: rotate(30deg);
}

.launcher-cyclone-tertiary {
    color: rgba(0, 0, 0, 0.35);
    z-index: 0;
    transform: rotate(60deg);
}

@keyframes launcherCycloneSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Cyclone spin speed and color variants based on activity level */
.cyclone-speed-1 {
    animation: launcherCycloneSpin 60s linear infinite;
}

.cyclone-speed-1 .launcher-cyclone-primary {
    color: #663399; /* Calm purple */
}

.cyclone-speed-1 .launcher-cyclone-secondary {
    color: rgba(102, 51, 153, 0.6);
}

.cyclone-speed-1 .launcher-cyclone-tertiary {
    color: rgba(102, 51, 153, 0.35);
}

.cyclone-speed-2 {
    animation: launcherCycloneSpin 40s linear infinite;
}

.cyclone-speed-2 .launcher-cyclone-primary {
    color: #4455bb; /* Blue-purple */
}

.cyclone-speed-2 .launcher-cyclone-secondary {
    color: rgba(68, 85, 187, 0.6);
}

.cyclone-speed-2 .launcher-cyclone-tertiary {
    color: rgba(68, 85, 187, 0.35);
}

.cyclone-speed-3 {
    animation: launcherCycloneSpin 25s linear infinite;
}

.cyclone-speed-3 .launcher-cyclone-primary {
    color: #2277dd; /* Blue */
}

.cyclone-speed-3 .launcher-cyclone-secondary {
    color: rgba(34, 119, 221, 0.6);
}

.cyclone-speed-3 .launcher-cyclone-tertiary {
    color: rgba(34, 119, 221, 0.35);
}

.cyclone-speed-4 {
    animation: launcherCycloneSpin 15s linear infinite;
}

.cyclone-speed-4 .launcher-cyclone-primary {
    color: #00aaff; /* Cyan */
}

.cyclone-speed-4 .launcher-cyclone-secondary {
    color: rgba(0, 170, 255, 0.6);
}

.cyclone-speed-4 .launcher-cyclone-tertiary {
    color: rgba(0, 170, 255, 0.35);
}

.cyclone-speed-5 {
    animation: launcherCycloneSpin 8s linear infinite;
}

.cyclone-speed-5 .launcher-cyclone-primary {
    color: #ffcc00; /* Yellow */
}

.cyclone-speed-5 .launcher-cyclone-secondary {
    color: rgba(255, 204, 0, 0.6);
}

.cyclone-speed-5 .launcher-cyclone-tertiary {
    color: rgba(255, 204, 0, 0.35);
}

.cyclone-speed-6 {
    animation: launcherCycloneSpin 4s linear infinite;
}

.cyclone-speed-6 .launcher-cyclone-primary {
    color: #ff6600; /* Orange */
}

.cyclone-speed-6 .launcher-cyclone-secondary {
    color: rgba(255, 102, 0, 0.6);
}

.cyclone-speed-6 .launcher-cyclone-tertiary {
    color: rgba(255, 102, 0, 0.35);
}

.cyclone-speed-7 {
    animation: launcherCycloneSpin 2s linear infinite;
}

.cyclone-speed-7 .launcher-cyclone-primary {
    color: #ffffff; /* White-hot */
}

.cyclone-speed-7 .launcher-cyclone-secondary {
    color: rgba(255, 255, 255, 0.6);
}

.cyclone-speed-7 .launcher-cyclone-tertiary {
    color: rgba(255, 255, 255, 0.35);
}

.launcher-panel {
    background: linear-gradient(180deg, rgba(13, 24, 31, 0.8) 0%, rgba(5, 9, 12, 0.95) 70%, #05090c 100%);
    border: none;
    border-top: 2px solid #3bb1ca;
    border-radius: 0;
    padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--panel-gap);
    min-height: calc(100vh - 6rem);
}

.launcher-panel::before {
    content: none;
}

.panel-hero {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.hero-main {
    width: 100%;
    position: relative;
}

.panel-hero-bg {
    position: absolute;
    top: -3rem;
    left: -2rem;
    right: -2rem;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.panel-hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(5, 9, 12, 0.2) 50%, rgba(5, 9, 12, 0.6) 80%, rgba(5, 9, 12, 0.95) 100%);
    z-index: 1;
}

/* Page-specific backgrounds */
.bg-index { background-image: url('/static/images/backgrounds/index-bg.webp'); }
.bg-region { background-image: url('/static/images/backgrounds/region-bg.webp'); }
.bg-constellation { background-image: url('/static/images/backgrounds/constellation-bg.webp'); }

/* Security-specific backgrounds for system pages */
.bg-highsec { background-image: url('/static/images/backgrounds/highsec-bg.webp'); }
.bg-lowsec { background-image: url('/static/images/backgrounds/lowsec-bg.webp'); }
.bg-nullsec { background-image: url('/static/images/backgrounds/nullsec-bg.webp'); }

.panel-hero h1 {
    font-size: 2.2rem;
    margin-bottom: var(--space-xs);
    font-family: 'Tektur', 'Segoe UI', sans-serif;
    letter-spacing: 0.05em;
}

.panel-hero p {
    color: rgba(203, 213, 225, 0.75);
    max-width: 420px;
}

.hero-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    row-gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.hero-heading > .panel-meta {
    margin-left: auto;
}

.panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: flex-end;
    align-items: center;
}

.meta-pill {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 194, 214, 0.3);
    background: linear-gradient(135deg, rgba(45, 119, 168, 0.2), rgba(74, 194, 214, 0.1));
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}


.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-lg);
}

.panel-grid.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.panel-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.panel-section {
    margin: 0;
}

.chart-section {
    width: 100%;
}

.chart-card {
    position: relative;
    padding: clamp(1.2rem, 2.5vw, 1.6rem);
    border-radius: 18px;
    border: 1px solid rgba(59, 177, 202, 0.35);
    background: linear-gradient(180deg, rgba(8, 20, 29, 0.95) 0%, rgba(3, 10, 16, 0.98) 100%);
    box-shadow: 0 25px 40px rgba(5, 17, 26, 0.35), inset 0 0 35px rgba(8, 31, 47, 0.45);
    overflow: hidden;
}

.chart-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 10% 0%, rgba(59, 177, 202, 0.25) 0%, transparent 40%),
                radial-gradient(circle at 90% 0%, rgba(255, 173, 66, 0.22) 0%, transparent 45%);
    mix-blend-mode: screen;
    opacity: 0.65;
}

.chart-card-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.chart-heading {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chart-heading h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    letter-spacing: 0.04em;
}

.chart-heading p {
    margin: 0;
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.chart-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 210, 227, 0.9);
}

.chart-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
    min-height: 1.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(230, 239, 249, 0.95);
}

.chart-status-indicator.status-high {
    color: rgba(180, 235, 255, 0.95);
}

.chart-status-indicator.status-medium {
    color: rgba(205, 235, 255, 0.9);
}

.chart-status-indicator.status-low,
.chart-status-indicator.status-collecting {
    color: rgba(239, 244, 250, 0.95);
}

.chart-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 1.2vw, 1rem);
    margin: clamp(0.9rem, 2vw, 1.1rem) 0 clamp(0.75rem, 1.6vw, 1rem);
}

.chart-meta-item {
    min-width: 120px;
    padding-right: 0.75rem;
}

.chart-meta-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
    margin-bottom: 0.35rem;
}

.chart-meta-value {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.98rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
}

.chart-visual {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(220px, 32vw, 280px);
    padding: 0.5rem 0.75rem 0.6rem;
    border-radius: 14px;
    background-image: repeating-linear-gradient(
        to right,
        rgba(255, 255, 255, 0.02) 0,
        rgba(255, 255, 255, 0.02) calc(25% - 1px),
        rgba(255, 255, 255, 0.065) calc(25% - 1px),
        rgba(255, 255, 255, 0.065) 25%
    );
    border: 1px solid rgba(59, 177, 202, 0.25);
    box-shadow: inset 0 0 22px rgba(8, 25, 38, 0.65);
}

.chart-visual canvas {
    width: 100%;
    height: 100%;
}

.chart-footer {
    position: relative;
    z-index: 1;
    margin-top: clamp(0.8rem, 1.5vw, 1.1rem);
}

.chart-footer-text {
    color: rgba(203, 213, 225, 0.8);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.chart-status-icon {
    font-size: 1.8rem;
    line-height: 1;
    color: #ffffff;
}

.chart-status-indicator .chart-status-icon {
    font-size: 2rem;
}

.chart-meta-value .chart-status-icon {
    font-size: 1.75rem;
}

@media (max-width: 640px) {
    .chart-card {
        padding: 1rem 1.1rem 1.2rem;
        border-radius: 14px;
    }

    .chart-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .chart-heading {
        gap: 0.25rem;
    }

    .chart-heading h2 {
        font-size: 1.2rem;
    }

    .chart-heading p {
        font-size: 0.78rem;
        line-height: 1.4;
        opacity: 0.8;
    }

    .chart-status-indicator {
        font-size: 0.7rem;
        letter-spacing: 0.12em;
        gap: 0.5rem;
    }

    .chart-status-indicator .chart-status-icon {
        font-size: 1.8rem;
    }

    .chart-meta {
        flex-direction: column;
        gap: 0.75rem;
        margin: 0.9rem 0 0.8rem;
    }

    .chart-meta-item {
        width: 100%;
        padding-right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chart-meta-label {
        font-size: 0.65rem;
        letter-spacing: 0.16em;
    }

    .chart-meta-value {
        font-size: 0.9rem;
    }

    .chart-meta-value .chart-status-icon {
        font-size: 1.45rem;
    }

    .chart-visual {
        height: clamp(180px, 58vw, 240px);
        padding: 0.4rem 0.55rem 0.5rem;
    }

    .chart-footer-text {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}

.panel-section h2 {
    font-size: 1.3rem;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.panel-section p {
    color: rgba(203, 213, 225, 0.75);
    max-width: 420px;
    font-size: 0.95rem;
}

.launcher-search input {
    background-color: rgba(11, 22, 30, 0.85);
    border: 1px solid rgba(74, 194, 214, 0.35);
    box-shadow: 0 0 0 1px rgba(59, 177, 202, 0.1);
}

.launcher-search input:focus {
    border-color: rgba(74, 194, 214, 0.85);
    box-shadow: 0 0 12px rgba(59, 177, 202, 0.35);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.metric-card {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(59, 177, 202, 0.25);
    background: linear-gradient(180deg, rgba(8, 17, 24, 0.85) 0%, rgba(4, 9, 13, 0.95) 100%);
    box-shadow: inset 0 0 20px rgba(3, 8, 12, 0.8);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.metric-label {
    font-size: 0.75rem;
    color: rgba(203, 213, 225, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: #4ac2d6;
    font-family: 'Tektur', 'Segoe UI', sans-serif;
}

.spark-equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: var(--space-xs);
    padding: 8px 10px 8px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(14, 34, 64, 0.55) 0%, rgba(10, 21, 40, 0.7) 100%);
    border: 1px solid rgba(74, 194, 214, 0.12);
    box-shadow: inset 0 1px 0 rgba(74, 194, 214, 0.15);
}

.spark-column {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 3px;
    flex: 1;
    min-width: 10px;
    height: 100%;
    padding: 2px;
    border-radius: 6px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.spark-column:hover {
    transform: translateY(-2px);
    background: rgba(74, 194, 214, 0.08);
    box-shadow: 0 6px 16px rgba(45, 119, 168, 0.12);
}

.spark-column-current {
    border: 1px solid rgba(74, 194, 214, 0.65);
    box-shadow: 0 0 12px rgba(74, 194, 214, 0.35);
    background: rgba(74, 194, 214, 0.12);
}

.spark-column-missing {
    opacity: 0.75;
}

.spark-cell {
    flex: 1;
    min-height: 12px;
    border-radius: 4px;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.spark-cell.empty {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: transparent;
    opacity: 0.7;
}

.spark-cell-filled {
    border: 1px solid rgba(74, 194, 214, 0.7);
    background: rgba(74, 194, 214, 0.5);
}

.spark-cell-level-1 {
    border-color: rgba(74, 194, 214, 0.7);
    background: rgba(74, 194, 214, 0.5);
}

.spark-cell-level-2 {
    border-color: rgba(16, 185, 129, 0.8);
    background: rgba(16, 185, 129, 0.6);
}

.spark-cell-level-3 {
    border-color: rgba(245, 158, 11, 0.9);
    background: rgba(245, 158, 11, 0.7);
}

.spark-cell-level-4 {
    border-color: rgba(249, 115, 22, 0.9);
    background: rgba(249, 115, 22, 0.7);
}

.spark-column:hover .spark-cell-filled {
    opacity: 1;
}

.spark-column:hover .spark-cell-filled.spark-cell-level-3,
.spark-column:hover .spark-cell-filled.spark-cell-level-4 {
    background: rgba(249, 115, 22, 0.85);
    border-color: rgba(249, 115, 22, 0.95);
}

.spark-empty {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.75);
    width: 100%;
    text-align: center;
}

@media (max-width: 640px) {
    .spark-equalizer {
        gap: 6px;
        padding: 8px;
    }
    .spark-column {
        gap: 2px;
        min-width: 8px;
        padding: 1px;
    }
    .spark-cell {
        min-height: 10px;
    }
}

.top-systems-section .section-header {
    margin-bottom: var(--space-lg);
}

.top-systems-section .section-header h2 {
    margin: 0;
}

.top-systems-section .section-header p {
    margin: var(--space-2xs) 0 0;
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.9rem;
}


.top-systems-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.top-system-card {
    border: 1px solid rgba(59, 177, 202, 0.2);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(180deg, rgba(8, 18, 26, 0.9) 0%, rgba(4, 9, 12, 0.95) 100%);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: border-color 0.2s ease;
}

.top-system-card:hover {
    border-color: rgba(74, 194, 214, 0.65);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.top-system-card .card-header {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    align-items: center;
}

.top-system-card h3 a {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-location {
    color: rgba(203, 213, 225, 0.6);
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--space-xs);
}

.card-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-key {
    font-size: 0.7rem;
    color: rgba(203, 213, 225, 0.65);
    text-transform: uppercase;
}

.metric-val {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.card-link {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* System detail layout */
.system-panel {
    margin-top: 0;
}

.system-hero {
    align-items: flex-end;
}

.system-hero .hero-main h1 {
    font-size: 2.4rem;
    margin-bottom: var(--space-2xs);
    letter-spacing: 0.06em;
}

.system-hero .hero-main p {
    color: rgba(203, 213, 225, 0.75);
    font-size: 1rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.hero-tag {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(8, 18, 25, 0.85);
    border: 1px solid rgba(74, 194, 214, 0.4);
    color: rgba(248, 250, 252, 0.85);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-stargates {
    margin-top: var(--space-md);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.hero-stargates-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(203, 213, 225, 0.6);
}

.hero-stargate-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    width: 100%;
    justify-content: flex-start;
}

.hero-stargate-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    background: rgba(15, 27, 37, 0.85);
    border: 1px solid rgba(74, 194, 214, 0.45);
    color: rgba(241, 245, 249, 0.88);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-stargate-pill:hover {
    background: rgba(74, 194, 214, 0.15);
    border-color: rgba(74, 194, 214, 0.65);
    color: #ffffff;
    text-decoration: none;
}

.hero-stargate-pill .material-icons {
    font-size: 1rem;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.hero-stargate-pill-disabled {
    opacity: 0.4;
    cursor: default;
    background: rgba(15, 27, 37, 0.4);
    border-color: rgba(74, 194, 214, 0.2);
    color: rgba(241, 245, 249, 0.5);
}

.hero-stargate-pill-disabled .material-icons {
    color: rgba(241, 245, 249, 0.5);
}

.planet-star-rating {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    gap: 0.1rem;
}

.star-icon {
    font-size: 0.78rem !important;
    color: #ffffff;
    margin: 0 !important;
    vertical-align: middle;
}

.star-icon-gold {
    font-size: 0.78rem !important;
    color: #fbbf24;
    margin: 0 !important;
    vertical-align: middle;
}

.star-disabled {
    color: rgba(255, 255, 255, 0.3) !important;
}

.metrics-system .metric-card {
    min-height: 120px;
    justify-content: space-between;
}

.intel-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.intel-card {
    border: 1px solid rgba(59, 177, 202, 0.25);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(8, 17, 24, 0.92) 0%, rgba(4, 9, 12, 0.98) 100%);
    padding: 1.2rem 1.4rem;
    box-shadow: inset 0 0 25px rgba(3, 8, 12, 0.7);
}

.intel-card header {
    margin-bottom: var(--space-md);
}

.intel-card h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.item-hero-card {
    padding: 0;
    overflow: hidden;
}

.item-hero-card header {
    margin: 0;
}

.item-hero-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.item-hero-media {
    position: relative;
    width: 100%;
    background: rgba(5, 10, 20, 0.75);
    border-bottom: 1px solid rgba(74, 194, 214, 0.25);
}

.item-hero-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: -6px;
    object-fit: cover;
    object-position: top center;
    aspect-ratio: 80 / 29;
}

.item-hero-header-text {
    padding: 1.2rem 1.4rem 0.6rem;
    background: none;
}

.item-hero-body {
    padding: 0.8rem 1.4rem 1.4rem;
}

.item-hero-card .intel-rows {
    gap: var(--space-sm);
}

.item-hero-card .intel-row {
    align-items: flex-start;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.item-hero-card .exploration-status {
    flex-wrap: wrap;
    gap: var(--space-2xs);
    justify-content: flex-start;
}

.intel-subtitle {
    display: block;
    margin-top: var(--space-2xs);
    color: rgba(203, 213, 225, 0.6);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.whispernode-link {
    text-underline-offset: 0.2em;
}

.intel-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.game-clock-block .intel-rows {
    gap: var(--space-xs);
}

.intel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: rgba(203, 213, 225, 0.85);
}

.intel-row strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
}

/* Tabular data inside intel cards */
.intel-row table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.35rem;
    background: rgba(15, 27, 37, 0.6);
    border: 1px solid rgba(74, 194, 214, 0.25);
    border-radius: 12px;
    overflow: hidden;
}

.intel-row th,
.intel-row td {
    padding: 0.55rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid rgba(74, 194, 214, 0.18);
}

.intel-row th {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #cbd5e1;
    background: rgba(74, 194, 214, 0.08);
}

.intel-row td {
    color: #e2e8f0;
}

.intel-row .intel-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.1rem;
}

.intel-row tr:last-child td {
    border-bottom: none;
}

.game-clock-row,
.game-event-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2xs);
}

.intel-row.game-event-row + .intel-row.game-event-row {
    border-top: 1px solid rgba(148, 210, 227, 0.25);
    padding-top: var(--space-xs);
}

.game-event-title {
    font-weight: 600;
    color: #f8fafc;
}

.game-event-title a {
    color: inherit;
    text-decoration: none;
}

.game-event-title a:hover,
.game-event-title a:focus-visible {
    color: var(--accent-blue);
    text-decoration: underline;
}

.game-event-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.game-event-countdown {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs);
    flex-wrap: wrap;
    width: 100%;
}

.game-event-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
}

.game-event-label.is-active {
    color: #4ade80;
}

.game-event-label.is-upcoming {
    color: #facc15;
}

.game-event-label.is-soon {
    color: #f97316;
}

.game-event-label.is-ended {
    color: rgba(148, 163, 184, 0.7);
}

.game-event-label.is-open {
    color: #38bdf8;
}

.game-event-label.is-tba {
    color: rgba(148, 163, 184, 0.7);
}

.game-event-countdown-value {
    font-family: "Roboto Mono", "Courier New", monospace;
    font-weight: 600;
    color: #f8fafc;
    margin-left: auto;
}

.game-event-pill-row {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.game-clock-no-events {
    color: rgba(203, 213, 225, 0.6);
}

.intel-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin-top: var(--space-sm);
}

.intel-pill {
    display: inline-flex;
    background: rgba(15, 27, 37, 0.85);
    border: 1px solid rgba(74, 194, 214, 0.45);
    color: rgba(241, 245, 249, 0.88);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    align-items: center;
}

.intel-pill-link {
    color: rgba(241, 245, 249, 0.88);
    cursor: pointer;
}

.intel-pill-link:hover {
    background: rgba(74, 194, 214, 0.15);
    border-color: rgba(74, 194, 214, 0.65);
    color: #ffffff;
    text-decoration: none;
}

.intel-pill .material-icons {
    font-size: 0.8rem;
    margin-right: 0.2rem;
    vertical-align: middle;
    color: rgba(241, 245, 249, 0.88);
}

.planet-pill-disabled {
    opacity: 0.4;
    cursor: default;
    background: rgba(15, 27, 37, 0.4);
    border-color: rgba(74, 194, 214, 0.2);
    color: rgba(241, 245, 249, 0.5);
}

.planet-pill-disabled .material-icons {
    color: rgba(241, 245, 249, 0.5);
}

.intel-pill-disabled {
    opacity: 0.55;
    cursor: default;
    border-color: rgba(74, 194, 214, 0.25);
    color: rgba(203, 213, 225, 0.6);
}


.stargate-security {
    font-size: inherit;
    margin-left: 0.25rem;
    font-weight: 700;
}

.stargate-security.security-highsec {
    color: #4ade80;
}

.stargate-security.security-lowsec {
    color: #facc15;
}

.stargate-security.security-nullsec {
    color: #ef4444;
}


/* No docking indicator styling */
.no-docking-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: rgba(252, 165, 165, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: default;
}

.no-docking-indicator .material-icons {
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

.no-docking-indicator:hover {
    background: rgba(244, 63, 94, 0.25);
    border-color: rgba(244, 63, 94, 0.6);
    color: rgba(252, 165, 165, 1);
}

/* Island indicator styling */
.island-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.4);
    color: rgba(196, 181, 253, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.island-indicator:hover {
    background: rgba(147, 51, 234, 0.25);
    border-color: rgba(147, 51, 234, 0.6);
    color: rgba(196, 181, 253, 1);
    text-decoration: none;
}

.island-indicator .material-icons {
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

/* Island systems list styling */
.island-systems-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.island-system-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.island-system-link:hover {
    color: #cbd5e1;
    text-decoration: underline;
}

/* Planetary Resources Card */
.planetary-resources-card {
    grid-column: 1 / -1;
}

.planetary-resources-hero {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: var(--space-md);
    align-items: stretch;
}

.resource-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: rgba(8, 17, 24, 0.6);
    border: 1px solid rgba(59, 177, 202, 0.15);
    border-radius: 6px;
    padding: var(--space-sm);
}

.resource-selector label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(203, 213, 225, 0.7);
    margin-bottom: 0.4rem;
}

.perfect-resource-select {
    width: 100%;
    background: rgba(15, 27, 37, 0.85);
    border: 1px solid rgba(59, 177, 202, 0.35);
    border-radius: 4px;
    color: #f8fafc;
    padding: 0.45rem 0.6rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.perfect-resource-select:focus {
    outline: none;
    border-color: rgba(74, 194, 214, 0.6);
    box-shadow: 0 0 0 2px rgba(74, 194, 214, 0.2);
}

.resource-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 16rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.resource-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    column-gap: 0.5rem;
    width: 100%;
    background: rgba(15, 27, 37, 0.6);
    border: 1px solid rgba(59, 177, 202, 0.1);
    border-radius: 4px;
    padding: 0.55rem 0.65rem;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
}

.resource-nav-item:hover {
    border-color: rgba(74, 194, 214, 0.4);
    background: rgba(15, 27, 37, 0.78);
}

.resource-nav-item.active {
    border-color: rgba(74, 194, 214, 0.6);
    background: rgba(74, 194, 214, 0.12);
    color: #f8fafc;
}

.resource-nav-name {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    margin-right: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(74, 194, 214, 0.18);
    border: 1px solid rgba(74, 194, 214, 0.35);
    color: rgba(148, 228, 242, 0.9);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.resource-detail-panels {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.resource-detail-panel {
    background: rgba(8, 17, 24, 0.65);
    border: 1px solid rgba(59, 177, 202, 0.2);
    border-radius: 6px;
    padding: var(--space-sm);
}

.resource-detail-panel[hidden] {
    display: none;
}

.resource-detail-panel .resource-header {
    margin-bottom: var(--space-sm);
}

@media (max-width: 1100px) {
    .planetary-resources-hero {
        grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .planetary-resources-hero {
        grid-template-columns: 1fr;
    }

    .resource-sidebar {
        flex-direction: column;
    }

    .resource-nav {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .planetary-resources-hero {
        gap: var(--space-sm);
    }

    .resource-sidebar {
        background: transparent;
        border: none;
        padding: 0;
    }

    .resource-nav {
        display: none;
    }
}

.planetary-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.resource-group {
    background: rgba(15, 27, 37, 0.5);
    border: 1px solid rgba(59, 177, 202, 0.15);
    border-radius: 6px;
    padding: var(--space-sm);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(59, 177, 202, 0.2);
}

.resource-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resource-count {
    font-size: 0.7rem;
    color: rgba(203, 213, 225, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.resource-locations {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.perfect-resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs);
    background: rgba(8, 17, 24, 0.6);
    border: 1px solid rgba(74, 194, 214, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.perfect-resource-item:hover {
    background: rgba(74, 194, 214, 0.08);
    border-color: rgba(74, 194, 214, 0.4);
}

.resource-location-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.resource-system-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-system-link:hover {
    color: #4ac2d6;
    text-decoration: none;
}

.resource-planet-link {
    font-size: 0.7rem;
    color: rgba(203, 213, 225, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-planet-link:hover {
    color: #cbd5e1;
    text-decoration: underline;
}

.resource-distance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.resource-distance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.resource-distance-badge .material-icons {
    font-size: 0.7rem;
}

.resource-quality-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.category-badge.category-perfect {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: rgba(251, 191, 36, 0.9);
}

.category-badge.category-rich {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: rgba(96, 165, 250, 0.9);
}

.category-badge.category-nearest {
    background: rgba(74, 194, 214, 0.12);
    border: 1px solid rgba(74, 194, 214, 0.28);
    color: rgba(148, 228, 242, 0.9);
}

.category-badge.category-unknown {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: rgba(226, 232, 240, 0.85);
}

.resource-quality-chip.quality-unknown {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: rgba(226, 232, 240, 0.85);
}

.nearest-chip {
    background: rgba(74, 194, 214, 0.12);
    border: 1px solid rgba(74, 194, 214, 0.28);
    color: rgba(148, 228, 242, 0.9);
}

.item-taxonomy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: var(--space-sm);
}

.item-taxonomy-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    background: rgba(15, 27, 37, 0.85);
    border: 1px solid rgba(74, 194, 214, 0.45);
    color: rgba(241, 245, 249, 0.88);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.item-taxonomy-chip:hover {
    background: rgba(74, 194, 214, 0.15);
    border-color: rgba(74, 194, 214, 0.65);
    color: #ffffff;
    text-decoration: none;
}

.jumps-badge {
    background: rgba(74, 194, 214, 0.15);
    border: 1px solid rgba(74, 194, 214, 0.3);
    color: rgba(148, 228, 242, 0.9);
}

.distance-badge {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: rgba(196, 181, 253, 0.9);
}

/* Responsive adjustments for planetary resources */
@media (max-width: 768px) {
    .perfect-resource-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
        width: 100%;
    }

    .resource-distance-badges {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .resource-location-info {
        width: 100%;
    }

    .resource-system-link,
    .resource-planet-link {
        white-space: normal;
    }
}

/* Islands page specific styles */
.region-list, .constellation-list, .boundary-systems-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.region-tag, .constellation-tag, .boundary-system-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.region-tag {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.constellation-tag {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: #c4b5fd;
}

.boundary-system-tag {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Islands table styles */
.islands-table-container {
    overflow-x: auto;
    margin-top: 0.5rem;
}

.islands-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.islands-table th {
    background: rgba(15, 27, 37, 0.6);
    border: 1px solid rgba(59, 177, 202, 0.2);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.islands-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.islands-table th.sortable:hover {
    background: rgba(15, 27, 37, 0.8);
}

.islands-table th.sorted-asc,
.islands-table th.sorted-desc {
    background: rgba(59, 177, 202, 0.1);
}

.sort-indicator {
    font-size: 0.8rem;
    margin-left: 0.25rem;
    color: #4ade80;
}

.islands-table td {
    border: 1px solid rgba(59, 177, 202, 0.1);
    padding: 0.6rem 0.5rem;
    vertical-align: top;
}

.islands-table tbody tr:hover {
    background: rgba(59, 177, 202, 0.05);
}

.island-number {
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    width: 60px;
}

.island-size {
    font-weight: 500;
    color: #e2e8f0;
    width: 80px;
}

.island-stations, .island-exits {
    text-align: center;
    width: 70px;
    color: #cbd5e1;
}

.island-isolation {
    color: #94a3b8;
    text-align: center;
    width: 80px;
    font-size: 0.8rem;
}

.island-regions .region-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.island-regions .region-tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
}

.island-systems .island-systems-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    max-width: 400px;
}

.island-systems .island-system-link {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    background: rgba(74, 194, 214, 0.1);
    border: 1px solid rgba(74, 194, 214, 0.2);
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.island-systems .island-system-link:hover {
    background: rgba(74, 194, 214, 0.2);
    border-color: rgba(74, 194, 214, 0.4);
}

/* Responsive table */
@media (max-width: 768px) {
    .islands-table-container {
        font-size: 0.8rem;
    }

    .islands-table th,
    .islands-table td {
        padding: 0.4rem 0.3rem;
    }

    .island-systems .island-systems-list {
        max-width: 250px;
    }
}

.metric-with-trend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.spark-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-xs);
}

.spark-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.spark-label {
    font-weight: 500;
}

.spark-row .spark-equalizer {
    width: 100%;
}

.intel-row-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(74, 194, 214, 0.15);
    margin: 0;
}

.trend-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.trend-up {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.trend-down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.trend-indicator .material-icons {
    font-size: 1rem;
}

.trend-container {
    width: 60px;
    text-align: right;
}

.intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: 0;
}

.intel-grid.intel-grid-compact {
    gap: var(--panel-gap);
}

.intel-grid.intel-grid-compact .intel-card {
    padding: var(--panel-padding-block) var(--panel-padding-inline);
}

.intel-grid.intel-grid-compact .intel-card header {
    margin-bottom: var(--space-sm);
}

.intel-grid.intel-grid-compact .intel-subtitle {
    margin-top: var(--space-3xs, 0.2rem);
    font-size: 0.7rem;
}

.intel-grid.intel-grid-compact .intel-rows {
    gap: var(--space-xs);
}

.intel-grid.intel-grid-compact .intel-row {
    align-items: flex-start;
}

.intel-grid.intel-grid-compact .intel-pill,
.intel-grid.intel-grid-compact .intel-pill-link {
    padding: 2px 5px;
    font-size: 0.68rem;
}

.intel-grid.intel-grid-compact .intel-pills {
    margin-top: var(--space-xs);
    gap: var(--space-3xs, 0.15rem);
}

.intel-grid.intel-grid-compact .intel-card .metric-with-trend {
    gap: var(--space-2xs);
}

.intel-actions {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.recent-activity-section {
    margin-top: var(--space-xl);
}

.recent-activity-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.recent-activity-header h2 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recent-activity-header p {
    margin: 0;
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.9rem;
}

.recent-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.activity-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: 1.2rem 1.4rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 177, 202, 0.3);
    background: linear-gradient(180deg, rgba(8, 20, 29, 0.94) 0%, rgba(3, 10, 16, 0.98) 100%);
    box-shadow: inset 0 0 22px rgba(5, 17, 26, 0.55);
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
}

.activity-card-title h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.activity-card-title a {
    color: #e2e8f0;
    text-decoration: none;
}

.activity-card-title a:hover {
    color: #38bdf8;
}

.activity-card-location {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(203, 213, 225, 0.62);
}

.activity-card-location a {
    color: inherit;
    text-decoration: none;
}

.activity-card-location a:hover {
    color: #38bdf8;
}

.meta-separator {
    margin: 0 0.35rem;
    color: rgba(148, 163, 184, 0.6);
}

.activity-security {
    min-width: 3.4rem;
    text-align: center;
    border-radius: 6px;
}

.activity-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
}

.activity-metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.activity-metric-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

.activity-metric-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.95);
}

.activity-metric-sublabel {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.85);
}

.activity-metric-stack {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .activity-card-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .recent-activity-grid {
        grid-template-columns: 1fr;
    }

    .activity-card-body {
        grid-template-columns: 1fr 1fr;
    }

    .panel-meta {
        display: none;
    }
}

/* Navigation */
.navbar {
    background-color: #000000;
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    text-align: left;
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.2rem 0;
    font-style: italic;
}

.game-title {
    color: var(--accent-blue);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.3rem 0 0 0;
}

.nav-links a {
    margin-left: var(--space-md);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    width: 90vw;
    max-width: 800px;
    min-width: 600px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
}

.launcher-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.9) 90%, #000000 100%);
    pointer-events: none;
    z-index: 10;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--accent-blue), var(--highsec-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.route-planner {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.route-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.route-field span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.route-field input {
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.route-field input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-2xs);
}

.route-button {
    align-self: flex-start;
    padding: 0.65rem 1.5rem;
    background-color: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.route-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.route-button:not(:disabled):hover {
    background-color: #2563eb;
}

.route-button.loading {
    position: relative;
    color: transparent;
}

.route-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.route-button-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.route-button-secondary:not(:disabled):hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-blue);
    color: #fff;
}

.route-output {
    padding: var(--space-md) 0 0;
    background-color: var(--bg-card);
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    min-height: 3.5rem;
    display: none;
}

.route-output.is-visible {
    display: block;
}

.route-summary {
    font-weight: 600;
    color: var(--text-primary);
}

.route-steps {
    list-style: none;
    margin-top: var(--space-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.route-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.route-step-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.route-step-link {
    transition: color 0.2s ease;
}

.route-step-main strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.route-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.route-error {
    color: #f87171;
    font-weight: 600;
}

/* Security Classes */
.security-class {
    font-weight: 600;
}

.security-class.highsec {
    color: var(--highsec-color);
}

.security-class.lowsec {
    color: var(--lowsec-color);
}

.security-class.nullsec {
    color: var(--nullsec-color);
}


.security-highsec {
    color: var(--highsec-color);
}

.security-lowsec {
    color: var(--lowsec-color);
}

.security-nullsec {
    color: var(--nullsec-color);
}

/* Activity Level Badges */
.activity-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: 1px solid;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.activity-gray {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.25);
}

.activity-blue {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.activity-green {
    color: #4ade80;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.activity-yellow {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.activity-orange {
    color: #fb923c;
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.3);
}

.activity-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.activity-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.activity-breakdown .activity-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin: 0.1rem 0;
}

/* Activity Timeline - Equalizer Style */
.activity-timeline {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 3px;
    padding: var(--space-md);
    background: rgba(11, 25, 36, 0.4);
    border-radius: 8px;
    margin: var(--space-md) 0;
    align-items: end;
}

.activity-hour {
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    height: 80px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 2px;
    border-radius: 4px;
}

.activity-hour:hover {
    transform: scale(1.05);
    z-index: 10;
    background: rgba(255, 255, 255, 0.05);
}

.activity-bar {
    flex: 1;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Empty blocks - dashed outline */
.activity-bar.empty {
    border: 1px dashed rgba(148, 163, 184, 0.3);
    background: transparent;
}

/* Filled blocks - color coded by activity level */
.activity-bar.filled.activity-gray {
    background: rgba(148, 163, 184, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.activity-bar.filled.activity-blue {
    background: rgba(59, 130, 246, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.9);
}

.activity-bar.filled.activity-green {
    background: rgba(16, 185, 129, 0.7);
    border: 1px solid rgba(16, 185, 129, 0.9);
}

.activity-bar.filled.activity-yellow {
    background: rgba(245, 158, 11, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.9);
}

.activity-bar.filled.activity-orange {
    background: rgba(249, 115, 22, 0.7);
    border: 1px solid rgba(249, 115, 22, 0.9);
}

/* Gap-filled hours - diagonal stripes */
.activity-hour.legacy .activity-bar.filled {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(255, 255, 255, 0.15) 3px,
        rgba(255, 255, 255, 0.15) 6px
    );
}

/* Current hour - gold border around entire column */
.activity-hour.current-hour {
    border: 2px solid #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

/* Hover effects for filled blocks */
.activity-hour:hover .activity-bar.filled.activity-gray {
    background: rgba(148, 163, 184, 0.7);
}

.activity-hour:hover .activity-bar.filled.activity-blue {
    background: rgba(59, 130, 246, 0.85);
}

.activity-hour:hover .activity-bar.filled.activity-green {
    background: rgba(16, 185, 129, 0.85);
}

.activity-hour:hover .activity-bar.filled.activity-yellow {
    background: rgba(245, 158, 11, 0.85);
}

.activity-hour:hover .activity-bar.filled.activity-orange {
    background: rgba(249, 115, 22, 0.85);
}

/* Activity Timeline - Mobile responsive */
@media (max-width: 640px) {
    .activity-timeline {
        gap: 2px;
        padding: var(--space-sm);
    }

    .activity-hour {
        height: 60px;
        gap: 1px;
        padding: 1px;
    }

    .activity-bar {
        border-radius: 1px;
    }
}

/* Mini Equalizer (Horizontal 4-hour view for index page) */
.mini-equalizer {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(14, 34, 64, 0.55) 0%, rgba(10, 21, 40, 0.7) 100%);
    border: 1px solid rgba(74, 194, 214, 0.12);
    box-shadow: inset 0 1px 0 rgba(74, 194, 214, 0.15);
}

.mini-block {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

/* Activity level colors - high contrast progression */
.mini-block.activity-gray {
    background: rgba(148, 163, 184, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.mini-block.activity-blue {
    background: rgba(74, 194, 214, 0.5);
    border: 1px solid rgba(74, 194, 214, 0.7);
}

.mini-block.activity-green {
    background: rgba(16, 185, 129, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.8);
}

.mini-block.activity-yellow {
    background: rgba(245, 158, 11, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.9);
}

.mini-block.activity-orange {
    background: rgba(249, 115, 22, 0.7);
    border: 1px solid rgba(249, 115, 22, 0.9);
}

/* Hover effects - tooltips only, no cursor change */

/* Mobile responsive */
@media (max-width: 640px) {
    .mini-equalizer {
        gap: 3px;
    }

    .mini-block {
        width: 16px;
        height: 16px;
    }
}

/* Systems Grid */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.system-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--space-lg);
    transition: border-color 0.2s;
}

.system-card:hover {
    border-color: var(--accent-blue);
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.system-header h3 a {
    font-size: 1.25rem;
}

.system-info .region {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.activity-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat {
    display: flex;
    justify-content: space-between;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    color: var(--text-primary);
    font-weight: bold;
}


/* Universe Details */
.universe-details {
    border: 1px solid rgba(59, 177, 202, 0.25);
    border-radius: 12px;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(180deg, rgba(8, 19, 27, 0.9) 0%, rgba(3, 8, 12, 0.95) 100%);
    box-shadow: inset 0 0 20px rgba(3, 8, 12, 0.8);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.universe-details h2 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.universe-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.universe-section h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Station Grid */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}

.station-card {
    border: 1px solid rgba(59, 177, 202, 0.2);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: rgba(5, 13, 18, 0.95);
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.station-name {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.station-location,
.station-population {
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.85rem;
}

/* Planets Grid */
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-xs);
}

.planet-item {
    border: 1px solid rgba(59, 177, 202, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: rgba(5, 13, 18, 0.9);
    font-size: 0.9rem;
}

/* Stargates Grid */
.stargates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-xs);
}

.stargate-item {
    border: 1px solid rgba(59, 177, 202, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: rgba(5, 13, 18, 0.9);
    font-size: 0.9rem;
}

.stargate-name {
    margin-top: var(--space-2xs);
    color: rgba(203, 213, 225, 0.7);
}

/* Build Footer */
.build-footer {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    z-index: 20;
    width: 90vw;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.footer-build-id {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Disclaimer Card Links */
.intel-row a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.intel-row a:hover {
    color: var(--accent-primary);
}

.build-id-highlight {
    color: #ffffff;
}

.build-id-rest {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 992px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .panel-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-meta {
        justify-content: flex-start;
    }

    .hero-heading > .panel-meta {
        margin-left: 0;
    }

    .launcher-panel {
        padding: var(--space-xl) var(--space-lg) var(--space-2xl);
        gap: var(--panel-gap);
    }
}

@media (max-width: 768px) {
    .page-wrapper::before {
        width: 100vw;
        min-width: 300px;
    }

    .main-content {
        width: 100vw;
        min-width: 0;
        padding: var(--space-lg) var(--space-md) var(--space-3xl);
    }

    .launcher-shell {
        padding-top: var(--space-2xl);
    }

    .build-footer {
        width: calc(100vw - 2 * var(--space-md));
        max-width: none;
    }

    .footer-build-id {
        font-size: 0.65rem;
    }


    .launcher-header {
        left: 0;
    }

    .launcher-subtitle-full {
        display: none;
    }

    .launcher-subtitle-compact {
        display: inline;
    }

    .header-search-desktop {
        display: none;
    }

    .header-search-mobile {
        display: block;
        width: 100%;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .header-search-mobile .launcher-search-input {
        width: 100%;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .systems-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .launcher-shell {
        padding-bottom: var(--space-3xl);
    }

    .launcher-panel {
        padding: var(--space-lg) var(--space-md) var(--space-xl);
        gap: var(--panel-gap);
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .card-metrics {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-xs);
    }

    .hero-tags {
        gap: var(--space-xs);
    }

    .station-grid,
    .stargates-grid {
        grid-template-columns: 1fr;
    }

    /* System template mobile improvements */
    .panel-grid,
    .system-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-lg);
    }

    /* Fix horizontal overflow */
    .launcher-panel,
    .system-panel {
        max-width: 100%;
        overflow-x: hidden;
    }

    .panel-hero,
    .system-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: var(--space-md);
    }

    .panel-meta {
        justify-content: flex-start;
        gap: var(--space-xs);
    }

    .item-hero-header {
        gap: var(--space-xs);
    }

    .item-hero-header-text {
        padding: 1rem 1rem 0.5rem;
    }

    .item-hero-body {
        padding: 0.75rem 1rem 1rem;
    }

    .hero-main h1,
    .system-hero .hero-main h1 {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .hero-tags {
        gap: var(--space-2xs);
        margin-top: var(--space-xs);
    }

    .hero-tag,
    .meta-pill {
        font-size: 0.7rem;
        padding: var(--space-2xs) var(--space-xs);
    }

    .intel-card {
        padding: 1rem 1.2rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .item-hero-card {
        padding: 0;
    }

    .intel-card h3 {
        font-size: 1rem;
    }

    .intel-subtitle {
        font-size: 0.7rem;
    }

    .intel-row {
        font-size: 0.9rem;
    }

    .intel-row table {
        display: block;
        min-width: 480px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .intel-actions {
        gap: var(--space-md);
        margin-top: var(--space-md);
    }

    .chart-container {
        margin-bottom: 0;
        aspect-ratio: 16 / 8;
        max-height: 200px;
        min-height: 150px;
    }

    .panel-column {
        gap: var(--space-md);
    }

    .intel-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .universe-details {
        padding: 1.2rem 1.4rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .planets-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: var(--space-xs);
    }

    .planet-item {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }

    .station-card {
        padding: var(--space-sm) var(--space-sm);
    }

    .station-name {
        font-size: 0.9rem;
    }

    .station-location,
    .station-population {
        font-size: 0.8rem;
    }
}

/* Planet page styles */
.bg-planet {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 50%, #1a202c 100%);
}

.planet-type-indicator {
    background: rgba(59, 177, 202, 0.15);
    color: #63cafe;
    padding: var(--space-2xs) var(--space-sm);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    border: 1px solid rgba(59, 177, 202, 0.3);
}

.quality-score-indicator {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    padding: var(--space-2xs) var(--space-sm);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Resource grid layout */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

/* Resource cards */
.resource-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all 0.2s ease;
}


.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.resource-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Resource quality badges */
.resource-quality-badge {
    padding: var(--space-2xs) var(--space-sm);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quality-poor {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.quality-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.quality-rich {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.quality-perfect {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Resource card variants by quality */
.resource-quality-poor {
    border-left: 3px solid #ef4444;
}

.resource-quality-medium {
    border-left: 3px solid #f59e0b;
}

.resource-quality-rich {
    border-left: 3px solid #3b82f6;
}

.resource-quality-perfect {
    border-left: 3px solid #eab308;
}

.resource-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.resource-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-metric-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.resource-metric-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Full-width cards */
.intel-card-full {
    grid-column: 1 / -1;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .resource-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .resource-card {
        padding: var(--space-md);
    }

    .resource-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .hero-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2xs);
    }
}

/* Daily Exploration Route Styles */
.exploration-block {
    margin-bottom: var(--space-lg);
}

.exploration-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-bar {
    width: 80px;
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-left: var(--space-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ac2d6, #66d9ef);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.exploration-system {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exploration-status {
    display: flex;
    align-items: center;
}

.exploration-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.exploration-badge.explored {
    background-color: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.exploration-badge.unexplored {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}


@media (max-width: 640px) {
    .exploration-system {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .exploration-status {
        align-self: flex-end;
    }

    .progress-bar {
        width: 60px;
    }
}

/* Intel Card Footer */
.intel-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
}

.view-more-link {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.view-more-link:hover {
    color: rgba(74, 194, 214, 0.9);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.intel-footer-buttons {
    display: flex;
    gap: var(--space-xs);
}

.intel-footer-btn {
    flex: 1;
    display: inline-block;
    color: rgba(226, 232, 240, 0.95);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, rgba(45, 119, 168, 0.25), rgba(74, 194, 214, 0.15));
    border: 1px solid rgba(74, 194, 214, 0.3);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.intel-footer-btn:hover {
    background: linear-gradient(135deg, rgba(45, 119, 168, 0.4), rgba(74, 194, 214, 0.3));
    border-color: rgba(74, 194, 214, 0.6);
    color: rgba(226, 232, 240, 1);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(74, 194, 214, 0.2);
}

/* Top Systems Page Styling */
.rank-indicator {
    min-width: 2.5rem;
    text-align: center;
}

.rank-number {
    display: inline-block;
    background: rgba(74, 194, 214, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(74, 194, 214, 0.4);
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    line-height: 1.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.system-info {
    flex: 1;
    margin: 0 var(--space-sm);
}

.system-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.system-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
}

.region-name {
    color: rgba(148, 163, 184, 0.7);
}

.security-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.security-breakdown .security-pill {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

/* Disclaimer Footer */
.disclaimer-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.disclaimer-footer p {
    margin: 0;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
}

/* Disclaimer Card - smaller and less prominent */
.disclaimer-card {
    opacity: 0.7;
}

.disclaimer-card header h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.disclaimer-card .intel-row span {
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.8);
}

/* System name copy to clipboard */
.system-name-copyable {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.system-name-copyable .copy-icon {
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    color: rgba(74, 194, 214, 0.7);
}

.system-name-copyable:hover {
    color: #4ac2d6;
}

.system-name-copyable:hover .copy-icon {
    opacity: 1;
}

.system-name-copyable .copy-icon.copy-success {
    color: #4ade80;
    opacity: 1;
}

/* Patch Notes Layout */
.patch-notes-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.patch-notes-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.patch-notes-disclaimer {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.patch-note-card {
    position: relative;
    scroll-margin-top: 120px;
}

.patch-note-card-feature {
    padding: clamp(1.6rem, 2.5vw, 2rem);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 22, 33, 0.95) 0%, rgba(3, 10, 16, 0.98) 100%);
    border-color: rgba(74, 194, 214, 0.45);
    box-shadow: inset 0 0 35px rgba(3, 12, 18, 0.7);
}

.patch-note-card-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 10% -10%, rgba(74, 194, 214, 0.3) 0%, transparent 55%),
                radial-gradient(circle at 85% 10%, rgba(45, 119, 168, 0.25) 0%, transparent 50%);
    mix-blend-mode: screen;
}

.patch-note-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.patch-note-header h2,
.patch-note-header h3 {
    margin: 0;
    font-family: 'Tektur', 'Segoe UI', sans-serif;
    letter-spacing: 0.04em;
}

.patch-note-header h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.patch-note-header h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    text-transform: none;
}

.patch-note-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(148, 210, 227, 0.85);
}

.patch-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(203, 213, 225, 0.65);
}

.patch-note-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 177, 202, 0.35);
    background: rgba(59, 177, 202, 0.12);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.7rem;
    color: rgba(226, 232, 240, 0.9);
}

.patch-note-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(226, 232, 240, 0.75);
    font-variant-numeric: tabular-nums;
}

.patch-note-summary {
    margin: 0 0 var(--space-sm);
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.95rem;
    line-height: 1.7;
}

.patch-note-body {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.92rem;
    line-height: 1.75;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.patch-note-body p {
    margin: 0;
}

.patch-note-card-empty,
.patch-note-card-empty-history {
    text-align: left;
    border-style: dashed;
    border-color: rgba(59, 177, 202, 0.35);
    background: linear-gradient(180deg, rgba(8, 22, 33, 0.9) 0%, rgba(6, 16, 25, 0.95) 100%);
}

.patch-note-card-empty-history .patch-note-summary {
    margin-bottom: 0;
}

.patch-notes-shell .panel-section p {
    max-width: none;
}

@media (max-width: 768px) {
    .patch-notes-shell {
        gap: var(--space-lg);
    }

    .patch-note-card {
        padding: 1.1rem 1.25rem;
    }

    .patch-note-header {
        gap: 0.5rem;
    }
}

/* Mobile: Always show copy icon */
@media (max-width: 768px) {
    .system-name-copyable .copy-icon {
        opacity: 0.7;
    }

    .system-name-copyable:active .copy-icon {
        opacity: 1;
        color: #4ac2d6;
    }

    .no-docking-indicator .material-icons {
        margin-right: 0.2rem;
    }

    .no-docking-indicator {
        margin-left: 0;
    }

    .island-indicator .material-icons {
        margin-right: 0.2rem;
    }

    .island-indicator {
        margin-left: 0;
    }
}

.markdown-content p {
    margin: 0 0 0.75rem;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.5rem;
}

.markdown-content li + li {
    margin-top: 0.25rem;
}

.markdown-content code {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(157, 221, 224, 0.12);
    font-family: "Fira Code", "Source Code Pro", Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 0.85rem;
}

.markdown-content pre {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(7, 12, 25, 0.85);
    overflow-x: auto;
    font-family: "Fira Code", "Source Code Pro", Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 0.85rem;
}

.markdown-content a {
    color: #4ac2d6;
    text-decoration: underline;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.markdown-content h1 {
    font-size: 1.6rem;
}

.markdown-content h2 {
    font-size: 1.4rem;
}

.markdown-content h3 {
    font-size: 1.3rem;
}

.markdown-content blockquote {
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    border-left: 3px solid rgba(74, 194, 214, 0.5);
    background: rgba(74, 194, 214, 0.08);
}
