html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    height: 100%;
    background-color: #f8f9fa;
}

/* Prerender interactivity gap: dim controls until SignalR circuit connects */
body:not(.blazor-connected) .mud-appbar .mud-button-root,
body:not(.blazor-connected) .mud-appbar .mud-icon-button {
    pointer-events: none;
    opacity: 0.4;
}

body:not(.blazor-connected) .mud-appbar::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: blazor-pulse 1s ease-in-out infinite;
    margin-right: 12px;
}

@keyframes blazor-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

h1:focus {
    outline: none;
}

/* Banner + Logo — matches Angular SPA */
.site-banner {
    width: 100%;
    height: 150px;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.site-banner .logo-container {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom-right-radius: 8px;
}

.site-banner .logo-container img {
    height: 100px;
    width: auto;
}

@media (max-width: 768px) {
    .site-banner {
        height: 80px;
    }
    .site-banner .logo-container {
        padding: 8px 12px;
    }
    .site-banner .logo-container img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .site-banner {
        height: 60px;
    }
    .site-banner .logo-container {
        padding: 6px 8px;
    }
    .site-banner .logo-container img {
        height: 36px;
    }
}

/* Promo cards — 300px wide, flex-wrap, matching Angular */
.promo-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

.promo-cards .promo-card {
    width: 300px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .promo-cards {
        flex-direction: column;
        align-items: center;
    }
    .promo-cards .promo-card {
        width: 100%;
        max-width: 350px;
    }
}

/* Star ratings */
.star-filled { color: #ffd700; }
.star-half { color: #ffd700; }
.star-empty { color: #e0e0e0; }

/* Welcome section — centered card, matching Angular */
.welcome-section {
    padding: 10px;
    margin: 0 0 16px 0;
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 15px;
        margin: 0 0 15px 0;
    }
}

/* Nav drawer — compact, anchored below banner + toolbar */
.mud-drawer.mud-drawer-temporary {
    height: auto !important;
    bottom: auto !important;
    top: 198px !important; /* banner 150px + dense AppBar 48px */
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .mud-drawer.mud-drawer-temporary {
        top: 128px !important; /* banner 80px + AppBar 48px */
    }
}

@media (max-width: 480px) {
    .mud-drawer.mud-drawer-temporary {
        top: 108px !important; /* banner 60px + AppBar 48px */
    }
}

/* Gradient header used on search page */
.gradient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Highlight box used in welcome section */
.highlight-box {
    background-color: #f5f5f5;
    border-left: 4px solid #3f51b5;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Blazor error UI */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}