:root {
    color-scheme: light dark;
    --bg: #0f1620;
    --card-bg: #1a2433;
    --text: #e8edf4;
    --muted: #93a2b8;
    --accent: #d4a94f;
    --accent-hover: #e6c06a;
    --error-bg: #3a1f24;
    --error-text: #f6b0ba;
    --success-bg: #1f3a2a;
    --success-text: #a6e6b8;
    --field-bg: #101823;
    --field-border: #2c3a4d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(10, 14, 20, 0.35), rgba(10, 14, 20, 0.5)),
        url("jx2_background.png") center / cover no-repeat fixed;
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    padding: 24px;
}

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 420px;
}

.card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--field-border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.server-info {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--field-border);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.server-info h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--accent);
}

.server-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
}

.server-info li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--field-border);
    font-size: 0.85rem;
}

.server-info li.span-2 {
    grid-column: 1 / -1;
    border-bottom: none;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--field-border);
}

.server-info .label {
    color: var(--muted);
}

.server-info .value {
    font-weight: 600;
}

.status-online {
    color: var(--success-text);
}

.status-offline {
    color: var(--error-text);
}

h1 {
    margin: 0 0 24px;
    font-size: 1.4rem;
    text-align: center;
    color: var(--accent);
}

.field {
    margin-bottom: 16px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: var(--accent);
    color: #1a1405;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

@media (max-width: 420px) {
    .server-info ul {
        grid-template-columns: 1fr;
    }
}

.status-updated {
    margin: 16px 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    text-align: right;
}

.page-nav-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.page-nav-bar a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.page-nav-bar a:hover {
    color: var(--text);
}

.page-nav-bar a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.page.page-wide {
    max-width: 720px;
}

.missions-search {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.missions-search:focus {
    outline: none;
    border-color: var(--accent);
}

.missions-table-wrap {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: auto;
}

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

.missions-table th,
.missions-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--field-border);
    text-align: left;
    white-space: nowrap;
}

.missions-table th {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    color: var(--accent);
    font-weight: 600;
}

.muted-note {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.missions-table a {
    color: var(--text);
    text-decoration: none;
}

.missions-table a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.page-nav {
    margin: 0 0 16px;
    font-size: 0.85rem;
}

.page-nav a {
    color: var(--accent);
    text-decoration: none;
}

.page-nav a:hover {
    text-decoration: underline;
}

.mission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    margin: -12px 0 20px;
    font-size: 0.85rem;
    color: var(--muted);
}

.mission-section {
    margin-bottom: 20px;
}

.mission-section h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--accent);
}

.mission-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

.mission-list li {
    margin-bottom: 4px;
}

.mission-story {
    margin: 0;
    padding-left: 20px;
    font-size: 0.88rem;
    color: var(--muted);
}

.mission-story li {
    margin-bottom: 8px;
}

.mission-tip {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
    border-left: 3px solid var(--field-border);
    padding-left: 12px;
    margin: 0 0 20px;
}
