:root {
    --app-background: #0D0D0D;
    --surface: #181818;
    --surface-light: #222222;
    --surface-elevated: #2A2A2A;
    --surface-warm: #140A05;

    --primary: #FF6B00;
    --primary-dark: #CC4E00;
    --primary-glow: #FF8C00;
    --accent-2: #FFB74D;

    --text-primary: #F0E6D3;
    --text-secondary: #9E9E9E;
    --text-dim: #5C5C5C;
    --text-dark: #1A1A1A;

    --border: #2A2A2A;
    --border-accent: rgba(255, 107, 0, 0.25);

    --error: #FF5252;
    --success: #69F0AE;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--app-background);
    color: var(--text-primary);
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
    height: 100%;
}

#app {
    min-height: 100vh;
}

a {
    color: var(--primary);
}

h1, h2, h3 {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

input[type="text"], input[type="password"], input[type="url"], input[type="number"] {
    background-color: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 16px;
    width: 100%;
    outline: none;
}

    input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, input[type="number"]:focus {
        border-color: var(--primary);
    }

    input::placeholder {
        color: var(--text-dim);
    }

.btn {
    display: inline-block;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s, transform 0.05s;
}

    .btn:active {
        transform: scale(0.98);
    }

.btn-primary {
    background-color: var(--primary);
    color: var(--text-dark);
    font-weight: 600;
}

    .btn-primary:hover {
        background-color: var(--primary-glow);
    }

    .btn-primary:disabled {
        background-color: var(--surface-light);
        color: var(--text-dim);
        cursor: not-allowed;
    }

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

    .btn-secondary:hover {
        border-color: var(--primary);
    }

.btn-back {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 14px;
    font-size: 18px;
}

.panel {
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 24px;
}

.field-group {
    margin-bottom: 16px;
}

    .field-group > label {
        display: block;
        font-size: 12px;
        color: var(--primary);
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 6px;
    }

.section-header {
    color: var(--primary);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.error-text {
    color: var(--error);
    font-size: 13px;
    line-height: 1.4;
}

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

.text-dim {
    color: var(--text-dim);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.title {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 36px;
    color: var(--primary);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.lobby-card {
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lobby-empty {
    color: var(--text-dim);
    text-align: center;
    padding: 40px;
}

.home-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    padding: 30px;
}

.login-shell .btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
}

.login-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-content .panel {
    width: 100%;
    max-width: 360px;
}

.lobby-shell {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

h1:focus { outline: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
