/* Import appropriate fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Splash Screen Container */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f3b21; /* Dark green background */
    display: flex; /* Show by default for first load */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* For the video background */
#splash-video {
    position: absolute;
    top: -50px; /* Move video up to show more of the bottom */
    left: 0;
    width: 100%;
    height: calc(100% + 100px); /* Increase height to maintain coverage */
    object-fit: cover;
    object-position: center 70%; /* Position focus point lower in the frame */
    z-index: -1;
}

/* Title and subtitle container */
.splash-content {
    text-align: center;
    z-index: 10;
    color: white;
    padding: 2.5rem 2rem;
    background-color: rgba(255, 255, 255, 0.85); /* Slightly more opaque background for better readability */
    border-radius: 1.5rem;
    max-width: 90%;
    width: 400px;
    animation: fadeIn 1.2s ease-in-out forwards;
    margin-top: -80px; /* Adjusted to better center content with longer text */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0; /* Start invisible and fade in */
}

/* Title styling */
.splash-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.2;
}

.splash-welcome {
    display: block;
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a202c; /* text-gray-900 */
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInText 0.8s ease-in-out 0.5s forwards;
}

.splash-treedeck {
    display: block;
    font-size: 4.2rem;
    font-weight: 700;
    color: #047857; /* text-primary-600 */
    letter-spacing: -0.025em;
    opacity: 0;
    animation: fadeInText 0.8s ease-in-out 1s forwards;
}

/* Subtitle styling - Updated April 2025 */
.splash-subtitle {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin-top: 6rem; /* Increased spacing between title and subtitle to 6rem */
    line-height: 1.3;
    text-align: center;
    padding: 0 0.5rem;
}

/* New container for subtitle text */
.splash-subtitle-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.splash-subtitle-line,
.splash-subtitle-text div.splash-subtitle-line {
    display: block;
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a202c; /* text-gray-900 */
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInText 0.8s ease-in-out 1.5s forwards;
    line-height: 1.2;
}

.splash-subtitle-line.highlight,
.splash-subtitle-text div.splash-subtitle-line.highlight {
    color: #047857; /* text-primary-600 */
    font-size: 2.3rem;
    font-weight: 700;
    opacity: 0;
    animation: fadeInText 0.8s ease-in-out 2s forwards;
    line-height: 1.2;
}

/* Main content fade in */
#main-content {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .splash-content {
        width: 320px;
        padding: 2rem 1.5rem;
    }
    .splash-welcome {
        font-size: 1.8rem;
    }
    .splash-treedeck {
        font-size: 3.2rem;
    }
    .splash-subtitle-line,
    .splash-subtitle-text div.splash-subtitle-line {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }
    .splash-subtitle-line.highlight,
    .splash-subtitle-text div.splash-subtitle-line.highlight {
        font-size: 2rem;
    }
    .splash-subtitle {
        margin-top: 4rem;
    }
}

@media (max-width: 360px) {
    .splash-content {
        width: 90%;
        padding: 1.5rem 1rem;
    }
    .splash-welcome {
        font-size: 1.6rem;
    }
    .splash-treedeck {
        font-size: 2.8rem;
    }
    .splash-subtitle-line,
    .splash-subtitle-text div.splash-subtitle-line {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }
    .splash-subtitle-line.highlight,
    .splash-subtitle-text div.splash-subtitle-line.highlight {
        font-size: 1.7rem;
    }
    .splash-subtitle {
        margin-top: 3rem;
    }
}