html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: 100%;
    background-color: #11111b;
    color: #cdd6f4;
}

#app {
    min-height: 100%;
    height: 100%;
    background-color: #11111b;
}

/* Ensure MudBlazor layout fills the viewport */
.mud-layout {
    min-height: 100vh;
    background-color: #11111b;
}

/* Loading screen styles */
.loading-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e1e2e 0%, #11111b 100%);
}

.loading-content {
    text-align: center;
    color: #cdd6f4;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(129, 140, 248, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-content p {
    font-size: 1.2rem;
    margin: 0;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #721c24;
    color: #f8d7da;
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    z-index: 9999;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: #f8d7da;
    margin-left: 1rem;
    cursor: pointer;
}

/* Valid/invalid form states */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #181825;
}

::-webkit-scrollbar-thumb {
    background: #45475a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #585b70;
}

/* PWA install prompt styling */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #313244;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Rounded corners */
.rounded-xl {
    border-radius: 12px !important;
}

.rounded-lg {
    border-radius: 8px !important;
}

/* Glisten animation for CTA buttons */
@keyframes glisten {
    0% {
        transform: translateX(-100%);
    }
    6% {
        transform: translateX(200%);
    }
    100% {
        transform: translateX(200%);
    }
}

.btn-glisten {
    position: relative !important;
    overflow: hidden !important;
}

.btn-glisten::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: translateX(-100%);
    animation: glisten 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
