/* ==========================================
   SITE LOADER - لودینگ سایت (مینیمال و دارک)
   ========================================= */

.site-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.site-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loader Content Container */
.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 10;
    animation: loaderFadeIn 0.8s ease;
}

@keyframes loaderFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Container */
.loader-logo-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
    z-index: 3;
    position: relative;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Rotating Ring - حلقه چرخان */
.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top: 1.5px solid rgba(255, 255, 255, 0.3);
    border-right: 1.5px solid rgba(255, 255, 255, 0.1);
    animation: ringRotate 2s linear infinite;
}

@keyframes ringRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Inner Ring - حلقه داخلی */
.loader-ring::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    animation: ringRotate 3s linear infinite reverse;
}

/* Loading Text */
.loader-text {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Loading Dots */
.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loader-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.7);
        opacity: 0.3;
    }
    40% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.loader-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 100%
    );
}

/* Background Elements - خیلی ملایم */
.loader-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.03;
    filter: blur(80px);
}

.loader-decoration-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: decorationFloat1 10s ease-in-out infinite;
}

.loader-decoration-2 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    right: -80px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 70%
    );
    animation: decorationFloat2 8s ease-in-out infinite;
}

@keyframes decorationFloat1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, -20px);
    }
}

@keyframes decorationFloat2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-15px, 15px);
    }
}

/* Floating Particles - بسیار ملایم */
.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.15;
}

.loader-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

.loader-particle:nth-child(1) {
    left: 15%;
    animation-delay: 0s;
}

.loader-particle:nth-child(2) {
    left: 35%;
    animation-delay: 1.2s;
}

.loader-particle:nth-child(3) {
    left: 55%;
    animation-delay: 2.4s;
}

.loader-particle:nth-child(4) {
    left: 75%;
    animation-delay: 0.8s;
}

.loader-particle:nth-child(5) {
    left: 85%;
    animation-delay: 2s;
}

@keyframes particleFloat {
    0% {
        bottom: -5%;
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        bottom: 105%;
        opacity: 0;
    }
}

/* ==========================================
   RESPONSIVE - ریسپانسیو کامل
   ========================================= */

/* Desktop Large (1440px+) */
@media (min-width: 1440px) {
    .loader-content {
        gap: 32px;
    }
    
    .loader-logo-container {
        width: 160px;
        height: 160px;
    }
    
    .loader-ring {
        width: 190px;
        height: 190px;
    }
    
    .loader-text {
        font-size: 14px;
        letter-spacing: 2.5px;
    }
    
    .loader-progress {
        width: 240px;
        height: 1.5px;
    }
}

/* Desktop Medium (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .loader-content {
        gap: 30px;
    }
    
    .loader-logo-container {
        width: 150px;
        height: 150px;
    }
    
    .loader-ring {
        width: 180px;
        height: 180px;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .loader-content {
        gap: 26px;
    }
    
    .loader-logo-container {
        width: 130px;
        height: 130px;
    }
    
    .loader-ring {
        width: 160px;
        height: 160px;
        border-width: 1.5px;
    }
    
    .loader-ring::before {
        border-width: 1px;
    }
    
    .loader-text {
        font-size: 12px;
        letter-spacing: 1.8px;
    }
    
    .loader-progress {
        width: 180px;
    }
}

/* Mobile Large (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .loader-content {
        gap: 24px;
    }
    
    .loader-logo-container {
        width: 120px;
        height: 120px;
    }
    
    .loader-ring {
        width: 150px;
        height: 150px;
        border-width: 1.5px;
    }
    
    .loader-ring::before {
        border-width: 1px;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    
    .loader-text {
        font-size: 12px;
        letter-spacing: 1.5px;
    }
    
    .loader-dots {
        gap: 7px;
    }
    
    .loader-dot {
        width: 3.5px;
        height: 3.5px;
    }
    
    .loader-progress {
        width: 170px;
    }
}

/* Mobile Medium (376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    .loader-content {
        gap: 22px;
    }
    
    .loader-logo-container {
        width: 110px;
        height: 110px;
    }
    
    .loader-ring {
        width: 140px;
        height: 140px;
        border-width: 1.5px;
    }
    
    .loader-ring::before {
        border-width: 1px;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    
    .loader-text {
        font-size: 11px;
        letter-spacing: 1.2px;
    }
    
    .loader-dots {
        gap: 6px;
    }
    
    .loader-dot {
        width: 3px;
        height: 3px;
    }
    
    .loader-progress {
        width: 160px;
    }
}

/* Mobile Small (max 375px) */
@media (max-width: 375px) {
    .loader-content {
        gap: 20px;
    }
    
    .loader-logo-container {
        width: 100px;
        height: 100px;
    }
    
    .loader-ring {
        width: 130px;
        height: 130px;
        border-width: 1px;
    }
    
    .loader-ring::before {
        border-width: 1px;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    
    .loader-text {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .loader-dots {
        gap: 6px;
    }
    
    .loader-dot {
        width: 3px;
        height: 3px;
    }
    
    .loader-progress {
        width: 150px;
    }
    
    .loader-decoration-1,
    .loader-decoration-2 {
        opacity: 0.02;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .loader-content {
        gap: 16px;
    }
    
    .loader-logo-container {
        width: 90px;
        height: 90px;
    }
    
    .loader-ring {
        width: 120px;
        height: 120px;
        border-width: 1px;
    }
    
    .loader-ring::before {
        border-width: 1px;
        top: 6px;
        left: 6px;
        right: 6px;
        bottom: 6px;
    }
    
    .loader-text {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .loader-dots {
        gap: 5px;
    }
    
    .loader-dot {
        width: 2.5px;
        height: 2.5px;
    }
    
    .loader-progress {
        width: 140px;
    }
    
    .loader-decoration-1,
    .loader-decoration-2 {
        display: none;
    }
}

/* Small Height Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .loader-content {
        gap: 14px;
    }
    
    .loader-logo-container {
        width: 80px;
        height: 80px;
    }
    
    .loader-ring {
        width: 110px;
        height: 110px;
    }
    
    .loader-text {
        font-size: 9px;
    }
    
    .loader-progress {
        width: 130px;
    }
}

/* High Resolution (1600px+) */
@media (min-width: 1600px) {
    .loader-content {
        gap: 35px;
    }
    
    .loader-logo-container {
        width: 170px;
        height: 170px;
    }
    
    .loader-ring {
        width: 200px;
        height: 200px;
        border-width: 2px;
    }
    
    .loader-ring::before {
        border-width: 1.5px;
    }
    
    .loader-text {
        font-size: 15px;
        letter-spacing: 3px;
    }
    
    .loader-progress {
        width: 260px;
        height: 1.5px;
    }
}

/* Ultra High Resolution (2560px+) */
@media (min-width: 2560px) {
    .loader-content {
        gap: 40px;
    }
    
    .loader-logo-container {
        width: 200px;
        height: 200px;
    }
    
    .loader-ring {
        width: 230px;
        height: 230px;
        border-width: 2px;
    }
    
    .loader-text {
        font-size: 16px;
        letter-spacing: 3.5px;
    }
    
    .loader-progress {
        width: 300px;
        height: 2px;
    }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .site-loader,
    .loader-content,
    .loader-logo,
    .loader-text,
    .loader-dot,
    .loader-particle,
    .loader-decoration-1,
    .loader-decoration-2 {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    .loader-ring,
    .loader-ring::before {
        animation: ringRotate 4s linear infinite;
    }
}
