/* ================================================== */
/* SPLASH SCREEN - Professional Loading Screen       */
/* ================================================== */

/* Hide app content while splash is active */
body.splash-screen-active .app-container,
body.splash-screen-active .sidebar,
body.splash-screen-active .mobile-nav {
    display: none !important;
}

/* Splash Screen Overlay */
#splash-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

/* Background Image */
.splash-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Splashscreen/SplashScreen_1080x1920_V02.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Content Container */
.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

/* Powerhabit Title */
.splash-title {
    font-size: 6rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 2rem 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                 0 0 40px rgba(255, 255, 255, 0.3);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Flicker Animation für Buchstaben */
.flicker-letter {
    display: inline-block;
    opacity: 0;
    animation: flicker-on 0.1s forwards;
}

@keyframes flicker-on {
    0% {
        opacity: 0;
        text-shadow: none;
    }
    20% {
        opacity: 1;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }
    40% {
        opacity: 0.3;
    }
    60% {
        opacity: 1;
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    }
    80% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

/* Word Groups */
.word-group {
    margin: 0;
    display: inline;
    margin-right: -0.3em;
}

.word-group:last-child {
    margin-right: 0;
    margin-left: 0.1em;
}

/* Habit Fact Wrapper */
.splash-fact-wrapper {
    margin: 0 0 3rem 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.splash-fact-wrapper.visible {
    opacity: 1;
}

/* Habit Fact - Main */
.splash-fact {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.98);
    margin: 0 0 1rem 0;
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-weight: 600;
    max-width: 500px;
}

.splash-fact.visible {
    opacity: 1;
}

/* Habit Fact - Info Text */
.splash-fact-info {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 400;
    max-width: 500px;
}

.splash-fact-info.visible {
    opacity: 1;
}

/* Progress Bar Container */
.splash-progress {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 2rem 0 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.splash-progress.visible {
    opacity: 1;
}

/* Progress Bar Fill */
.splash-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8), 
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0.8)
    );
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 0.3s ease-out;
    animation: shimmer 1.5s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* Status Text */
.splash-status-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    min-height: 1.5rem;
}

.splash-status-text.visible {
    opacity: 1;
}

.splash-status-text.fade-out {
    opacity: 0 !important;
}

/* CTA Button */
.splash-cta-button {
    display: none;
    margin-top: 2rem;
    padding: 16px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border: none;
    border-radius: 30px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15%;
}

.splash-cta-button:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.splash-cta-button:active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ================================================== */
/* RESPONSIVE - Mobile Optimierung                   */
/* ================================================== */

@media (max-width: 768px) {
    .splash-title {
        font-size: 3.75rem;
        margin-bottom: 1.5rem;
    }

    .splash-fact {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .splash-fact-info {
        font-size: 0.9rem;
    }

    .splash-progress {
        max-width: 250px;
    }

    .splash-status-text {
        font-size: 0.85rem;
    }

    .splash-cta-button {
        font-size: 1rem;
        padding: 12px 35px;
    }
}

@media (max-width: 480px) {
    .splash-title {
        font-size: 3rem;
    }

    .splash-fact {
        font-size: 1rem;
        max-width: 300px;
    }

    .splash-fact-info {
        font-size: 0.85rem;
        max-width: 300px;
    }

    .splash-cta-button {
        font-size: 0.95rem;
        padding: 10px 30px;
    }
}
