﻿.loader-container {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
}

.preloader {
    text-align: center;
}
.brand-name,
.loading-text {
    min-height: 2.5rem; 
    text-align: center;
}
.loader-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
*, *::before, *::after {
    box-sizing: border-box;
}
.loader {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.land-plots {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 25px;
    box-sizing: border-box;
}

.plot-area {
    position: absolute;
    border: 2px solid #0A7C92;
    background: rgba(10, 124, 146, 0.1);
    opacity: 0;
    animation: plotAreaAppear 3s ease-in-out infinite;
}
    .plot-area:nth-child(1) {
        width: 35px;
        height: 25px;
        top: 10px;
        left: 20px;
        clip-path: polygon(0% 0%, 85% 0%, 100% 100%, 15% 100%);
        animation-delay: 0s;
    }

    .plot-area:nth-child(2) {
        width: 40px;
        height: 30px;
        top: 5px;
        right: 25px;
        clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
        animation-delay: 0.3s;
    }

    .plot-area:nth-child(3) {
        width: 30px;
        height: 35px;
        top: 45px;
        left: 15px;
        clip-path: polygon(0% 15%, 100% 0%, 100% 85%, 0% 100%);
        animation-delay: 0.6s;
    }

    .plot-area:nth-child(4) {
        width: 45px;
        height: 28px;
        top: 50px;
        right: 15px;
        clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 85%);
        animation-delay: 0.9s;
    }

    .plot-area:nth-child(5) {
        width: 38px;
        height: 32px;
        bottom: 45px;
        left: 18px;
        clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
        animation-delay: 1.2s;
    }

    .plot-area:nth-child(6) {
        width: 42px;
        height: 26px;
        bottom: 50px;
        right: 20px;
        clip-path: polygon(0% 0%, 100% 0%, 90% 100%, 10% 100%);
        animation-delay: 1.5s;
    }

    .plot-area:nth-child(7) {
        width: 28px;
        height: 28px;
        bottom: 15px;
        left: 25px;
        clip-path: polygon(20% 0%, 100% 20%, 80% 100%, 0% 80%);
        animation-delay: 1.8s;
    }

    .plot-area:nth-child(8) {
        width: 36px;
        height: 24px;
        bottom: 10px;
        right: 30px;
        clip-path: polygon(0% 20%, 80% 0%, 100% 80%, 20% 100%);
        animation-delay: 2.1s;
    }

/* Rotating Boundary Lines */
.boundary-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border: 3px solid transparent;
    border-top: 3px solid #0A7C92;
    border-right: 3px solid #0A7C92;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotateBoundary 3s linear infinite;
}

    .boundary-ring::before {
        content: '';
        position: absolute;
        top: -6px;
        right: -6px;
        width: 8px;
        height: 8px;
        background: #0A7C92;
        border-radius: 50%;
        animation: pulseMarker 1.5s ease-in-out infinite;
    }

/* Inner Survey Lines */
.survey-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
}

.survey-line {
    position: absolute;
    background: #0A7C92;
    opacity: 0.6;
}

    .survey-line.horizontal {
        width: 100%;
        height: 1px;
        top: 50%;
        left: 0;
        transform: translateY(-50%) scaleX(0);
        animation: expandHorizontal 2s ease-in-out infinite;
    }

    .survey-line.vertical {
        width: 1px;
        height: 100%;
        left: 50%;
        top: 0;
        transform: translateX(-50%) scaleY(0);
        animation: expandVertical 2s ease-in-out infinite 0.5s;
    }

    .survey-line.diagonal1 {
        width: 141px;
        height: 1px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
        animation: expandDiagonal 2s ease-in-out infinite 1s;
    }

    .survey-line.diagonal2 {
        width: 141px;
        height: 1px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
        animation: expandDiagonal 2s ease-in-out infinite 1.5s;
    }

/* Center Property Icon */
.property-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 124, 146, 0.1);
    border: 2px solid #0A7C92;
    border-radius: 8px;
    animation: centerPulse 2s ease-in-out infinite;
}

.property-icon {
    width: 20px;
    height: 20px;
    fill: #0A7C92;
}

.brand-name {
    font-size: 2rem;
    color: #0A7C92;
    font-weight: bold;
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 0.5s forwards 0.5s;
}

.loading-text {
    color: #0A7C92;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInUp 0.5s forwards 0.7s;
}

/* Animations */
@keyframes plotAreaAppear {
    0%, 20% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
        border-color: transparent;
        background: rgba(10, 124, 146, 0);
    }

    30% {
        opacity: 0.8;
        transform: scale(1.1) rotate(2deg);
        border-color: #0A7C92;
        background: rgba(10, 124, 146, 0.2);
    }

    70% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        border-color: #0A7C92;
        background: rgba(10, 124, 146, 0.15);
    }

    90%, 100% {
        opacity: 0;
        transform: scale(0.8) rotate(-1deg);
        border-color: rgba(10, 124, 146, 0.5);
        background: rgba(10, 124, 146, 0.05);
    }
}

@keyframes rotateBoundary {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulseMarker {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes expandHorizontal {
    0%, 20% {
        transform: translateY(-50%) scaleX(0);
    }

    40% {
        transform: translateY(-50%) scaleX(1);
    }

    60%, 100% {
        transform: translateY(-50%) scaleX(0);
    }
}

@keyframes expandVertical {
    0%, 20% {
        transform: translateX(-50%) scaleY(0);
    }

    40% {
        transform: translateX(-50%) scaleY(1);
    }

    60%, 100% {
        transform: translateX(-50%) scaleY(0);
    }
}

@keyframes expandDiagonal {
    0%, 20% {
        transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
    }

    40% {
        transform: translate(-50%, -50%) rotate(45deg) scaleX(1);
    }

    60%, 100% {
        transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
    }
}

@keyframes centerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        background: rgba(10, 124, 146, 0.1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        background: rgba(10, 124, 146, 0.2);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.loader-container.show {
    animation: fadeIn 0.3s forwards;
}

.loader-container.hide {
    animation: fadeOut 0.3s forwards;
}

/* Demo Controls */
.demo-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.demo-btn {
    background: #0A7C92;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

    .demo-btn:hover {
        background: #085a6b;
    }
