/* ============================================
    IPD Splash Screen - Modern & Elegant Design
    ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-blue: #1a5fb4;
    --primary-blue-light: #3584e4;
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --white: #FFFFFF;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* ============================================
    Splash Container - Modern Gradient Background
    ============================================ */

.splash-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 50%, var(--accent-purple) 100%);
    position: relative;
    overflow: hidden;
}

/* Animated background particles */
.splash-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ============================================
    Splash Content
    ============================================ */

.splash-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    max-width: 400px;
    width: 90%;
    height: 100%;
    animation: contentFadeIn 0.6s ease-out;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main content wrapper untuk logo dan subtitle */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

/* ============================================
    Logo IPD - Modern Gradient Text
    ============================================ */

.logo-container {
    animation: logoAppear 0.8s ease-out 0.2s both;
}

@keyframes logoAppear {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.logo-text {
    font-size: 64px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 4px;
    text-align: center;
    margin: 0;
    
    /* Modern gradient text effect */
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Subtle float animation */
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
    Subtitle & Version
    ============================================ */

.subtitle-container {
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.version {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
    Modern Loading Spinner - Bouncing Dots
    ============================================ */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.loading-spinner {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
.loading-dot:nth-child(4) { animation-delay: 0.6s; }
.loading-dot:nth-child(5) { animation-delay: 0.8s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading text */
.loading-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================
    Progress Bar - Modern Minimal Style
    ============================================ */

.progress-container {
    width: 100%;
    max-width: 200px;
    margin-top: var(--spacing-xl);
    animation: fadeIn 0.6s ease-out 0.8s both;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 100px;
    width: 0%;
    animation: progressFill 2.5s ease-out forwards;
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ============================================
    Page Transitions - Consistent Design
    ============================================ */

.page-transition {
    animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-exit {
    animation: pageExit 0.3s ease-in;
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Loading overlay for page transitions */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: overlayFadeOut 0.3s ease-out 0.5s forwards;
}

@keyframes overlayFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ============================================
    Responsive Design
    ============================================ */

@media (max-width: 480px) {
    .logo-text {
        font-size: 48px;
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: 16px;
    }

    .version {
        font-size: 12px;
    }

    .loading-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 360px) {
    .logo-text {
        font-size: 40px;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 14px;
    }
}

/* ============================================
    Landscape Mode
    ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .splash-content {
        flex-direction: row;
        gap: var(--spacing-lg);
    }

    .main-content {
        flex-direction: row;
        gap: var(--spacing-md);
    }

    .logo-text {
        font-size: 48px;
    }

    .loading-container {
        margin-top: 0;
    }
}

/* ============================================
    Accessibility
    ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
