/* Paylaşılan yükleme ekranı — boot (index.html) + runtime (GlobalLoadingOverlay) */

.agro-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.agro-loading.is-visible,
.agro-loading.is-boot {
    opacity: 1;
}

.agro-loading.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.agro-loading__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 34%, rgba(74, 222, 128, 0.22) 0%, rgba(74, 222, 128, 0.08) 24%, transparent 44%),
        radial-gradient(circle at 18% 82%, rgba(45, 212, 191, 0.18) 0%, transparent 32%),
        radial-gradient(circle at 82% 76%, rgba(34, 197, 94, 0.14) 0%, transparent 30%),
        linear-gradient(160deg, #020604 0%, #052015 45%, #03110b 100%);
    overflow: hidden;
}

.agro-loading__backdrop::before {
    content: '';
    position: absolute;
    inset: -4%;
    background:
        linear-gradient(115deg, transparent 0 48%, rgba(110, 231, 183, 0.08) 49% 50%, transparent 51% 100%),
        linear-gradient(65deg, transparent 0 44%, rgba(45, 212, 191, 0.06) 45% 46%, transparent 47% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 56px);
    opacity: 0.7;
    animation: agro-loading-bg-move 48s infinite alternate ease-in-out;
}

.agro-loading__backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 38%, rgba(74, 222, 128, 0.1) 0%, transparent 62%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 55%),
        linear-gradient(180deg, rgba(4, 10, 7, 0.72) 0%, rgba(4, 10, 7, 0.88) 55%, rgba(2, 6, 4, 0.94) 100%);
}

/* Kart yok — içerik doğrudan koyu sahne üzerinde */
.agro-loading__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: min(400px, calc(100vw - 2.5rem));
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateY(16px);
    animation: agro-loading-panel-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.agro-loading__brand-line {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: rgba(167, 243, 208, 0.72);
    text-shadow: 0 0 24px rgba(74, 222, 128, 0.25);
}

.agro-loading__emblem {
    position: relative;
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agro-loading__orbit {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
    pointer-events: none;
}

.agro-loading__orbit--outer {
    inset: 0;
    border-top-color: rgba(110, 231, 183, 0.55);
    border-right-color: rgba(110, 231, 183, 0.12);
    animation: agro-loading-orbit-spin 1.6s linear infinite;
}

.agro-loading__orbit--inner {
    inset: 14px;
    border-bottom-color: rgba(167, 243, 208, 0.45);
    border-left-color: rgba(167, 243, 208, 0.1);
    animation: agro-loading-orbit-spin 2.1s linear infinite reverse;
}

.agro-loading__glow {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.2) 0%, transparent 68%);
    animation: agro-loading-glow-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

.agro-loading__copy {
    text-align: center;
}

.agro-loading__title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f8fafc;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.agro-loading__dots span {
    animation: agro-loading-dot-bounce 1.2s ease-in-out infinite;
    opacity: 0.4;
}

.agro-loading__dots span:nth-child(2) { animation-delay: 0.15s; }
.agro-loading__dots span:nth-child(3) { animation-delay: 0.3s; }

.agro-loading__subtitle {
    margin: 0.45rem 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.88);
}

/* İlerleme: cam kapsül */
.agro-loading__progress-boot {
    width: min(280px, 88%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0.75rem;
    border-radius: 999px;
    background: rgba(8, 16, 12, 0.55);
    border: 1px solid rgba(110, 231, 183, 0.14);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.agro-loading__track {
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.agro-loading__fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6ee7b7 0%, #34d399 50%, #a7f3d0 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 12px rgba(110, 231, 183, 0.4);
    animation: agro-loading-fill-shimmer 2.2s ease-in-out infinite;
    transition: width 0.22s ease-out;
}

.agro-loading__percent {
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(167, 243, 208, 0.9);
    letter-spacing: 0.12em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.agro-loading__progress-indeterminate {
    width: min(280px, 88%);
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(110, 231, 183, 0.1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.agro-loading__progress-indeterminate-bar {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #a7f3d0, #34d399);
    background-size: 200% 100%;
    animation: agro-loading-progress-slide 1.5s ease-in-out infinite;
}

@keyframes agro-loading-bg-move {
    0% { transform: scale(1.02) translate(0, 0); }
    100% { transform: scale(1.08) translate(12px, 8px); }
}

@keyframes agro-loading-panel-enter {
    to { transform: translateY(0); }
}

@keyframes agro-loading-orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes agro-loading-glow-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.97); }
    50% { opacity: 1; transform: scale(1.03); }
}

@keyframes agro-loading-dot-bounce {
    0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}

@keyframes agro-loading-progress-slide {
    0% { transform: translateX(-130%); background-position: 0% 50%; }
    100% { transform: translateX(340%); background-position: 100% 50%; }
}

@keyframes agro-loading-fill-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .agro-loading__backdrop::before,
    .agro-loading__orbit--outer,
    .agro-loading__orbit--inner,
    .agro-loading__glow,
    .agro-loading__dots span,
    .agro-loading__progress-indeterminate-bar,
    .agro-loading__fill,
    .agro-loading__panel {
        animation: none;
    }

    .agro-loading {
        transition: none;
    }

    .agro-loading__panel {
        transform: none;
    }
}
