html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f7f1e7;
    color: #33000f;
    overflow: hidden;
    font-family: system-ui, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#splash-screen {
    background-color: #f7f1e7;
    color: #33000f;
}

html.dark-mode {
    background-color: #33000f;
    color: #f7f1e7;
}

html.dark-mode #splash-screen {
    background-color: #33000f;
    color: #f7f1e7;
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.2s 0.2s ease-out, visibility 0.2s 0.2s ease-out;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

#splash-screen h1 {
    font-family: "Roboto Serif", serif;
    font-weight: 600;
    font-size: 3rem;
    letter-spacing: 0.1rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    max-width: 100%;
    padding: 0 2rem;
    word-wrap: break-word;
}

#splash-screen p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 90%;
    word-wrap: break-word;
}

.splash-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(51, 0, 15, 0.3);
    border-top: 5px solid #33000f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark-mode .splash-spinner {
    border: 5px solid rgba(247, 241, 231, 0.3);
    border-top: 5px solid #f7f1e7;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    #splash-screen {
        padding: 15px;
    }

    #splash-screen h1 {
        margin-top: 2.8rem;
    }

    .splash-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}

/* Hide the splash screen when the app content is ready */
.app-ready #splash-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Transition for splash screen */
#splash-screen {
    opacity: 1;
    visibility: visible;
}