/* ============================================
   SOFTHERE PRELOADER - Beautiful Loading Animation
   Color Palette: Soft Green & Turquoise Theme
   ============================================ */

:root {
    --color-primary: #6FA06F;
    --color-primary-700: #5E8B5E;
    --color-primary-200: #BFDABF;
    --color-primary-100: #E6F2E6;
    --color-black: #0D0D0D;
    --color-gray-800: #2D2D2D;
    --color-gray-400: #9B9B9B;
    --color-white: #FFFFFF;
    --color-accent: #456645;
    --color-secondary: #8ac88a;
}

/* Main Preloader Container */
.softhere-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    overflow: hidden;
}

/* Animated Background Waves */
.preloader-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    border-radius: 40%;
}

.wave-1 {
    background: radial-gradient(circle, var(--color-primary-100) 0%, transparent 70%);
    animation: waveRotate 20s linear infinite;
}

.wave-2 {
    background: radial-gradient(circle, var(--color-primary-200) 0%, transparent 70%);
    animation: waveRotate 15s linear infinite reverse;
}

.wave-3 {
    background: radial-gradient(circle, rgba(75, 163, 195, 0.1) 0%, transparent 70%);
    animation: waveRotate 25s linear infinite;
}

@keyframes waveRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Main Content */
.preloader-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Logo Container */
.logo-container {
    margin-bottom: 50px;
    position: relative;
}

.logo-word {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
}

.letter {
    font-size: 72px;
    font-weight: 900;
    color: var(--color-primary-700);
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) scale(0.5);
    animation: letterLoad 0.6s ease-out forwards;
    animation-delay: calc(var(--index) * 0.1s);
    position: relative;
}

.letter::before {
    content: attr(data-index);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--color-primary);
    opacity: 0;
    animation: indexFade 0.3s ease-out forwards;
    animation-delay: calc(var(--index) * 0.1s + 0.3s);
}

.letter:nth-child(1) { --index: 0; }
.letter:nth-child(2) { --index: 1; }
.letter:nth-child(3) { --index: 2; }
.letter:nth-child(4) { --index: 3; }
.letter:nth-child(5) { --index: 4; }
.letter:nth-child(6) { --index: 5; }
.letter:nth-child(7) { --index: 6; }
.letter:nth-child(8) { --index: 7; }

@keyframes letterLoad {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.5) rotateX(-90deg);
    }
    60% {
        transform: translateY(-10px) scale(1.1) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes indexFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    100% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(0);
    }
}

/* Loading Line */
.loading-line {
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    background-size: 200% 100%;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(111, 160, 111, 0.5);
    animation: lineGrow 2s ease-out forwards, lineShimmer 1.5s linear infinite;
    animation-delay: 0.8s, 1.5s;
}

@keyframes lineGrow {
    0% {
        width: 0;
    }
    100% {
        width: 400px;
    }
}

@keyframes lineShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading Text Container */
.loading-text-container {
    margin-top: 40px;
}

.loading-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
    background: var(--color-primary);
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
    background: var(--color-secondary);
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
    background: var(--color-accent);
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.loading-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-gray-800);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: messageFade 2s ease-in-out infinite;
}

@keyframes messageFade {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Decorative Shapes */
.decorative-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.15;
}

.circle-shape {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    top: 15%;
    left: 10%;
    animation: shapeFloat 8s ease-in-out infinite;
}

.square-shape {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    border-radius: 20px;
    bottom: 20%;
    right: 15%;
    animation: shapeFloat 10s ease-in-out infinite;
    animation-delay: 1s;
}

.triangle-shape {
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 130px solid var(--color-secondary);
    opacity: 0.1;
    top: 60%;
    left: 15%;
    animation: shapeFloat 12s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Fade Out Animation */
.softhere-preloader.fade-out {
    animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media only screen and (max-width: 767px) {
    .letter {
        font-size: 48px;
    }
    
    .logo-word {
        gap: 5px;
    }
    
    .loading-line {
        max-width: 280px;
    }
    
    .loading-message {
        font-size: 14px;
    }
    
    .decorative-shapes .shape {
        display: none;
    }
}

@media only screen and (max-width: 449px) {
    .letter {
        font-size: 36px;
    }
    
    .logo-word {
        gap: 3px;
    }
    
    .loading-line {
        max-width: 220px;
    }
    
    .loading-message {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Smooth Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
