/*
 * Dark terminal theme matching the WPF client's Theme.xaml, so the web
 * client looks like the same game rather than a different product. Hex
 * values copied verbatim from Theme.xaml (see BYTECRAWL_GDD.md section 17
 * for the WPF theme's own history) — kept in sync by hand for now since
 * there's no shared design-token file between WPF (XAML resources) and
 * Blazor (CSS) to pull from.
 */

:root {
    --bg: #1E1E1E;
    --panel: #252526;
    --border: #3C3C3C;
    --text: #D4D4D4;
    --muted: #8A8A8A;
    --accent: #4FC1FF;
    --success: #89D185;
    --danger: #FF6B6B;
    --gold: #D7BA7D;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Cascadia Code", "Consolas", "Segoe UI", monospace, sans-serif;
    font-size: 14px;
}

#app {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

.loading-screen {
    color: var(--muted);
    padding: 40px;
    text-align: center;
}

h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: var(--text);
}

h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px 0;
}

h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin: 12px 0 4px 0;
}

label {
    display: block;
    margin: 0 0 2px 0;
    color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 8px;
    margin-bottom: 10px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    margin-right: 8px;
}

button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

button.primary {
    border-color: var(--accent);
}

button.link {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 0;
    font-size: 11px;
    text-decoration: underline;
    margin-top: 10px;
}

button.link:hover {
    color: var(--accent);
}

.hint {
    color: var(--muted);
    font-size: 11px;
    margin: 0 0 16px 0;
}

.status {
    color: var(--muted);
    margin: 0 0 16px 0;
}

.status.error {
    color: var(--danger);
    font-weight: 600;
}

.error-text {
    color: var(--danger);
    margin: 6px 0;
}

.reconnect-banner {
    background: var(--danger);
    color: var(--bg);
    font-weight: 600;
    text-align: center;
    padding: 8px 12px;
    margin: -24px -16px 16px -16px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.player-header .name {
    font-size: 20px;
    font-weight: bold;
}

.class-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.class-dot.supporter { background: var(--accent); }
.class-dot.udvikler { background: var(--success); }
.class-dot.backoffice { background: var(--gold); }

.level-line {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.xp-bar-track {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}

.xp-bar-fill {
    background: var(--accent);
    height: 100%;
    transition: width 0.3s ease;
}

.xp-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.incident-warning {
    color: var(--danger);
    font-weight: 600;
}

select {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 8px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13px;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    max-height: 320px;
    overflow-y: auto;
}

.activity-list li {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-list li:hover:not(.locked) {
    background: var(--bg);
}

.activity-list li.active {
    color: var(--accent);
    font-weight: 600;
}

.activity-list li.locked {
    color: var(--muted);
    cursor: default;
    opacity: 0.6;
}

.activity-name {
    font-weight: 600;
}

.activity-meta {
    color: var(--muted);
    font-size: 11px;
}

.activity-risk {
    color: var(--danger);
    font-size: 11px;
}

.gear-toast {
    color: var(--success);
    font-weight: 600;
    margin: 0 0 8px 0;
}

.gear-list {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
}

.gear-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.gear-row:last-child {
    border-bottom: none;
}

.gear-slot {
    color: var(--muted);
    font-size: 10px;
    width: 60px;
    flex-shrink: 0;
}

.gear-name {
    flex: 1;
    font-size: 12px;
}

.gear-name.equipped {
    color: var(--accent);
    font-weight: 600;
}

.gear-meta {
    color: var(--muted);
    font-size: 10px;
    font-weight: normal;
    margin-left: 4px;
}

.gear-badge {
    color: var(--accent);
    font-weight: 600;
    font-size: 10px;
}

#blazor-error-ui {
    display: none;
    background: var(--danger);
    color: var(--bg);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    font-weight: 600;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: var(--bg);
    text-decoration: underline;
    margin-left: 8px;
    cursor: pointer;
}
