/**
 * 圆润现代风格 - 空状态与加载动画
 * 与整体界面设计语言保持一致
 */

/* === 隐藏旧的复杂元素 === */
.ai-grid-bg,
.scan-line,
.ai-core,
.hex-ring,
.data-ring,
.energy-pulse,
.ai-icon,
.data-node,
.connection-lines,
.ai-title-area,
.minimal-core,
.minimal-text,
.breath-ring,
.orbit-track,
.orbit-dot,
.center-icon,
.pulse-loader,
.pulse-circle,
.loader-icon,
.loading-progress {
    display: none !important;
}

/* === 画布空状态 === */

/* 确保画布主区域内容居中 */
.canvas-main {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.canvas-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* 结果容器也需要绝对定位居中 */
.result-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 40px;
}

.empty-content {
    text-align: center;
    padding: 48px;
}

/* 图标容器 */
.empty-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 24px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
    color: #94a3b8;
    animation: icon-breathe 3s ease-in-out infinite;
}

@keyframes icon-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.06),
            0 1px 3px rgba(0, 0, 0, 0.04);
    }
    50% {
        transform: scale(1.03);
        box-shadow:
            0 8px 24px rgba(37, 99, 235, 0.12),
            0 4px 8px rgba(0, 0, 0, 0.04);
    }
}

.empty-icon svg {
    width: 48px;
    height: 48px;
}

/* 文字 */
.empty-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.empty-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 32px;
}

/* 步骤提示 */
.empty-steps {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 28px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
}

.step-text {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.step-divider {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
}

/* === 加载遮罩 === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.loading-overlay.active {
    display: flex;
}

.loading-card {
    text-align: center;
    padding: 48px 64px;
    background: white;
    border-radius: 24px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.04);
}

/* 旋转加载器 */
.loading-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: spinner-rotate 1.4s linear infinite;
}

@keyframes spinner-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-track {
    stroke: #e2e8f0;
}

.spinner-progress {
    stroke: #2563eb;
    stroke-linecap: round;
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
    animation: spinner-dash 1.4s ease-in-out infinite;
}

@keyframes spinner-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 80, 200;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 80, 200;
        stroke-dashoffset: -125;
    }
}

.loading-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.loading-hint {
    font-size: 14px;
    color: #64748b;
}
