html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0F172A;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #F8FAFC;
    direction: rtl;
}

/* Splash Screen Overlay Container */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Retano Logo & Glowing Ring */
.splash-logo-container {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.splash-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: #6366F1;
    border-right-color: #818CF8;
    animation: splash-spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.splash-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

.splash-logo svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* App Title & Subtitle */
.splash-title {
    font-size: 24px;
    font-weight: 700;
    color: #F8FAFC;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.splash-subtitle {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 32px;
}

/* Progress bar line */
.splash-progress-bar {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.splash-progress-value {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #6366F1, #A5B4FC);
    border-radius: 4px;
    animation: splash-loading 1.8s ease-in-out infinite;
}

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

@keyframes splash-loading {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Canvas Fade-In Transition */
canvas {
    animation: canvas-fade-in 0.6s ease-out forwards;
}

@keyframes canvas-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}