*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

a {
    color: var(--magenta);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--magenta-hover); }

button {
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

input, textarea, select {
    font-family: inherit;
    color: inherit;
}

.gradient-text {
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--bg-0);
    flex-shrink: 0;
}
.brand-logo.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }
.brand-logo.xs { width: 28px; height: 28px; border-radius: 9px; font-size: 15px; }

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--online);
    display: inline-block;
    animation: pulse 1.6s infinite;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    width: fit-content;
}

.badge-18 {
    display: inline-block;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-full);
    padding: 14px 28px;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease), background var(--dur-fast) var(--ease);
    text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: var(--magenta);
    color: var(--bg-0);
    box-shadow: 0 0 32px var(--magenta-glow);
}
.btn.primary:hover { background: var(--magenta-hover); }
.btn.secondary {
    background: var(--bg-1);
    color: var(--text);
    border: 1px solid var(--border-soft);
}
.btn.secondary:hover { background: var(--bg-2); }
.btn.ghost {
    background: transparent;
    color: var(--text-soft);
    border: 1px solid var(--border-soft);
    font-weight: 500;
}
.btn.ghost:hover { color: var(--text); background: var(--bg-1); }
.btn.danger {
    background: var(--danger);
    color: var(--bg-0);
}
.btn.block { width: 100%; }
.btn.sq { border-radius: var(--radius-md); }

.card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}
.card.overlay {
    box-shadow: var(--elev-2);
}

.input {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    width: 100%;
    transition: border-color var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--text-dim); }
.input:focus { border-color: var(--magenta); }

.gem-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
}
.gem-badge svg { flex-shrink: 0; }

.online-status {
    color: var(--online);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.section-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.duotone-magenta {
    background: repeating-linear-gradient(45deg, #3A2733, #3A2733 10px, #332330 10px, #332330 20px);
}
.duotone-cyan {
    background: repeating-linear-gradient(45deg, #22333A, #22333A 10px, #1F2E36 10px, #1F2E36 20px);
}
.duotone-mix {
    background: repeating-linear-gradient(45deg, #2E2430, #2E2430 12px, #292029 12px, #292029 24px);
}

.avatar {
    border-radius: 99px;
    background: repeating-linear-gradient(45deg, #3A2733, #3A2733 6px, #332330 6px, #332330 12px);
    flex-shrink: 0;
    overflow: hidden;
}

#blazor-error-ui {
    background: var(--bg-2);
    color: var(--danger);
    border-top: 1px solid var(--danger);
    bottom: 0;
    display: none;
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-body);
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 10px;
    color: var(--text-muted);
}

.blazor-error-boundary {
    background: var(--bg-2);
    color: var(--danger);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--danger);
}
.blazor-error-boundary::after {
    content: "Something went wrong here.";
}

.vivon-splash {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.vivon-splash-logo {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 56px;
    color: var(--bg-0);
    box-shadow: 0 0 80px var(--magenta-glow);
    animation: pulse 2s infinite;
}
