/* ============================================
   HUSHIYAR - Loader/Splash Screen Styles
   ============================================ */

:root {
    --loader-bg: #0f0f12;
    --loader-accent: #c8ff00;
    --loader-text: #e4e4e7;
    --loader-text-muted: #71717a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Loader Container */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loader-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

/* Animated Background - Subtle Gradient */
.loader-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(200, 255, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(200, 255, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(200, 255, 0, 0.03) 0%, transparent 50%);
    animation: bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Floating Particles */
.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--loader-accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1.5s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 0.5s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 2s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 1s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 2.5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 0.8s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 1.8s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 0.3s;
}

.particle:nth-child(10) {
    left: 15%;
    animation-delay: 2.2s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
        transform: translateY(80vh) scale(1);
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-20vh) scale(0.5);
        opacity: 0;
    }
}

/* Main Content */
.loader-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Logo Container */
.loader-logo {
    margin-bottom: 32px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

/* Logo Glow Ring */
.logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(200, 255, 0, 0.3);
    border-radius: 50%;
    animation: ringPulse 2s ease-in-out infinite;
}

.logo-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-top-color: var(--loader-accent);
    border-radius: 50%;
    animation: ringSpin 1.5s linear infinite;
}

@keyframes ringPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes ringSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Logo Icon */
.logo-icon {
    position: relative;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--loader-accent) 0%, #a8d600 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 20px 40px rgba(200, 255, 0, 0.3),
        0 0 60px rgba(200, 255, 0, 0.2);
}

.logo-icon svg {
    width: 50px;
    height: 50px;
    color: #0f0f12;
}

/* App Name */
.loader-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--loader-text);
    margin-bottom: 8px;
    letter-spacing: -1px;
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 0.3s;
}

/* Tagline */
.loader-tagline {
    font-size: 1.1rem;
    color: var(--loader-text-muted);
    margin-bottom: 48px;
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 0.5s;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loader-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 0.7s;
}

/* Modern Progress Spinner */
.spinner-modern {
    position: relative;
    width: 48px;
    height: 48px;
}

.spinner-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(200, 255, 0, 0.15);
    border-radius: 50%;
}

.spinner-fill {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--loader-accent);
    border-right-color: var(--loader-accent);
    border-radius: 50%;
    animation: spinFill 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes spinFill {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 3px;
    background: rgba(200, 255, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--loader-accent), #a8d600);
    border-radius: 10px;
    animation: progressAnim 2s ease-in-out infinite;
}

@keyframes progressAnim {
    0% {
        width: 0%;
        transform: translateX(0);
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
        transform: translateX(0);
    }
}

/* Loading Text */
.loader-text {
    font-size: 0.875rem;
    color: var(--loader-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loader-text span {
    display: inline-block;
    animation: letterBounce 1.4s ease-in-out infinite;
}

.loader-text span:nth-child(1) {
    animation-delay: 0s;
}

.loader-text span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-text span:nth-child(3) {
    animation-delay: 0.2s;
}

.loader-text span:nth-child(4) {
    animation-delay: 0.3s;
}

.loader-text span:nth-child(5) {
    animation-delay: 0.4s;
}

.loader-text span:nth-child(6) {
    animation-delay: 0.5s;
}

.loader-text span:nth-child(7) {
    animation-delay: 0.6s;
}

@keyframes letterBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Footer Branding */
.loader-footer {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 1s;
}

.loader-footer-text {
    font-size: 0.8rem;
    color: var(--loader-text-muted);
}

.loader-version {
    font-size: 0.75rem;
    color: rgba(200, 255, 0, 0.6);
    font-weight: 600;
}

/* Fade Out Animation */
.loader-container.fade-out {
    animation: fadeOutLoader 0.5s ease forwards;
}

@keyframes fadeOutLoader {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .logo-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .logo-icon svg {
        width: 40px;
        height: 40px;
    }

    .logo-ring {
        width: 100px;
        height: 100px;
    }

    .loader-title {
        font-size: 2rem;
    }

    .loader-tagline {
        font-size: 1rem;
    }
}