/* ============================================
   UNIVERSELLE LADESEITE - CSS
   OHNE Hintergrund-Gradient (transparent)
   ============================================ */

/* Main Container - KEIN Hintergrund! */
.root_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    /* Nur halbtransparentes Schwarz */
    z-index: 9999;
    overflow: hidden;
}

/* Loader Wrapper - Glassmorphism Card */
.loaderWrapper {
    position: relative;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    /* Fast weißer Hintergrund */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 650px;
    width: 90%;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loader Content */
.loader {
    text-align: center;
    color: #333;
    /* Dunkle Textfarbe für hellen Hintergrund */
}

/* Header */
.loader-header {
    margin-bottom: 30px;
}

.loader-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: #333;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.loader-title i {
    margin-right: 12px;
    color: #667eea;
    font-size: 24px;
}

/* Progress Circle */
.progress-circle {
    position: relative;
    margin: 35px auto;
    width: 160px;
    height: 160px;
}

.progress-ring {
    transform: rotate(-90deg);
    filter: drop-shadow(0 4px 20px rgba(102, 126, 234, 0.3));
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    stroke-linecap: round;
}

.progress-ring-circle-bg {
    opacity: 0.2;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-percentage {
    font-size: 42px;
    font-weight: 800;
    color: #667eea;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Status Container */
.status-container {
    margin: 25px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.status-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #667eea;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.3));
}

.status-text {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0 4px 0;
    color: #333;
}

.status-subtext {
    font-size: 13px;
    margin: 0;
    color: #666;
    font-weight: 400;
}

/* Phase Indicators */
.phase-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.phase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.phase-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    font-size: 16px;
    color: rgba(102, 126, 234, 0.6);
}

.phase-dot.completed {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.phase-dot.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.phase-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-align: center;
    max-width: 60px;
}

.phase-line {
    width: 30px;
    height: 2px;
    background: rgba(102, 126, 234, 0.2);
    margin: 0 5px;
}

/* Log Container */
.log-container {
    margin: 25px 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 250px;
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.log-header i {
    margin-right: 8px;
    color: #667eea;
}

.log-toggle {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.log-toggle:hover {
    transform: scale(1.1);
}

.log-body {
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.log-list li {
    padding: 6px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #333;
    text-align: left;
    animation: logSlideIn 0.3s ease;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

/* Log Level Farben */
.log-entry-info    { color: #333; }
.log-entry-success { color: #2e7d32; font-weight: 600; }
.log-entry-warning { color: #e65100; }
.log-entry-danger  { color: #c62828; font-weight: 600; }

.log-entry-time {
    color: #999;
    font-size: 0.8em;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes logSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.log-list li:last-child {
    border-bottom: none;
}

/* Scrollbar Styling */
.log-body::-webkit-scrollbar {
    width: 6px;
}

.log-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.log-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.log-body::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Cancel Button */
.btn-cancel {
    margin-top: 25px;
    padding: 12px 30px;
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.3);
    border-radius: 25px;
    color: #f44336;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
    transform: translateY(-2px);
}

.btn-cancel i {
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loaderWrapper {
        padding: 30px 20px;
        width: 95%;
    }

    .loader-title {
        font-size: 20px;
    }

    .progress-circle {
        width: 140px;
        height: 140px;
    }

    .progress-percentage {
        font-size: 36px;
    }

    .phase-indicators {
        gap: 3px;
    }

    .phase-dot {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .phase-line {
        width: 20px;
    }

    .phase-label {
        font-size: 10px;
        max-width: 50px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .progress-percentage,
    .phase-dot.active {
        animation: none;
    }
}

/* Loading Icon - verschiedene Zustände */
.loading-icon img {
    width: 100px;
    height: 100px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}