:root {
    --bg: #050710;
    --panel: rgba(13, 20, 34, 0.76);
    --panel-strong: rgba(18, 31, 50, 0.9);
    --text: #e8f3ff;
    --muted: #8ea6bf;
    --line: rgba(120, 220, 255, 0.22);
    --cyan: #67e8ff;
    --cyan-soft: rgba(103, 232, 255, 0.16);
    --green: #46f28a;
    --amber: #ffd166;
    --red: #ff4d6d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 255, 255, 0.16), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.18), transparent 36rem),
        linear-gradient(135deg, #03050b, var(--bg));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.glass {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px;
    margin-bottom: 24px;
}

.eyebrow {
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 700;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

h2 {
    font-size: 20px;
    margin-bottom: 18px;
}

p, small, .note {
    color: var(--muted);
    line-height: 1.55;
}

.eve-time {
    min-width: 170px;
    padding: 18px;
    border-radius: 18px;
    background: var(--cyan-soft);
    border: 1px solid var(--line);
    text-align: right;
}

.eve-time span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.eve-time strong {
    font-size: 26px;
    color: var(--cyan);
}

.grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 24px;
}

.panel {
    padding: 24px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 700;
}

input[type="text"], input:not([type]) {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(1, 6, 13, 0.74);
    color: var(--text);
    outline: none;
}

input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(103, 232, 255, 0.12);
}

form > label {
    display: block;
    margin-top: 16px;
}

.radio-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.radio-row label {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
}

.primary {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #14c8ff, #7c3aed);
    color: white;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
}

.primary:hover {
    filter: brightness(1.1);
}

.legend-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 18px currentColor;
}

.clear { color: var(--green); background: var(--green); }
.warning { color: var(--amber); background: var(--amber); }
.danger { color: var(--red); background: var(--red); }

.results {
    margin-top: 24px;
    padding: 24px;
}

.hidden {
    display: none;
}

.summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat {
    padding: 16px;
    border-radius: 16px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.stat strong {
    font-size: 22px;
}

.route-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
}

.route-table th,
.route-table td {
    padding: 13px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.route-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.route-table tr {
    background: rgba(255,255,255,0.025);
}

.route-table tr.risk-clear {
    box-shadow: inset 4px 0 0 var(--green);
}

.route-table tr.risk-warning {
    box-shadow: inset 4px 0 0 var(--amber);
}

.route-table tr.risk-danger {
    box-shadow: inset 4px 0 0 var(--red);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    font-size: 13px;
}

.error {
    color: var(--red);
}

.suggestions {
    position: absolute;
    z-index: 10;
    width: min(420px, calc(100vw - 64px));
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #08111f;
    box-shadow: var(--shadow);
}

.suggestion {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.suggestion:hover {
    background: rgba(103, 232, 255, 0.14);
}

@media (max-width: 850px) {
    .hero, .grid, .field-grid, .summary {
        grid-template-columns: 1fr;
    }
    .hero {
        flex-direction: column;
        align-items: stretch;
    }
    .eve-time {
        text-align: left;
    }
}

.result-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.small-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(103, 232, 255, 0.12);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.small-button:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.warning-panel {
    margin: 0 0 22px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 77, 109, 0.32);
    background: rgba(255, 77, 109, 0.08);
}

.warning-panel h3 {
    margin: 0 0 12px;
    color: var(--red);
}

.warning-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.warning-item {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    border-left: 4px solid var(--amber);
}

.warning-item.risk-danger {
    border-left-color: var(--red);
}

.warning-item strong,
.warning-item span {
    display: block;
}

.warning-item span,
.inline-warning {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 850px) {
    .result-heading {
        flex-direction: column;
    }
}


/* EVE-style security status colours. Classes are based on the displayed 0.0-1.0 band. */
.eve-sec {
    font-weight: 800;
    text-shadow: 0 0 10px currentColor;
}

.eve-sec-10 { color: #2fefef; } /* 1.0 */
.eve-sec-09 { color: #48f0c0; } /* 0.9 */
.eve-sec-08 { color: #00ef47; } /* 0.8 */
.eve-sec-07 { color: #00f000; } /* 0.7 */
.eve-sec-06 { color: #8fef2f; } /* 0.6 */
.eve-sec-05 { color: #efef00; } /* 0.5 */
.eve-sec-04 { color: #d77700; } /* 0.4 */
.eve-sec-03 { color: #f06000; } /* 0.3 */
.eve-sec-02 { color: #f04800; } /* 0.2 */
.eve-sec-01 { color: #d73000; } /* 0.1 */
.eve-sec-00 { color: #f00000; } /* 0.0 / nullsec */
.eve-sec-unknown { color: var(--muted); text-shadow: none; }

/* Backwards-compatible classes, safe to leave in place if cached HTML ever uses them. */
.sec-highsec{color:#46f28a;font-weight:700;}
.sec-lowsec{color:#ffd166;font-weight:700;}
.sec-nullsec{color:#ff4d6d;font-weight:700;}
