body {
    font-family: -apple-system, Segoe UI, Roboto, sans-serif;
    background: #e2e8f0;
    margin: 0;
}

.demo-controls {
    padding: 24px;
    text-align: center;
}

    .demo-controls button {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        background: white;
        cursor: pointer;
        margin: 0 6px;
    }

    .demo-controls label {
        font-size: 13px;
        margin-left: 16px;
    }

/* ===== Overlay ===== */
.sync-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.sync-loading-content {
    background: linear-gradient(145deg, #ffffff, #f0f4f8);
    border-radius: 24px;
    padding: 48px 64px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-align: center;
    animation: slideUp 0.4s ease-out;
    max-width: 480px;
}

/* ===== Spinner 3D ===== */
.sync-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    perspective: 600px;
}

.sync-spinner-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.sync-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
}

    .sync-spinner-ring.r1 {
        border-top-color: var(--c1, #3b82f6);
        border-bottom-color: var(--c1, #3b82f6);
        animation: sync-spin-x 1.6s linear infinite;
    }

    .sync-spinner-ring.r2 {
        border-left-color: var(--c2, #10b981);
        border-right-color: var(--c2, #10b981);
        animation: sync-spin-y 1.6s linear infinite;
    }

    .sync-spinner-ring.r3 {
        inset: 18px;
        border-top-color: var(--c3, #f59e0b);
        border-bottom-color: var(--c3, #f59e0b);
        animation: sync-spin-x 1.1s linear infinite reverse;
    }

.sync-coin {
    position: absolute;
    inset: 44px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--c1, #3b82f6), color-mix(in srgb, var(--c1, #3b82f6) 40%, white));
    animation: sync-coin-spin 1.3s linear infinite;
}

@keyframes sync-spin-x {
    from {
        transform: rotateX(0);
    }

    to {
        transform: rotateX(360deg);
    }
}

@keyframes sync-spin-y {
    from {
        transform: rotateY(0);
    }

    to {
        transform: rotateY(360deg);
    }
}

@keyframes sync-coin-spin {
    from {
        transform: rotateY(0);
    }

    to {
        transform: rotateY(360deg);
    }
}

/* ===== Text ===== */
.sync-loading-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.sync-loading-text p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

.sync-sub-message {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 8px !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
