:root {
    --color-bg-dark: #19120c;
    --color-bg-medium: #322720;
    --color-white: #fff;
    --color-white-70: rgba(255, 255, 255, 0.7);
    --color-white-40: rgba(255, 255, 255, 0.4);
    --color-white-20: rgba(255, 255, 255, 0.2);
    --color-white-18: rgba(255, 255, 255, 0.18);
    --color-black-20: rgba(0, 0, 0, 0.2);
    --color-black-30: rgba(0, 0, 0, 0.3);
    --color-black-50: rgba(0, 0, 0, 0.5);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
}

header {
    position: absolute;
    z-index: -1;
}

main {
    height: 100vh;
    width: 100vw;
    position: relative;
}

#splash {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        135deg,
        #0A0A0F 0%,
        #1A1F3C 33%,
        #003344 66%,
        #2C0D33 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    flex-direction: column;
    transition: opacity 0.25s ease-out;
}

#ComposeTarget {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-background img {
    max-width: 90%;
    height: auto;
    margin-bottom: 40px;
    filter: drop-shadow(0 0 15px var(--color-white-40));
    animation: float 3s ease-in-out infinite;
}

.gradient-background .logo {
    width: 35vw;
    max-width: 35%;
    height: auto;
    margin-bottom: 0;
    display: block;
}

/* Loading indicator styles */
.loading-container {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    box-shadow: 0 8px 32px var(--color-black-20);
    width: 85%;
    max-width: 320px;
    border: 1px solid var(--color-white-18);
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-spinner::before {
    border: 3px solid var(--color-white-20);
}

.loading-spinner::after {
    border: 3px solid transparent;
    border-top-color: var(--color-white);
    border-left-color: var(--color-white);
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px var(--color-white-40);
}

.loading-text {
    position: relative;
    color: var(--color-white);
    margin-top: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    letter-spacing: 1.5px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    text-shadow: 0 2px 5px var(--color-black-30);
}

.loading-text::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
}

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

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 20px;
        width: 90%;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
    }

    .gradient-background img {
        max-width: 85%;
        margin-bottom: 30px;
    }

    .gradient-background .logo {
        width: 55vw;
        max-width: 55%;
    }
}
