html, body {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth theme transitions */
body,
.mud-appbar,
.mud-drawer,
.mud-main-content,
.mud-paper {
    transition: background-color 0.3s ease, color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mud-palette-background);
}

::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-action-default);
}

/* Selection color */
::selection {
    background: rgba(212, 168, 84, 0.3);
    color: inherit;
}

/* Blazor error boundary */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
    border-radius: 4px;
}

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

/* Blazor reconnect UI */
#blazor-error-ui {
    background: var(--mud-palette-warning);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Auth form pages (Login/SignUp within LandingLayout) */
.auth-form-container {
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem .75rem;
}

.auth-form-card {
    width: 100%;
    max-width: 440px;
    background: var(--mud-palette-surface);
    border: 1px solid rgba(212, 168, 84, 0.15);
    border-radius: 12px;
    padding: 2.5rem;
}

.auth-brand {
    display: flex;
    justify-content: center;
}

.auth-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
}

/* Legal pages (Privacy, Terms) */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    line-height: 1.65;
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
}

.legal-page p,
.legal-page ul {
    margin: 0 0 1rem;
}

.legal-page ul {
    padding-left: 1.5rem;
}

.legal-page a {
    color: var(--mud-palette-primary);
}

/* Placeholder pages */
.placeholder-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
}
